:root {
    --color-blue-950: #0f244a;
    --color-blue-900: #1e3a8a;
    --color-blue-700: #1d4ed8;
    --color-blue-600: #2563eb;
    --color-blue-100: #dbeafe;
    --color-slate-950: #020617;
    --color-slate-900: #0f172a;
    --color-slate-700: #334155;
    --color-slate-600: #475569;
    --color-slate-200: #e2e8f0;
    --color-slate-100: #f1f5f9;
    --color-white: #ffffff;
    --shadow-card: 0 20px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 12px 28px rgba(37, 99, 235, 0.20);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding-top: 76px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-slate-900);
    background: #f8fafc;
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    backdrop-filter: blur(16px);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.site-header-inner {
    width: min(100% - 32px, var(--container));
    height: 76px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-blue-700), #38bdf8);
    box-shadow: var(--shadow-soft);
    font-size: 15px;
}

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

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--color-slate-700);
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--color-blue-700);
    background: var(--color-blue-100);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
}

.top-search input,
.search-page-form input,
.filter-search input {
    width: 100%;
    border: 1px solid var(--color-slate-200);
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    background: #ffffff;
    color: var(--color-slate-900);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.search-page-form input:focus,
.filter-search input:focus {
    border-color: var(--color-blue-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.top-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--color-white);
    background: var(--color-blue-600);
    cursor: pointer;
    font-weight: 800;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-slate-900);
    border-radius: 999px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--color-blue-950);
}

.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-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.03);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 30%, rgba(96, 165, 250, 0.36), transparent 36%), linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.60));
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: min(100% - 32px, var(--container));
    min-height: 620px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 48px;
    align-items: center;
}

.hero-copy {
    color: var(--color-white);
    max-width: 760px;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 14px;
    color: #93c5fd;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

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

.hero-copy h2 {
    font-size: clamp(28px, 4vw, 48px);
    color: #dbeafe;
}

.hero-lead {
    max-width: 720px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    font-size: 14px;
    font-weight: 800;
}

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

.button-primary,
.button-ghost,
.section-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button-primary {
    padding: 13px 22px;
    color: var(--color-blue-950);
    background: var(--color-white);
    box-shadow: var(--shadow-soft);
}

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

.button-ghost {
    padding: 12px 20px;
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.small-actions .button-primary {
    color: var(--color-white);
    background: var(--color-blue-600);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.45);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 24px;
    z-index: 1;
}

.hero-poster img,
.detail-poster img,
.card-cover img,
.rank-cover img,
.category-thumbs img,
.category-cover-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--color-white);
}

.stat-strip {
    background: #ffffff;
    border-bottom: 1px solid var(--color-slate-200);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-block: 28px;
}

.stat-grid article {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid var(--color-slate-200);
}

.stat-grid strong {
    display: block;
    color: var(--color-blue-700);
    font-size: 22px;
    font-weight: 900;
}

.stat-grid span {
    color: var(--color-slate-600);
}

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

.light-section {
    background: var(--color-slate-100);
}

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

.section-head h2,
.simple-hero h1,
.category-hero h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--color-slate-600);
    line-height: 1.7;
}

.section-link,
.text-link {
    color: var(--color-blue-700);
    background: #ffffff;
    border: 1px solid var(--color-slate-200);
    padding: 10px 16px;
}

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

.category-card,
.category-overview-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    border: 1px solid var(--color-slate-200);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.15);
}

.category-thumbs,
.category-cover-strip {
    height: 130px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow: hidden;
    border-radius: 18px;
}

.category-cover-strip {
    grid-template-columns: repeat(4, 1fr);
    height: 180px;
}

.category-card p,
.category-overview-card p {
    margin: 0 0 6px;
    color: var(--color-blue-700);
    font-size: 13px;
    font-weight: 900;
}

.category-card h3,
.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-card span,
.category-overview-card span {
    color: var(--color-slate-600);
    line-height: 1.7;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-samples a {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--color-slate-100);
    color: var(--color-slate-700);
    font-size: 13px;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-xl);
    display: grid;
    grid-template-columns: minmax(220px, 360px) 1fr;
    gap: 18px;
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--color-slate-200);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chips button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--color-slate-700);
    background: var(--color-slate-100);
    cursor: pointer;
    font-weight: 800;
}

.filter-chips button.is-active,
.filter-chips button:hover {
    color: #ffffff;
    background: var(--color-blue-600);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #ffffff;
    border: 1px solid var(--color-slate-200);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card[hidden],
.ranking-item[hidden] {
    display: none;
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--color-slate-200);
}

.card-cover img {
    transition: transform 0.35s ease;
}

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

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

