:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --orange: #ea580c;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 32rem),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 55%, #020617 100%);
}

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;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbbf24, #ea580c);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

.brand-name {
    display: block;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 13px;
    color: #d1d5db;
    font-weight: 650;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(245, 158, 11, 0.18);
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(234, 88, 12, 0.92));
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.22);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 0 16px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: grid;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.hero-stage {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 44%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.36) 0%, rgba(2, 6, 23, 0.98) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 88px 0 72px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 380px;
    gap: 34px;
    align-items: end;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.13);
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
}

.hero h1 {
    margin: 18px 0 16px;
    max-width: 780px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-lead {
    max-width: 740px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
}

.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.78);
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 700;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.btn-primary {
    border-color: rgba(245, 158, 11, 0.42);
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.btn-cyan {
    border-color: rgba(6, 182, 212, 0.42);
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.hero-panel {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    padding: 22px;
}

.hero-panel h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.mini-list {
    display: grid;
    gap: 12px;
}

.mini-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.13);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mini-item:hover {
    transform: translateX(3px);
    border-color: rgba(245, 158, 11, 0.38);
}

.mini-item img {
    width: 74px;
    height: 96px;
    object-fit: cover;
    border-radius: 14px;
}

.mini-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.mini-item span {
    color: var(--muted);
    font-size: 12px;
}

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

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

.hero-dot.active {
    background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.section {
    padding: 64px 0;
}

.section.alt {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.42), rgba(15, 23, 42, 0.44));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.section-kicker {
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.08em;
    font-size: 12px;
    text-transform: uppercase;
}

.section-title {
    margin: 8px 0 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 20px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 9rem),
        rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 19px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    background: rgba(30, 41, 59, 0.68);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, 0.92));
}

.card-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.card-score {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    color: #fde68a;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-title a:hover {
    color: #fbbf24;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 10px;
}

.card-desc {
    margin: 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.65;
}

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

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 150px 1fr;
    min-height: 210px;
}

.movie-card.horizontal .poster-wrap {
    aspect-ratio: auto;
    height: 100%;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 96px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.4);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    font-weight: 900;
}

.rank-row img {
    width: 96px;
    height: 124px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    margin: 24px 0 28px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.76);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 15px;
    background: rgba(2, 6, 23, 0.58);
    color: #fff;
    padding: 0 16px;
    outline: none;
}

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

.card-hidden {
    display: none !important;
}

.empty-state {
    display: none;
    color: var(--muted);
    text-align: center;
    padding: 34px;
    border: 1px dashed rgba(148, 163, 184, 0.26);
    border-radius: 20px;
}

.empty-state.is-visible {
    display: block;
}

.page-hero {
    padding: 74px 0 42px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.18), transparent 20rem),
        radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.12), transparent 18rem);
}

.page-hero h1 {
    margin: 12px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 800px;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 18px;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
    color: #fff;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.56) 52%, rgba(2, 6, 23, 0.92));
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.play-circle {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 18px 50px rgba(245, 158, 11, 0.36);
    font-size: 32px;
}

.detail-card,
.content-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
    padding: 24px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.content-panel + .content-panel {
    margin-top: 18px;
}

.detail-title {
    margin: 22px 0 10px;
    font-size: clamp(30px, 5vw, 54px);
    letter-spacing: -0.05em;
}

.detail-summary,
.content-panel p {
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-poster img {
    width: 100%;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.info-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.info-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    color: var(--muted);
}

.info-line strong {
    color: #fff;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.98));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
    padding: 42px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: #fbbf24;
}

.copyright {
    padding: 18px 0 26px;
    color: #64748b;
    font-size: 13px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

@media (max-width: 1080px) {
    .hero-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .movie-card.horizontal {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero {
        min-height: 720px;
    }

    .hero-content {
        padding-top: 58px;
    }

    .hero-panel {
        display: none;
    }

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

    .section-header,
    .search-panel,
    .footer-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .rank-row {
        grid-template-columns: 44px 78px 1fr;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand-name {
        font-size: 18px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-lead {
        font-size: 15px;
    }

    .category-grid,
    .movie-grid,
    .movie-grid.compact,
    .horizontal-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 72px 1fr;
        gap: 10px;
    }

    .rank-row img {
        width: 72px;
        height: 96px;
    }

    .detail-card,
    .content-panel {
        padding: 18px;
    }
}
