:root {
    color-scheme: dark;
    --bg: #030712;
    --bg-soft: #0f172a;
    --card: rgba(15, 23, 42, 0.82);
    --card-solid: #111827;
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --blue: #2563eb;
    --blue-soft: #60a5fa;
    --gold: #facc15;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
    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.22), transparent 34rem),
        linear-gradient(180deg, #030712 0%, #111827 48%, #030712 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

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

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

.logo-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--blue), #7c3aed);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.34);
}

.logo-text {
    font-size: 20px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu a {
    padding: 10px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-menu a:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 22px;
}

main {
    overflow: hidden;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.58fr);
    align-items: center;
    gap: 60px;
    padding: 86px max(32px, calc((100vw - 1180px) / 2)) 76px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.75s ease, transform 0.75s ease;
    pointer-events: none;
}

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

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--blue-soft);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    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: 5px 10px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    color: #bfdbfe;
    font-size: 12px;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.35);
}

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

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

.hero-cover {
    aspect-ratio: 2 / 3;
    width: min(360px, 100%);
    justify-self: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

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

.hero-dot.is-active {
    background: #ffffff;
}

.category-strip {
    width: min(1180px, calc(100% - 32px));
    margin: -32px auto 0;
    position: relative;
    z-index: 5;
    display: flex;
    gap: 10px;
    padding: 16px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.category-strip a {
    flex: 0 0 auto;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #dbeafe;
    font-weight: 700;
}

.filter-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px 150px;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    outline: none;
    background: rgba(3, 7, 18, 0.7);
    color: #ffffff;
    padding: 0 13px;
}

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

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.44);
    background: rgba(30, 41, 59, 0.86);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background-color: #0b1220;
    background-size: cover;
    background-position: center;
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(3, 7, 18, 0.82) 100%);
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.year-badge {
    right: 12px;
    padding: 6px 9px;
    background: rgba(15, 23, 42, 0.78);
    color: #e0f2fe;
}

.rank-badge {
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #facc15, #fb923c);
    color: #111827;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.9);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.45);
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
}

.movie-card-body p {
    min-height: 48px;
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #dbeafe;
    font-size: 13px;
}

.movie-meta span {
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.ranking-panel {
    width: 100%;
    max-width: none;
    padding: 76px max(32px, calc((100vw - 1180px) / 2));
    margin-top: 70px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(30, 64, 175, 0.22), rgba(15, 23, 42, 0.72));
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 24px;
}

.small-hero {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 780px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.category-overview {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 76px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.category-card {
    min-height: 340px;
    padding: 28px;
    display: flex;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 28px;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.category-card h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 900;
}

.category-card p {
    max-width: 580px;
    color: #dbeafe;
    line-height: 1.7;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.category-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0f2fe;
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 24px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #bfdbfe;
}

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

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

.detail-main,
.detail-side,
.story-panel,
.info-box {
    min-width: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12), rgba(3, 7, 18, 0.38));
    color: #ffffff;
    cursor: pointer;
}

.player-start span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
    font-size: 34px;
}

.player-start.is-hidden {
    display: none;
}

.story-panel,
.info-box {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
}

.story-panel h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.story-panel h2,
.info-box h2 {
    margin: 24px 0 12px;
    font-size: 24px;
    font-weight: 850;
}

.story-panel p {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.9;
}

.lead-text {
    margin-top: 18px;
    color: #dbeafe !important;
    font-size: 18px !important;
}

.detail-cover {
    display: block;
    aspect-ratio: 2 / 3;
    border: 1px solid var(--line);
    border-radius: 26px;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.info-box dl {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.info-box dl div {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.info-box dt {
    color: #94a3b8;
}

.info-box dd {
    margin: 0;
    color: #f8fafc;
}

.related-section {
    padding-bottom: 76px;
}

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

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.72);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 220px 220px;
    gap: 34px;
}

.site-footer p {
    max-width: 560px;
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 850;
}

.site-footer a:not(.logo) {
    display: block;
    margin-top: 9px;
    color: #cbd5e1;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    border-top: 1px solid var(--line);
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 980px) {
    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-menu {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 82px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(3, 7, 18, 0.96);
        box-shadow: var(--shadow);
    }

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

    .hero-carousel {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 100px;
        text-align: left;
    }

    .hero-cover {
        width: min(260px, 70vw);
        justify-self: start;
    }

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 240px 1fr;
        gap: 22px;
        align-items: start;
    }

    .info-box {
        margin-top: 0;
    }
}

@media (max-width: 640px) {
    .header-inner {
        height: 64px;
    }

    .logo-text {
        font-size: 17px;
    }

    .hero-carousel {
        min-height: 720px;
    }

    .hero-slide {
        padding-left: 18px;
        padding-right: 18px;
    }

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

    .category-strip,
    .filter-panel,
    .content-section,
    .page-hero,
    .category-overview,
    .detail-page,
    .footer-grid,
    .footer-bottom {
        width: calc(100% - 24px);
    }

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

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

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

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

    .movie-card-body p {
        font-size: 13px;
    }

    .ranking-panel {
        padding-left: 12px;
        padding-right: 12px;
    }

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

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