:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(245, 158, 11, 0.42);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --gold: #f59e0b;
    --gold-soft: #fbbf24;
    --blue: #38bdf8;
    --danger: #fb7185;
    --radius: 1.25rem;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 2rem));
    height: 4.5rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.brand-mark {
    width: 2.45rem;
    height: 2.45rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), #f97316);
    color: #111827;
    font-weight: 900;
    box-shadow: 0 0 34px rgba(245, 158, 11, 0.45);
}

.brand strong {
    display: block;
    font-size: 1.12rem;
    letter-spacing: 0.04em;
}

.brand span {
    display: block;
    margin-top: 0.08rem;
    color: var(--muted);
    font-size: 0.76rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-links a,
.mobile-panel a {
    border-radius: 0.9rem;
    color: var(--soft);
    padding: 0.72rem 0.95rem;
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.nav-links a.active {
    background: rgba(148, 163, 184, 0.13);
    color: white;
}

.mobile-toggle {
    display: none;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.65);
    color: white;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 0.8rem 1rem 1rem;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-panel.open {
    display: grid;
    gap: 0.3rem;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: clamp(620px, 86vh, 820px);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) brightness(0.64);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18) 0%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-inner {
    position: relative;
    z-index: 3;
    min-height: clamp(620px, 86vh, 820px);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    padding: 6rem 0 4rem;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(245, 158, 11, 0.38);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.10);
    color: var(--gold-soft);
    padding: 0.38rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-title {
    max-width: 880px;
    margin: 1.2rem 0 0;
    font-size: clamp(2.55rem, 6vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.065em;
    font-weight: 950;
}

.hero-title span {
    color: var(--gold-soft);
}

.hero-desc {
    max-width: 760px;
    margin: 1.25rem 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 1.6vw, 1.22rem);
    line-height: 1.9;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.3rem 0 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    color: var(--soft);
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.7rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    min-height: 2.85rem;
    padding: 0.7rem 1.18rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #f97316);
    color: #111827;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.btn-secondary {
    border-color: var(--line);
    background: rgba(15, 23, 42, 0.66);
    color: white;
}

.hero-side {
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 1.65rem;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    padding: 1rem;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    aspect-ratio: 16 / 10;
    background: #111827;
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 1.2rem;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.90));
}

.hero-side-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.85rem;
}

.hero-mini {
    display: grid;
    grid-template-columns: 4.8rem 1fr;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.35);
    padding: 0.55rem;
}

.hero-mini img {
    width: 4.8rem;
    height: 3.2rem;
    border-radius: 0.75rem;
    object-fit: cover;
}

.hero-mini strong {
    display: block;
    font-size: 0.95rem;
}

.hero-mini span {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.55rem;
}

.hero-dot {
    width: 2.2rem;
    height: 0.32rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--gold-soft);
}

.section {
    padding: clamp(2.8rem, 7vw, 5.5rem) 0;
}

.section.compact {
    padding-top: 2.4rem;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.section-title {
    margin: 0.55rem 0 0;
    font-size: clamp(1.65rem, 3vw, 2.65rem);
    line-height: 1.14;
    letter-spacing: -0.045em;
    font-weight: 950;
}

.section-desc {
    margin: 0.55rem 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.grid {
    display: grid;
    gap: 1rem;
}

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

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

.movie-card,
.category-card,
.rank-card,
.detail-panel,
.search-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.20);
    overflow: hidden;
}

.movie-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.44);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.poster {
    position: relative;
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    background: #0f172a;
}

.poster.wide {
    aspect-ratio: 16 / 9;
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.movie-card:hover .poster img {
    transform: scale(1.06);
}

.poster-badge {
    position: absolute;
    left: 0.65rem;
    top: 0.65rem;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
    color: white;
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
}

.poster-year {
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 900;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0.95rem;
}

.card-body h3,
.card-body h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.38;
}

