:root {
    --bg: #050505;
    --bg-soft: #0b0f18;
    --panel: rgba(31, 41, 55, 0.46);
    --panel-strong: rgba(31, 41, 55, 0.78);
    --line: rgba(249, 115, 22, 0.22);
    --line-soft: rgba(75, 85, 99, 0.48);
    --text: #f8fafc;
    --muted: #9ca3af;
    --muted-2: #6b7280;
    --orange: #f97316;
    --orange-dark: #c2410c;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(124, 45, 18, 0.18), transparent 34rem),
        linear-gradient(180deg, #050505 0%, #0b0f18 46%, #050505 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

img,
video {
    max-width: 100%;
}

img {
    display: block;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(124, 45, 18, 0.45);
    background: rgba(0, 0, 0, 0.88);
    box-shadow: 0 14px 40px rgba(124, 45, 18, 0.12);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(249, 115, 22, 0.36);
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    color: var(--orange);
    font-size: 21px;
    letter-spacing: 0.04em;
}

.brand-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link,
.mobile-link {
    color: #d1d5db;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--orange);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
    height: 42px;
    border: 1px solid rgba(75, 85, 99, 0.8);
    border-radius: 999px;
    outline: none;
    color: #e5e7eb;
    background: rgba(31, 41, 55, 0.58);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
    width: 190px;
    padding: 0 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: white;
    font-weight: 750;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.38);
}

.ghost-button {
    border: 1px solid rgba(249, 115, 22, 0.42);
    background: rgba(0, 0, 0, 0.35);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(75, 85, 99, 0.65);
    border-radius: 14px;
    color: white;
    background: rgba(31, 41, 55, 0.65);
}

.mobile-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    padding-top: 14px;
}

.hero-slider {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.85s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
}

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(to top, #050505 0%, rgba(5, 5, 5, 0.84) 24%, rgba(5, 5, 5, 0.44) 58%, rgba(5, 5, 5, 0.18) 100%),
        radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.24) 44%, rgba(0, 0, 0, 0.72) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 92px 18px 64px;
    text-align: center;
}

.hero-panel {
    width: min(860px, 100%);
}

.hero-tags,
.meta-pills,
.tag-row,
.card-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags {
    justify-content: center;
    margin-bottom: 18px;
}

.hero-tags span,
.meta-pills span,
.tag-row span,
.card-chip-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #f9fafb;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.46);
    font-size: 13px;
    font-weight: 650;
}

.hero-tags span:first-child,
.meta-pills span:first-child {
    background: var(--orange);
    border-color: rgba(249, 115, 22, 0.64);
}

.hero-title {
    margin: 0 0 18px;
    color: white;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.62);
}

.hero-desc {
    width: min(760px, 100%);
    margin: 0 auto 30px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.52);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.74);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 3;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--orange);
}

.container,
.main-section,
.page-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.main-section {
    padding: 72px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--orange);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.section-head h2,
.page-hero h1,
.detail-title,
.search-title {
    margin: 0;
    color: white;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-card p,
.footer-brand p,
.search-intro {
    margin: 8px 0 0;
    color: var(--muted);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(31, 41, 55, 0.38);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(249, 115, 22, 0.58);
    background: rgba(31, 41, 55, 0.62);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-card:hover .poster-wrap img,
.recommend-card:hover img,
.rank-card:hover img {
    transform: scale(1.06);
    filter: saturate(1.15);
}

.poster-badge,
.rank-number {
    position: absolute;
    right: 10px;
    bottom: 10px;
    min-width: 48px;
    padding: 4px 9px;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.78);
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-meta i {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--orange);
}

.movie-card strong {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    color: white;
    font-size: 18px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

.movie-card:hover strong,
.recommend-card:hover strong,
.rank-card:hover strong {
    color: var(--orange);
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 9px;
    color: #d1d5db;
    font-size: 12px;
    background: rgba(17, 24, 39, 0.75);
}

.category-strip {
    background: linear-gradient(90deg, rgba(124, 45, 18, 0.18), rgba(17, 24, 39, 0.44), rgba(124, 45, 18, 0.12));
    border-block: 1px solid rgba(249, 115, 22, 0.14);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border: 1px solid rgba(249, 115, 22, 0.18);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 50%),
        rgba(31, 41, 55, 0.44);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.54);
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.24), transparent 56%),
        rgba(31, 41, 55, 0.64);
}

