:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(34, 211, 238, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #3b82f6;
    --yellow: #facc15;
    --danger: #fb7185;
    --shadow: 0 24px 60px rgba(8, 47, 73, 0.32);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.36);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    font-weight: 900;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.32);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    background: linear-gradient(90deg, var(--cyan), #93c5fd, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

.main-nav a {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: var(--cyan);
    transform: translateY(-1px);
}

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

main {
    padding-top: 72px;
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06);
}

.hero-bg::after,
.detail-backdrop::after,
.hero-slide.image-missing .hero-bg::after,
.detail-backdrop.image-missing::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.86)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.35) 48%, rgba(2, 6, 23, 0.76) 100%);
}

.image-missing {
    background:
        radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.28), transparent 34%),
        linear-gradient(135deg, #0f172a, #020617 64%, #082f49);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 78vh;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: end;
    gap: 56px;
    padding-top: 80px;
    padding-bottom: 86px;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-copy p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: 17px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.rank-info span,
.poster-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.5);
    color: #bae6fd;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    color: white;
    box-shadow: 0 18px 36px rgba(6, 182, 212, 0.24);
}

.btn-ghost {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
}

.hero-poster,
.detail-poster {
    align-self: end;
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.hero-controls {
    position: absolute;
    right: min(6vw, 72px);
    bottom: 46px;
    z-index: 4;
    display: flex;
    gap: 12px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: white;
    font-size: 28px;
    line-height: 1;
    backdrop-filter: blur(12px);
}

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

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

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

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -40px;
    position: relative;
    z-index: 5;
}

.stats-strip div,
.category-card,
.prose-panel,
.filter-panel,
.player-card,
.rank-row {
    border: 1px solid rgba(34, 211, 238, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.72));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stats-strip div {
    padding: 24px;
    text-align: center;
}

.stats-strip strong {
    display: block;
    font-size: 34px;
    color: white;
}

.stats-strip span {
    color: var(--muted);
    font-weight: 700;
}

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

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.1;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.26);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.42);
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(8, 47, 73, 0.35);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(10px);
}

.play-float {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.92);
    color: #02101b;
    font-weight: 900;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-float {
    opacity: 1;
    transform: translateY(0);
}

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

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

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

.movie-card p {
    min-height: 66px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

.filter-panel {
    padding: 18px;
    margin-bottom: 24px;
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box input {
    width: 100%;
    min-height: 50px;
    padding: 0 48px 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    outline: none;
    background: rgba(2, 6, 23, 0.62);
    color: var(--text);
}

.search-box input:focus {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.search-box span {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: var(--cyan);
    font-size: 24px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.filter-group button {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #cbd5e1;
    padding: 8px 14px;
    cursor: pointer;
}

.filter-group button.is-active,
.filter-group button:hover {
    border-color: rgba(34, 211, 238, 0.6);
    background: rgba(8, 145, 178, 0.24);
    color: var(--cyan);
}

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

.page-main {
    padding-top: 100px;
}

.page-hero {
    padding: 56px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.22), transparent 28%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
    box-shadow: var(--shadow);
}

.small-hero h1 {
    font-size: clamp(32px, 5vw, 58px);
}

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

.category-card {
    min-height: 150px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.5);
}

.category-card span {
    display: block;
    color: var(--text);
    font-size: 20px;
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin: 10px 0;
    color: var(--cyan);
    font-size: 34px;
}

.category-card em {
    color: var(--muted);
    font-style: normal;
}

.detail-main {
    padding-top: 72px;
}

.detail-hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: end;
    gap: 42px;
    padding-top: 120px;
    padding-bottom: 72px;
}

.detail-copy h1 {
    font-size: clamp(34px, 6vw, 64px);
}

.player-section {
    margin-top: -36px;
    position: relative;
    z-index: 4;
}

.player-card {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 24px;
    padding: 20px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.big-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.94);
    color: #00111a;
    font-size: 28px;
    font-weight: 900;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 50px rgba(34, 211, 238, 0.32);
}

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

.player-status {
    position: absolute;
    left: 16px;
    bottom: 12px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #cbd5e1;
    font-size: 12px;
}

.player-side {
    padding: 12px;
}

.player-side h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.player-side p {
    color: var(--muted);
}

.detail-content {
    padding-top: 40px;
}

.prose-panel {
    padding: 28px;
}

.prose-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.prose-panel h2:not(:first-child) {
    margin-top: 32px;
}

.prose-panel p {
    margin: 0;
    color: #cbd5e1;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 60px 88px minmax(0, 1fr) 70px;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-number {
    color: var(--cyan);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

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

.rank-info h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
}

.rank-info div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-score {
    color: var(--yellow);
    font-size: 24px;
    text-align: right;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 26px;
    padding: 44px 0;
}

.footer-brand {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 12px;
}

.site-footer p,
.site-footer a {
    display: block;
    margin: 8px 0 0;
    color: var(--muted);
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

[data-movie-list] [hidden] {
    display: none !important;
}

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

@media (max-width: 880px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 12px;
        border-radius: 12px;
    }

    .hero-content,
    .detail-hero-inner,
    .player-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

    .detail-poster {
        max-width: 260px;
    }
}

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

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

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

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.03em;
    }

    .hero-controls {
        right: 14px;
        bottom: 24px;
    }

    .stats-strip,
    .category-grid,
    .movie-grid,
    .featured-grid,
    .all-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .page-hero {
        padding: 28px;
    }

    .rank-row {
        grid-template-columns: 42px 70px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .featured-grid,
    .all-grid {
        grid-template-columns: 1fr;
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }
}
