:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --gold: #facc15;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
    color: var(--slate-800);
    min-height: 100vh;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--slate-200);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.28);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--slate-200);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

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

.site-nav a {
    color: var(--slate-300);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--white);
    transform: translateY(-1px);
}

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

.top-search input,
.filter-input,
.filter-select {
    border: 0;
    outline: none;
    border-radius: 12px;
    background: var(--white);
    color: var(--slate-800);
    padding: 12px 14px;
    box-shadow: inset 0 0 0 1px var(--slate-200);
}

.top-search input {
    width: 230px;
    background: rgba(51, 65, 85, 0.95);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.top-search input::placeholder {
    color: var(--slate-400);
}

.top-search button,
.btn,
.ghost-btn {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button,
.btn {
    background: var(--slate-700);
    color: var(--white);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.top-search button:hover,
.btn:hover {
    background: var(--slate-600);
    transform: translateY(-1px);
}

.ghost-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: 28px;
}

.hero {
    position: relative;
    height: min(72vh, 760px);
    min-height: 520px;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    filter: saturate(1.05) contrast(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: inherit;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(700px, 100%);
    color: var(--white);
    padding: 72px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--slate-200);
    font-weight: 800;
}

.eyebrow::before {
    content: "";
    width: 34px;
    height: 3px;
    border-radius: 999px;
    background: var(--gold);
}

.hero h1,
.page-hero h1 {
    margin: 0 0 18px;
    color: var(--white);
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 24px;
    color: var(--slate-200);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-meta,
.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 30px;
}

.hero-meta span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--slate-100);
    font-size: 14px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
    padding: 68px 0;
}

.section-tint {
    background: linear-gradient(90deg, var(--slate-100), var(--slate-200));
}

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

.section-title {
    margin: 0;
    color: var(--slate-800);
    font-size: clamp(26px, 3.2vw, 38px);
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--slate-500);
    line-height: 1.7;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    min-width: 0;
}

.card-link,
.wide-link {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover,
.wide-link:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-box {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--slate-200);
}

.wide-link {
    display: flex;
    min-height: 180px;
}

.wide-poster {
    position: relative;
    width: 34%;
    flex: 0 0 34%;
    overflow: hidden;
    background: var(--slate-200);
}

.poster-box::after,
.wide-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.72));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card-link:hover .poster-box::after,
.wide-link:hover .wide-poster::after {
    opacity: 1;
}

.poster-box img,
.wide-poster img,
.related-poster img {
    transition: transform 0.5s ease;
}

.card-link:hover img,
.wide-link:hover img,
.related-item:hover img {
    transform: scale(1.08);
}

.year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.card-body,
.wide-body {
    display: block;
    padding: 16px;
}

.card-body strong,
.wide-body strong,
.related-copy strong {
    display: block;
    color: var(--slate-800);
    font-size: 17px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-body span,
.wide-body span,
.related-copy em {
    display: block;
    margin-top: 8px;
    color: var(--slate-500);
    font-style: normal;
    font-size: 13px;
    line-height: 1.5;
}

.wide-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
}

.wide-body em {
    display: -webkit-box;
    margin: 12px 0 8px;
    color: var(--slate-600);
    font-style: normal;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card,
.region-card {
    position: relative;
    overflow: hidden;
    min-height: 136px;
    border-radius: 20px;
    padding: 24px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.category-card:hover,
.region-card:hover {
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-700), var(--slate-950));
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-card strong,
.region-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 12px;
}

.category-card span,
.region-card span {
    display: block;
    color: var(--slate-500);
    line-height: 1.6;
}

.category-card:hover span,
.region-card:hover span {
    color: var(--slate-300);
}

.ranking-list {
    display: grid;
    gap: 12px;
    counter-reset: rank;
}

.rank-item {
    counter-increment: rank;
    display: grid;
    grid-template-columns: 54px 86px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.rank-number::before {
    content: counter(rank);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--slate-900);
    color: var(--white);
    font-size: 18px;
    font-weight: 900;
}