.card-meta {
    gap: 8px;
    color: var(--color-blue-700);
    font-size: 13px;
    font-weight: 800;
}

.card-title {
    min-height: 48px;
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.card-title a:hover,
.rank-content h3 a:hover,
.breadcrumb a:hover {
    color: var(--color-blue-700);
}

.card-text {
    margin: 0 0 12px;
    min-height: 58px;
    color: var(--color-slate-600);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-tags span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--color-blue-100);
    color: var(--color-blue-700);
    font-size: 12px;
    font-weight: 800;
}

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

.compact-ranking {
    grid-template-columns: repeat(2, 1fr);
}

.ranking-item {
    display: grid;
    grid-template-columns: 56px 96px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--color-slate-200);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.rank-number {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-blue-700), #38bdf8);
    font-weight: 900;
}

.rank-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--color-slate-200);
}

.rank-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
}

.rank-content p {
    margin: 0 0 10px;
    color: var(--color-slate-600);
    line-height: 1.6;
}

.rank-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--color-slate-700);
    background: var(--color-slate-100);
    font-size: 12px;
    font-weight: 800;
}

.page-hero {
    position: relative;
    padding: 88px 0 72px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-blue-950), var(--color-blue-700));
}

.simple-hero::before,
.category-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 24%, rgba(147, 197, 253, 0.30), transparent 32%);
}

.simple-hero .container,
.category-hero .container {
    position: relative;
    z-index: 1;
}

.simple-hero p,
.category-hero p {
    max-width: 780px;
    color: #dbeafe;
    line-height: 1.8;
    font-size: 18px;
}

.category-hero {
    background-position: center;
    background-size: cover;
}

.search-page-form {
    display: flex;
    gap: 10px;
    max-width: 620px;
    margin-top: 28px;
}

.detail-hero {
    position: relative;
    padding: 72px 0;
    background-position: center;
    background-size: cover;
    color: #ffffff;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.76));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #dbeafe;
    font-weight: 800;
}

.detail-copy h1 {
    margin: 0 0 18px;
    max-width: 820px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.detail-lead {
    max-width: 820px;
    margin: 22px 0 0;
    color: #e0f2fe;
    line-height: 1.85;
    font-size: 19px;
}

.player-section {
    background: #020617;
    color: #ffffff;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.40);
    aspect-ratio: 16 / 9;
}

.video-element {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.video-start {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 999px;
    padding: 16px 24px;
    color: var(--color-blue-950);
    background: #ffffff;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.video-start:hover {
    background: #eff6ff;
}

.video-shell.is-playing .video-start {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--color-blue-600);
}

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

.detail-main-text,
.detail-side {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    border: 1px solid var(--color-slate-200);
    box-shadow: var(--shadow-card);
}

.detail-main-text h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: 900;
}

.detail-main-text p {
    margin: 0 0 24px;
    color: var(--color-slate-700);
    font-size: 17px;
    line-height: 1.9;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px 16px;
    margin: 0;
}

.detail-side dt {
    color: var(--color-slate-600);
    font-weight: 900;
}

.detail-side dd {
    margin: 0;
    color: var(--color-slate-900);
}

.empty-text {
    margin: 30px 0 0;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    color: var(--color-slate-600);
    text-align: center;
    border: 1px solid var(--color-slate-200);
}

.site-footer {
    color: #cbd5e1;
    background: var(--color-slate-950);
}

.footer-inner {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.footer-logo {
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-brand p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a:hover {
    color: #93c5fd;
}

.footer-bottom {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .top-search {
        display: none;
    }

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

    .hero-inner {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 860px) {
    body {
        padding-top: 68px;
    }

    .site-header-inner {
        height: 68px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 22px;
        background: #ffffff;
        box-shadow: var(--shadow-card);
    }

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

    .site-nav a {
        padding: 12px 14px;
    }

    .hero-inner {
        min-height: 700px;
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 48px 0 72px;
    }

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

    .stat-grid,
    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .all-movie-grid,
    .compact-ranking {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-panel,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .container,
    .site-header-inner,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, var(--container));
    }

    .brand span:last-child {
        max-width: 164px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

    .hero-copy h1,
    .hero-copy h2 {
        letter-spacing: -0.04em;
    }

    .stat-grid,
    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .all-movie-grid {
        grid-template-columns: 1fr;
    }

    .section-head,
    .search-page-form {
        flex-direction: column;
        align-items: stretch;
    }

    .ranking-item {
        grid-template-columns: 42px 76px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 13px;
    }

    .rank-content p {
        display: none;
    }

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

    .detail-poster {
        width: min(240px, 72vw);
    }

    .video-shell {
        border-radius: 18px;
    }
}