.category-card strong {
    color: white;
    font-size: 24px;
}

.category-card span {
    color: var(--orange);
    font-weight: 750;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rank-card,
.recommend-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(31, 41, 55, 0.38);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-card:hover,
.recommend-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.46);
    background: rgba(31, 41, 55, 0.6);
}

.rank-cover,
.recommend-cover {
    position: relative;
    min-height: 150px;
    overflow: hidden;
}

.rank-cover img,
.recommend-cover img {
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
}

.rank-number {
    left: 8px;
    right: auto;
    bottom: auto;
    top: 8px;
    min-width: 36px;
    background: var(--orange);
}

.rank-info,
.recommend-info {
    padding: 15px;
}

.rank-info strong,
.recommend-info strong {
    display: -webkit-box;
    overflow: hidden;
    color: white;
    font-size: 16px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-info p,
.recommend-info p {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.page-main {
    padding: 48px 0 76px;
}

.page-hero {
    margin-bottom: 30px;
    padding: 44px;
    border: 1px solid rgba(249, 115, 22, 0.18);
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.2), transparent 44%),
        linear-gradient(135deg, rgba(31, 41, 55, 0.68), rgba(17, 24, 39, 0.36));
    box-shadow: var(--shadow);
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 30px;
    padding: 22px;
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: rgba(31, 41, 55, 0.38);
}

.filter-panel span {
    color: white;
    font-size: 20px;
    font-weight: 850;
}

.filter-panel p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-controls input {
    width: 240px;
    padding: 0 16px;
}

.filter-controls select {
    min-width: 130px;
    padding: 0 16px;
}

.no-results {
    display: none;
    margin-top: 22px;
    padding: 28px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(31, 41, 55, 0.34);
}

.no-results.is-visible {
    display: block;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--orange);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.92fr);
    gap: 30px;
}

.player-shell {
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.74));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
}

.play-icon {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 18px 48px rgba(249, 115, 22, 0.46);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 18px;
}

.detail-card {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: rgba(31, 41, 55, 0.38);
}

.detail-title {
    margin: 18px 0 12px;
}

.detail-card h2 {
    margin: 26px 0 10px;
    color: white;
    font-size: 23px;
}

.detail-card p {
    margin: 0;
    color: #d1d5db;
    white-space: pre-line;
}

.review-box {
    margin-top: 26px;
    padding: 22px;
    border: 1px solid rgba(249, 115, 22, 0.24);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(124, 45, 18, 0.22), rgba(31, 41, 55, 0.36));
}

.side-panel {
    position: sticky;
    top: 96px;
}

.side-panel h2 {
    margin: 0 0 16px;
    color: white;
    font-size: 22px;
}

.recommend-list {
    display: grid;
    gap: 14px;
}

.site-footer {
    border-top: 1px solid rgba(75, 85, 99, 0.42);
    background: rgba(0, 0, 0, 0.46);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 50px 0 34px;
}

.footer-links h2 {
    margin: 0 0 14px;
    color: var(--orange);
    font-size: 18px;
}

.footer-links div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
}

.footer-links a {
    color: var(--muted);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--orange);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(75, 85, 99, 0.38);
    color: var(--muted-2);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 1100px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .hero-slider {
        height: 560px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        padding-inline: 22px;
    }

    .movie-grid,
    .category-grid,
    .rank-list,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .section-head,
    .filter-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-controls,
    .filter-controls input,
    .filter-controls select {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .site-header-inner {
        width: min(100% - 24px, 1180px);
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .hero-slider {
        height: 520px;
    }

    .hero-title {
        font-size: 38px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .page-hero,
    .detail-card {
        padding: 24px;
        border-radius: 22px;
    }

    .movie-grid,
    .category-grid,
    .rank-list,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .rank-card,
    .recommend-card {
        grid-template-columns: 104px 1fr;
    }

    .footer-links div {
        grid-template-columns: 1fr;
    }
}
