:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(34, 211, 238, 0.32);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --amber: #f59e0b;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
    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(6, 182, 212, 0.2), transparent 34rem),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.13), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    max-width: 100%;
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #00111a;
    background: linear-gradient(135deg, #22d3ee, #f59e0b);
    box-shadow: 0 12px 36px rgba(34, 211, 238, 0.25);
}

.brand-name {
    font-size: 1.14rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--soft);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

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

.hero {
    position: relative;
    min-height: 640px;
    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.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    filter: saturate(1.08) brightness(0.64);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.05) 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 0 140px;
}

.hero-kicker,
.detail-kicker,
.page-hero p,
.section-heading p {
    color: var(--cyan);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 16px 0;
    font-size: clamp(2.8rem, 8vw, 6.5rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    color: var(--soft);
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.16);
    font-size: 0.78rem;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #00111a;
    background: linear-gradient(135deg, #22d3ee, #f59e0b);
    box-shadow: 0 20px 45px rgba(34, 211, 238, 0.22);
}

.ghost-button {
    border: 1px solid var(--line-strong);
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.74);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 116px;
    width: min(1240px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 42px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(226, 232, 240, 0.3);
}

.hero-dot.is-active {
    background: var(--cyan);
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    width: min(900px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.hero-search input,
.catalog-tools input,
.catalog-tools select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    outline: 0;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
}

.hero-search input {
    padding: 0 18px;
}

.hero-search button {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 16px;
    color: #00111a;
    background: var(--cyan);
    font-weight: 900;
}

.page-shell,
.detail-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    margin: 72px auto;
}

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--cyan);
    font-weight: 800;
}

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

.category-tile,
.category-panel {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.55));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile {
    padding: 22px;
}

.category-tile:hover,
.category-panel:hover {
    transform: translateY(-5px);
    border-color: var(--line-strong);
}

.category-tile strong,
.category-panel span {
    display: block;
    margin-bottom: 12px;
    font-size: 1.15rem;
    color: var(--text);
}

.category-tile span,
.category-panel strong {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.7;
    font-weight: 500;
}

.category-panel {
    min-height: 230px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    filter: saturate(1.1) brightness(0.72);
}

.category-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.2));
}

.category-panel span,
.category-panel strong {
    position: relative;
    z-index: 2;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 26px 70px rgba(8, 145, 178, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 40%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.rank-badge,
.list-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #00111a;
    background: linear-gradient(135deg, #22d3ee, #f59e0b);
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 36px;
    height: 36px;
}

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

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

.movie-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.06rem;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--cyan);
}

.movie-card p {
    min-height: 3.1em;
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.tag-row span {
    min-height: 24px;
    padding: 0 9px;
    font-size: 0.72rem;
}

.split-layout,
.ranking-section {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 64px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: var(--line-strong);
}

.list-rank {
    width: 32px;
    height: 32px;
    font-size: 0.88rem;
}

.rank-row img {
    width: 64px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-row strong,
.rank-row em {
    display: block;
}

.rank-row strong {
    color: var(--text);
    line-height: 1.35;
}

.rank-row em {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.8rem;
    font-style: normal;
    line-height: 1.5;
}

.spotlight-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.spotlight-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.spotlight-card div {
    padding: 24px;
}

.spotlight-card span {
    color: var(--cyan);
    font-weight: 800;
}

.spotlight-card h3 {
    margin: 12px 0;
    font-size: 1.6rem;
}

.spotlight-card p {
    color: var(--muted);
    line-height: 1.8;
}

.page-hero {
    margin: 52px 0 36px;
    padding: clamp(36px, 7vw, 72px);
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 32rem),
        linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.46));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 850px;
    margin: 10px 0 16px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.page-hero span {
    display: block;
    max-width: 820px;
    color: var(--soft);
    font-size: 1.05rem;
    line-height: 1.8;
}

.catalog-tools {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
}

.catalog-tools label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.catalog-tools input,
.catalog-tools select {
    padding: 0 14px;
}

.empty-state {
    margin-top: 28px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 34px 0 20px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.detail-hero {
    position: relative;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    align-items: center;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.55)),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 30rem);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
    margin: 12px 0 18px;
    font-size: clamp(2.3rem, 6vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 820px;
    color: var(--soft);
    font-size: 1.12rem;
    line-height: 1.9;
}

.detail-tags {
    margin: 26px 0 30px;
}

.player-section {
    margin: 42px 0;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.7));
    transition: opacity 0.24s ease;
}

.video-frame.is-playing .play-layer {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22d3ee, #f59e0b);
    clip-path: polygon(28% 18%, 28% 82%, 82% 50%);
    box-shadow: 0 20px 50px rgba(34, 211, 238, 0.28);
}

.play-layer strong {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

.detail-copy {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.detail-copy article,
.movie-fields {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-copy article {
    padding: 28px;
}

.detail-copy h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.detail-copy p {
    margin: 0;
    color: var(--soft);
    font-size: 1rem;
    line-height: 2;
}

.movie-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
}

.movie-fields div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.movie-fields dt {
    color: var(--muted);
}

.movie-fields dd {
    margin: 0;
    color: var(--text);
}

.related-section {
    margin-bottom: 88px;
}

.sticky-rank {
    position: sticky;
    top: 96px;
}

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

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    min-height: 120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    color: var(--text);
}

.footer-inner p {
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

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

[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .category-grid,
    .category-panel-grid,
    .dense-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .split-layout,
    .ranking-section {
        grid-template-columns: 1fr;
    }

    .sticky-rank {
        position: static;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 170px;
    }

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

    .hero-dots {
        bottom: 150px;
    }

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

    .catalog-tools {
        grid-template-columns: 1fr;
    }

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

    .detail-cover {
        max-width: 320px;
    }

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

@media (max-width: 620px) {
    .category-grid,
    .category-panel-grid,
    .movie-grid,
    .dense-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

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

    .movie-card p {
        display: none;
    }

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

    .rank-row {
        grid-template-columns: auto 56px 1fr;
    }

    .rank-row img {
        width: 56px;
        height: 78px;
    }
}
