:root {
    --bg: #f8fafc;
    --bg-soft: #eef4ff;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #dbeafe;
    --accent: #f97316;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #7c3aed);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.logo-text {
    font-size: 1.28rem;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 2px;
}

.hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 18%, rgba(37, 99, 235, 0.55), transparent 28%),
        radial-gradient(circle at 82% 22%, rgba(124, 58, 237, 0.42), transparent 34%),
        linear-gradient(135deg, #020617, #172554 54%, #111827);
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 56px 56px;
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 72px 0 86px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 430px);
    gap: 54px;
    align-items: center;
}

.hero-slide.is-active {
    display: grid;
    animation: fadeUp 0.65s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #bfdbfe;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    line-height: 1.08;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-one-line,
.detail-one-line {
    max-width: 760px;
    margin: 22px 0 0;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.78);
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e3a8a;
    background: var(--brand-soft);
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: var(--brand);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    background: var(--brand-dark);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.btn.full {
    width: 100%;
    margin-top: 18px;
}

.hero-poster,
.category-hero-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster::before,
.category-hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 52%, rgba(2, 6, 23, 0.72));
}

.hero-poster img,
.category-hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-poster:hover img,
.category-hero-poster:hover img {
    transform: scale(1.06);
}

.hero-dots {
    display: flex;
    gap: 10px;
    margin-top: 34px;
}

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.feature-strip,
.content-section,
.category-band {
    padding: 76px 0;
}

.bg-white {
    background: #ffffff;
}

.bg-soft,
.category-band {
    background: linear-gradient(180deg, #f8fafc, #eef4ff);
}

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

.stat-card {
    padding: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1;
}

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

.stat-icon,
.category-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), #7c3aed);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.12;
}

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

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand);
    font-weight: 800;
}

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

.category-chip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.category-chip span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    background: var(--brand);
}

.category-chip em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.86rem;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #f1f5f9);
}

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

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

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 2.4rem;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.rank-badge,
.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--accent);
    font-size: 0.75rem;
    font-weight: 900;
    box-shadow: 0 10px 18px rgba(249, 115, 22, 0.28);
}

.category-badge {
    left: auto;
    right: 10px;
    background: var(--brand);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.28);
}

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

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.movie-card h3 {
    min-height: 2.7em;
    margin: 8px 0 6px;
    font-size: 1rem;
    line-height: 1.35;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: 24px;
    background: #0f172a;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.ranking-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.ranking-head > span,
.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--brand);
    font-weight: 900;
}

.ranking-head h2 {
    margin: 0;
}

.ranking-head p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.66);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 50px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.rank-row img {
    grid-row: span 2;
    width: 50px;
    height: 66px;
    border-radius: 10px;
    object-fit: cover;
}

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

.rank-meta {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 75% 18%, rgba(37, 99, 235, 0.46), transparent 30%),
        linear-gradient(135deg, #020617, #172554 70%, #111827);
}

.compact-hero {
    padding: 76px 0;
}

.compact-hero p,
.category-hero p {
    max-width: 780px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.08rem;
}

.category-hero {
    padding: 66px 0;
}

.category-hero-inner {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 34px;
    align-items: center;
}

.category-hero-poster {
    max-width: 250px;
    justify-self: end;
}

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

.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    border-radius: 24px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    transition: transform 0.45s ease;
}

.category-overview-card:hover img {
    transform: scale(1.08);
}

.category-overview-body {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 22px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.category-overview-body h2 {
    margin: 14px 0 8px;
    font-size: 1.5rem;
}

.category-overview-body p {
    color: rgba(255, 255, 255, 0.78);
}

.category-overview-body strong {
    margin-top: 10px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-result {
    margin: 0 0 22px;
    color: var(--muted);
    font-weight: 800;
}

.detail-hero {
    padding: 54px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-main {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 36px;
    align-items: center;
}

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

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

.detail-copy h1 {
    max-width: 900px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0 0;
}

.detail-meta-grid div {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.detail-meta-grid dt {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.8rem;
}

.detail-meta-grid dd {
    margin: 5px 0 0;
    font-weight: 900;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.player-section {
    padding-top: 46px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    align-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.46), rgba(2, 6, 23, 0.74));
    cursor: pointer;
}

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

.player-play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 18px 44px rgba(37, 99, 235, 0.38);
    font-size: 2rem;
}

.player-status {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 3;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 0.86rem;
}

.text-panel {
    padding: 26px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 1.4rem;
}

.text-panel p {
    margin: 0;
    color: #334155;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 22px;
}

.site-footer {
    padding: 46px 0;
    color: rgba(255, 255, 255, 0.74);
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
}

.site-footer a:hover {
    color: #ffffff;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .ranking-panel {
        position: static;
    }

    .filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: #0f172a;
        box-shadow: var(--shadow);
    }

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

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

    .hero {
        min-height: auto;
    }

    .hero-slide,
    .category-hero-inner,
    .detail-main,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .category-hero-poster {
        max-width: 320px;
        justify-self: start;
        transform: none;
    }

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

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

    .detail-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero-inner {
        padding: 46px 0 58px;
    }

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

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

    .movie-card h3 {
        font-size: 0.92rem;
    }

    .category-chip-grid,
    .category-overview-grid,
    .filter-panel,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .feature-strip,
    .content-section,
    .category-band {
        padding: 52px 0;
    }

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