: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.96);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --amber: #f59e0b;
    --amber-strong: #f97316;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --radius: 22px;
    --radius-sm: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(245, 158, 11, 0.14), transparent 30rem),
        radial-gradient(circle at 82% 0%, rgba(249, 115, 22, 0.13), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #000 100%);
    color: var(--text);
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    min-height: 74px;
    gap: 22px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--amber-strong));
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.32);
}

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

.brand-title {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: transparent;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.nav-link {
    display: inline-flex;
    padding: 10px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 11px 14px;
    color: var(--text);
    outline: none;
    background: rgba(15, 23, 42, 0.72);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.site-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.site-search button,
.large-search button,
.button {
    border: 0;
    border-radius: 14px;
    padding: 11px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--amber-strong));
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 14px 35px rgba(245, 158, 11, 0.18);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

.button.secondary {
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.09);
    box-shadow: none;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    isolation: isolate;
}

.hero-track {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: clamp(28px, 5vw, 72px);
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 0.8s ease;
    padding: 72px max(32px, calc((100vw - 1180px) / 2)) 110px;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(28px) saturate(1.15);
    transform: scale(1.1);
    opacity: 0.45;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.92) 100%),
        radial-gradient(circle at 70% 50%, rgba(245, 158, 11, 0.26), transparent 24rem);
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-content {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero-lead,
.page-hero p,
.detail-lead {
    max-width: 760px;
    margin: 22px 0 0;
    color: #d1d5db;
    font-size: clamp(17px, 2.3vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 7px 11px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.08);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.hero-media {
    width: min(100%, 420px);
    justify-self: end;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-media img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

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

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--amber), var(--amber-strong));
}

.intro-panel,
.section-block,
.ranking-panel,
.content-panel,
.filter-panel,
.category-overview-card,
.page-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.intro-panel {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 30px;
    align-items: center;
    margin-top: -48px;
    position: relative;
    z-index: 4;
    padding: 30px;
}

.intro-panel h2,
.section-heading h2,
.content-panel h2,
.ranking-panel h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.intro-panel p,
.content-panel p,
.category-overview-card p,
.ranking-card p {
    color: #cbd5e1;
    line-height: 1.8;
}

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

.section-block {
    margin-top: 42px;
    padding: 30px;
}

.section-block.no-margin {
    margin: 0;
}

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

.section-heading a,
.text-link {
    color: #fbbf24;
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.74);
    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.58);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.9));
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(10px);
}

.movie-card-body {
    padding: 16px;
}

.movie-card h2,
.movie-card h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
}

.movie-meta {
    margin: 9px 0 0;
    color: #94a3b8;
    font-size: 13px;
}

.movie-desc {
    min-height: 62px;
    margin: 12px 0 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.55;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row.wide {
    margin-top: 24px;
}

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

.category-tile {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: rgba(2, 6, 23, 0.42);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.52);
}

.category-covers,
.overview-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.category-covers img,
.overview-covers img {
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    object-fit: cover;
}

.category-tile strong {
    font-size: 18px;
}

.category-tile em {
    color: #fbbf24;
    font-style: normal;
    font-size: 14px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    margin-top: 42px;
}

.ranking-panel {
    padding: 24px;
}

.compact-heading {
    align-items: start;
    margin-bottom: 16px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 38px 54px 1fr;
    gap: 12px;
    align-items: center;
    border-radius: 14px;
    padding: 8px;
    background: rgba(2, 6, 23, 0.34);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: #111827;
    font-weight: 900;
    background: #fbbf24;
}

.rank-item img {
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    object-fit: cover;
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong,
.rank-copy em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 4px;
}

.page-main {
    padding: 42px 0 64px;
}

.page-hero {
    padding: clamp(32px, 5vw, 60px);
    overflow: hidden;
    position: relative;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -55% 40%;
    height: 260px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 70%);
    pointer-events: none;
}

.simple-hero h1,
.channel-hero h1 {
    font-size: clamp(40px, 5vw, 68px);
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 32px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    padding: 20px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
}

.empty-state {
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 18px;
    padding: 28px;
    color: #cbd5e1;
    text-align: center;
    background: rgba(15, 23, 42, 0.54);
}

.ranking-grid {
    display: grid;
    gap: 18px;
    margin-top: 32px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 122px 1fr;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
    background: var(--bg-card);
}

.ranking-card h2 {
    margin: 0;
    font-size: 24px;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.ranking-poster span {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

.ranking-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.large-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 760px;
    margin-top: 28px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 52px;
    isolation: isolate;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(28px) saturate(1.12);
    opacity: 0.34;
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.8) 58%, rgba(2, 6, 23, 1));
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumbs a {
    color: #fbbf24;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 58px);
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-copy h1 {
    font-size: clamp(38px, 5vw, 70px);
}

.player-section {
    margin-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.76));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-overlay button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 999px;
    padding: 16px 24px;
    color: #111827;
    background: #fbbf24;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 24px 70px rgba(245, 158, 11, 0.36);
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    background: #111827;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 34px;
}

.content-panel {
    padding: 28px;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    padding: 44px 0;
    background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1fr;
    gap: 30px;
}

.footer-brand {
    display: inline-flex;
    margin-bottom: 12px;
    color: #fbbf24;
    font-size: 22px;
    font-weight: 900;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.site-footer p,
.footer-links a {
    color: #94a3b8;
}

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

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

@media (max-width: 1100px) {
    .site-search {
        display: none;
    }

    .nav-links {
        justify-content: flex-end;
    }

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

    .split-section,
    .intro-panel,
    .filter-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 840px) {
    .header-inner {
        min-height: 68px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 14px;
        background: rgba(2, 6, 23, 0.98);
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: grid;
    }

    .nav-link {
        justify-content: center;
    }

    .brand-subtitle {
        display: none;
    }

    .hero-carousel,
    .hero-track {
        min-height: 740px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 44px 22px 92px;
        text-align: left;
    }

    .hero-media {
        width: min(64vw, 260px);
        justify-self: start;
        order: -1;
        transform: rotate(0);
    }

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .detail-content,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-overview-card,
    .ranking-card,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .overview-covers {
        grid-template-columns: repeat(6, 1fr);
    }
}

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

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

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

    .intro-panel,
    .section-block,
    .ranking-panel,
    .content-panel,
    .page-hero {
        padding: 20px;
        border-radius: 18px;
    }

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .detail-content,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .ranking-card {
        gap: 14px;
    }

    .ranking-poster {
        max-width: 190px;
    }
}
