:root {
    --bg: #030712;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --blue: #2563eb;
    --cyan: #38bdf8;
    --purple: #8b5cf6;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 34rem),
        radial-gradient(circle at 80% 12%, rgba(139, 92, 246, 0.22), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    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 {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.section-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.72);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 14px 38px rgba(37, 99, 235, 0.42);
}

.brand-text {
    font-size: 19px;
}

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

.nav-link {
    padding: 10px 14px;
    color: #cbd5e1;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.24);
}

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

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

.hero {
    position: relative;
    min-height: 82vh;
    padding-top: 68px;
    overflow: hidden;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transform: scale(1.04);
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 46%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 44%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding-top: 70px;
}

.hero-copy {
    max-width: 720px;
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.32));
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #93c5fd;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 16px 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    border: 1px solid rgba(147, 197, 253, 0.28);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    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(--blue), var(--cyan));
    color: white;
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.38);
}

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

.text-link {
    color: #93c5fd;
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 132px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--text);
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.42);
}

.hero-dot.active {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.hero-thumbs {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.hero-thumb {
    min-width: 0;
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(12px);
}

.hero-thumb img {
    width: 56px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-thumb span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 800;
}

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

.section-block {
    padding: 54px 0;
}

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

.section-heading h2,
.small-hero h1,
.detail-info h1,
.prose-block h2 {
    margin: 6px 0 0;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 42px);
}

.section-heading a {
    color: #93c5fd;
    font-weight: 800;
}

.compact-heading {
    margin-bottom: 18px;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.58));
    box-shadow: 0 18px 56px 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: rgba(96, 165, 250, 0.46);
    box-shadow: 0 26px 70px rgba(37, 99, 235, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.96));
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0) 54%);
}

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.92);
    color: white;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.38);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 42px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
    color: white;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 800;
}

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

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

.movie-card.compact .poster-link {
    aspect-ratio: 16 / 10;
}

.movie-card.compact .card-body h3 {
    font-size: 16px;
}

.movie-card.compact .card-body p {
    min-height: 40px;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

.split-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

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

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

.category-card {
    min-height: 148px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.28), transparent 54%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.62));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.5);
}

.category-card span {
    display: block;
    margin-bottom: 10px;
    font-size: 21px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

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

.rank-line {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
}

.rank-line:hover {
    background: rgba(37, 99, 235, 0.18);
}

.rank-number {
    color: #93c5fd;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.rank-year {
    color: var(--muted);
    font-size: 13px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 14px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
}

.search-box {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.search-box input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
    padding: 0 14px;
}

.filter-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

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

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

.small-hero,
.detail-hero {
    padding: 46px 0 18px;
}

.small-hero h1 {
    font-size: clamp(34px, 6vw, 62px);
}

.small-hero p {
    max-width: 780px;
    color: var(--muted);
    font-size: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 34px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 48%),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.96));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
}

.detail-line {
    max-width: 780px;
    color: #dbeafe;
    font-size: 19px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #bfdbfe;
}

.detail-tags {
    margin-top: 8px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: #93c5fd;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.74));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
    font-size: 32px;
}

.play-layer strong {
    font-size: 20px;
}

.prose-block {
    color: #dbeafe;
}

.prose-block h2 {
    font-size: 28px;
}

.prose-block p {
    margin: 12px 0 28px;
    color: #cbd5e1;
    font-size: 17px;
}

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

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.62);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 420px);
    gap: 28px;
    padding: 36px 0;
}

.footer-grid strong {
    font-size: 22px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
    color: #cbd5e1;
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.image-missing {
    opacity: 0;
}

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

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

    .rank-panel {
        position: static;
    }

    .hero-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-thumb:nth-child(n+4) {
        display: none;
    }
}

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

    .site-nav {
        position: fixed;
        top: 76px;
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 22px;
        background: rgba(2, 6, 23, 0.94);
    }

    .site-nav.open {
        display: flex;
    }

    .nav-link {
        border-radius: 14px;
    }

    .hero {
        min-height: 760px;
    }

    .hero-copy {
        padding: 24px;
    }

    .hero-content {
        align-items: start;
        padding-top: 112px;
    }

    .hero-controls {
        bottom: 126px;
    }

    .hero-thumbs {
        grid-template-columns: 1fr;
        bottom: 24px;
    }

    .hero-thumb:nth-child(n+2) {
        display: none;
    }

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

    .section-heading {
        align-items: start;
    }

    .movie-grid,
    .related-grid,
    .category-grid,
    .category-grid.large {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .filter-selects {
        display: grid;
        grid-template-columns: 1fr;
    }

    .detail-layout {
        padding: 18px;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .related-grid,
    .category-grid,
    .category-grid.large {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .hero-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