.card-body p {
    color: var(--muted);
    margin: 0.5rem 0 0;
    line-height: 1.65;
    font-size: 0.86rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.card-link {
    margin-top: auto;
    padding-top: 0.8rem;
    color: var(--gold-soft);
    font-size: 0.86rem;
    font-weight: 850;
}

.category-card {
    padding: 1.25rem;
    min-height: 12rem;
    transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.category-card h2,
.category-card h3 {
    margin: 0.7rem 0 0;
    font-size: 1.35rem;
}

.category-card p {
    margin: 0.65rem 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.category-cover-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.category-cover-row img {
    width: 100%;
    aspect-ratio: 16 / 11;
    border-radius: 0.8rem;
    object-fit: cover;
}

.rank-list {
    display: grid;
    gap: 0.8rem;
}

.rank-card {
    display: grid;
    grid-template-columns: 4rem 6.8rem 1fr auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem;
    transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(249, 115, 22, 0.95));
    color: #111827;
    font-weight: 950;
    font-size: 1.25rem;
}

.rank-card img {
    width: 6.8rem;
    height: 4.4rem;
    border-radius: 0.9rem;
    object-fit: cover;
}

.rank-card h3 {
    margin: 0;
    font-size: 1.02rem;
}

.rank-card p {
    margin: 0.36rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.page-hero {
    border-bottom: 1px solid var(--line);
    padding: clamp(3.2rem, 8vw, 6.4rem) 0 2.4rem;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 28rem),
        radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.10), transparent 28rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--gold-soft);
}

.page-hero h1 {
    max-width: 920px;
    margin: 0.9rem 0 0;
    font-size: clamp(2rem, 5vw, 4.3rem);
    line-height: 1.06;
    letter-spacing: -0.055em;
    font-weight: 950;
}

.page-hero p {
    max-width: 780px;
    margin: 1rem 0 0;
    color: var(--soft);
    line-height: 1.85;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 11rem 11rem;
    gap: 0.8rem;
    padding: 0.95rem;
    margin-bottom: 1.3rem;
    background: rgba(15, 23, 42, 0.72);
}

.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    min-height: 3rem;
    padding: 0 0.9rem;
    outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 1.2rem;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.30);
    border-radius: 1.35rem;
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    cursor: pointer;
    color: white;
    overflow: hidden;
    background: #020617;
}

.play-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.62);
    transition: transform 0.35s ease;
}

.play-overlay:hover img {
    transform: scale(1.04);
}

.play-overlay span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-grid;
    place-items: center;
    width: 5.2rem;
    height: 5.2rem;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), #f97316);
    color: #111827;
    font-size: 2rem;
    font-weight: 950;
    box-shadow: 0 18px 48px rgba(245, 158, 11, 0.36);
}

.play-overlay.is-hidden {
    display: none;
}

.detail-panel {
    padding: 1.2rem;
}

.detail-panel h2,
.detail-panel h3 {
    margin: 0;
    font-size: 1.2rem;
}

.detail-panel p {
    margin: 0.8rem 0 0;
    color: var(--soft);
    line-height: 1.85;
}

.detail-poster {
    border-radius: 1.1rem;
    width: 100%;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
}

.info-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 0.6rem;
    color: var(--muted);
}

.info-list strong {
    color: var(--text);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.related-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.68);
    padding: 2.4rem 0;
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.2rem;
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 0.7rem;
    color: white;
    font-size: 1rem;
}

.footer-grid p,
.footer-grid a {
    color: var(--muted);
    line-height: 1.75;
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    gap: 0.35rem;
}

.empty-state {
    display: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--muted);
    padding: 2rem;
    text-align: center;
}

.empty-state.show {
    display: block;
}

@media (max-width: 1120px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

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

    .hero-inner {
        grid-template-columns: 1fr;
        align-items: end;
        padding-top: 5rem;
    }

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

    .search-panel {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 3rem 5rem 1fr;
    }

    .rank-card .btn {
        grid-column: 1 / -1;
    }

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

@media (max-width: 640px) {
    .nav-wrap,
    .container {
        width: min(100% - 1rem, 1180px);
    }

    .brand strong {
        font-size: 1rem;
    }

    .brand span {
        display: none;
    }

    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 0.72rem;
    }

    .card-body p {
        display: none;
    }

    .hero-side {
        display: none;
    }

    .hero-dots {
        bottom: 1rem;
    }

    .page-hero {
        padding-top: 2.2rem;
    }
}