.rank-thumb {
    width: 86px;
    height: 112px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--slate-200);
}

.rank-copy strong {
    display: block;
    color: var(--slate-800);
    font-size: 18px;
    margin-bottom: 8px;
}

.rank-copy span,
.rank-extra {
    color: var(--slate-500);
    line-height: 1.6;
}

.page-hero {
    padding: 72px 0;
    background: radial-gradient(circle at 25% 20%, rgba(148, 163, 184, 0.24), transparent 35%), linear-gradient(135deg, var(--slate-800), var(--slate-950));
    color: var(--white);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-300);
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px 160px;
    gap: 14px;
    padding: 18px;
    margin: 26px 0 30px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
}

.empty-state {
    display: none;
    padding: 44px;
    border-radius: 20px;
    background: var(--white);
    color: var(--slate-500);
    text-align: center;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.empty-state.is-visible {
    display: block;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 24px;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--slate-800);
}

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

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--slate-950);
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78));
}

.player-shell.is-playing .player-cover {
    display: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28), 0 20px 40px rgba(0, 0, 0, 0.28);
    font-size: 32px;
}

.content-card,
.side-card {
    margin-top: 24px;
    padding: 28px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
}

.content-card h1 {
    margin: 0 0 18px;
    color: var(--slate-800);
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.03em;
}

.content-card h2,
.side-card h2 {
    margin: 28px 0 14px;
    color: var(--slate-800);
    font-size: 22px;
}

.content-card p {
    color: var(--slate-600);
    line-height: 1.9;
    font-size: 16px;
}

.content-card .lead {
    color: var(--slate-700);
    font-size: 18px;
    font-weight: 700;
}

.meta-row {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--slate-200);
    margin-bottom: 20px;
}

.meta-row span {
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--slate-100);
    color: var(--slate-700);
    font-weight: 700;
    font-size: 14px;
}

.content-card .tag {
    background: var(--slate-100);
    color: var(--slate-700);
    box-shadow: none;
}

.side-card {
    position: sticky;
    top: 96px;
    margin-top: 0;
}

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

.related-item {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: var(--slate-50);
}

.related-poster {
    height: 110px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--slate-200);
}

.related-copy {
    min-width: 0;
    align-self: center;
}

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 30px;
}

.category-strip a {
    border-radius: 999px;
    padding: 9px 13px;
    background: var(--white);
    color: var(--slate-600);
    font-weight: 800;
    box-shadow: inset 0 0 0 1px var(--slate-200);
    transition: background 0.2s ease, color 0.2s ease;
}

.category-strip a:hover,
.category-strip a.active {
    background: var(--slate-800);
    color: var(--white);
}

.site-footer {
    margin-top: 60px;
    padding: 54px 0;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
    color: var(--slate-300);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.footer-grid p {
    max-width: 360px;
    color: var(--slate-400);
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 9px 0;
    color: var(--slate-400);
}

.footer-grid a:hover {
    color: var(--white);
}

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

    .grid-large,
    .grid-wide,
    .category-grid,
    .footer-grid,
    .detail-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .side-card {
        position: static;
    }

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

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 14px;
        padding: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        order: 4;
        width: 100%;
        margin-left: 0;
        padding: 12px 0 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        flex-direction: column;
        align-items: flex-start;
    }

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

    .top-search {
        order: 3;
        width: 100%;
    }

    .top-search input {
        flex: 1;
        width: auto;
    }

    .hero {
        min-height: 600px;
    }

    .hero-slide::after {
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.92));
    }

    .grid-large,
    .grid-wide,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 44px 74px 1fr;
    }

    .rank-extra {
        display: none;
    }

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

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

    .brand {
        font-size: 20px;
    }

    .hero-copy {
        padding: 56px 0;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .section {
        padding: 46px 0;
    }

    .wide-link {
        min-height: 150px;
    }

    .content-card,
    .side-card {
        padding: 20px;
        border-radius: 18px;
    }
}
