:root {
    --bg: #fafaf9;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --accent: #d97706;
    --accent-strong: #b45309;
    --accent-soft: #fef3c7;
    --earth-soft: #fdf8f6;
    --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, .10), 0 2px 4px -1px rgba(15, 23, 42, .06);
    --shadow-xl: 0 20px 40px rgba(15, 23, 42, .18);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
}

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

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

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(255, 255, 255, .88);
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 10px 24px rgba(217, 119, 6, .32);
    font-size: 14px;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    color: #475569;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--surface-soft);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 99px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .84) 0%, rgba(0, 0, 0, .54) 48%, rgba(0, 0, 0, .12) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: #fff;
    padding: 54px 0;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: .04em;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -.05em;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 22px;
    color: #e7e5e4;
    font-size: 19px;
}

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

.hero-meta span {
    color: #d6d3d1;
    font-size: 14px;
}

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

.hero-tags {
    margin: 20px 0 30px;
}

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 0;
    font-weight: 800;
    transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

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

.btn-primary {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 12px 24px rgba(217, 119, 6, .28);
}

.btn-primary:hover {
    background: var(--accent-strong);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
}

.btn-soft {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.btn.full {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background .2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, .24);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: #fbbf24;
}

.hero-search-wrap {
    position: relative;
    z-index: 3;
    margin-top: -36px;
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(18px);
}

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

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, .12);
}

.hero-search button {
    min-width: 120px;
    border: 0;
    border-radius: 16px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.section {
    padding: 72px 0 0;
}

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

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -.03em;
}

.section-heading p,
.page-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-more {
    white-space: nowrap;
    color: var(--accent-strong);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
    transition: transform .25s ease, box-shadow .25s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e2e8f0;
}

.movie-card-large .movie-poster {
    aspect-ratio: 16 / 11;
}

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

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

.movie-rating,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    background: rgba(217, 119, 6, .92);
    backdrop-filter: blur(10px);
}

.movie-rating {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: rgba(15, 23, 42, .78);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

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

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

.movie-meta {
    margin-bottom: 12px;
    color: #78716c;
    font-size: 13px;
}

.tag-row span {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.feature-band {
    padding: 72px 0;
    background: linear-gradient(135deg, var(--accent-soft), var(--earth-soft));
}

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

.category-tile,
.category-card {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.category-tile {
    padding: 20px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.category-tile span,
.category-card h2 {
    font-size: 20px;
    font-weight: 900;
}

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

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.category-thumbs img {
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 28px;
    align-items: start;
    padding-bottom: 72px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform .2s ease, box-shadow .2s ease;
}

.compact-card:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-xl);
}

.compact-card img {
    width: 74px;
    height: 94px;
    border-radius: 14px;
    object-fit: cover;
}

.compact-card strong {
    display: block;
    margin-bottom: 6px;
}

.compact-card small {
    color: var(--muted);
}

.compact-rank {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-weight: 900;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.small-heading {
    align-items: center;
    margin-bottom: 18px;
}

.small-heading h2 {
    font-size: 30px;
}

.site-footer {
    padding: 42px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    margin: 8px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

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

.page-main {
    padding: 34px 0 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--accent-strong);
    font-weight: 800;
}

.breadcrumb a::after {
    content: "/";
    margin-left: 8px;
    color: #cbd5e1;
}

.page-hero {
    overflow: hidden;
    margin-bottom: 32px;
    padding: 42px;
    border-radius: 30px;
    background: linear-gradient(135deg, #fff, #fdf8f6 55%, #fef3c7);
    box-shadow: var(--shadow-card);
}

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

.category-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    overflow: hidden;
}

.category-card-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 8px;
    background: #0f172a;
}

.category-card-cover img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
}

.category-card-body {
    padding: 24px;
}

.category-card-body h2 {
    margin: 0;
}

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

.category-sample-links a {
    border-radius: 999px;
    padding: 6px 10px;
    color: #475569;
    background: #f1f5f9;
    font-size: 13px;
}

.filter-panel {
    position: relative;
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.filter-panel label span {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

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

.filter-empty {
    margin: 0;
    color: var(--muted);
}

.catalog-section {
    padding-top: 0;
}

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

.detail-primary {
    display: grid;
    gap: 22px;
}

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

.player-video,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-video {
    object-fit: contain;
    background: #000;
}

.player-cover {
    z-index: 4;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #fff;
    background: #000;
}

.player-cover[hidden] {
    display: none;
}

.player-cover img {
    object-fit: cover;
    opacity: .72;
}

.player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: #fff;
    background: rgba(217, 119, 6, .92);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .32);
    font-size: 34px;
}

.detail-card,
.side-card {
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.12;
    letter-spacing: -.04em;
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    color: #475569;
    background: #f1f5f9;
    font-size: 14px;
    font-weight: 800;
}

.detail-tags {
    margin: 20px 0 26px;
}

.detail-tags a,
.topic-tags span {
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font-size: 14px;
    font-weight: 800;
}

.detail-card section {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 20px;
    color: #334155;
    font-size: 17px;
}

.topic-tags {
    margin-top: 20px;
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
}

.side-poster img {
    width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow-card);
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    margin: 0 0 22px;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    font-weight: 800;
}

[data-card][hidden] {
    display: none;
}

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

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }
}

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

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

    .site-nav {
        position: absolute;
        top: 72px;
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: #fff;
        box-shadow: var(--shadow-xl);
    }

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

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

    .hero-carousel {
        min-height: 560px;
        height: 78vh;
    }

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

    .hero-copy p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

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

    .section {
        padding-top: 48px;
    }

    .section-heading {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 12px;
    }

    .movie-grid,
    .category-grid,
    .category-list-grid,
    .filter-selects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-card {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 28px;
        border-radius: 24px;
    }

    .footer-inner {
        display: grid;
    }
}

@media (max-width: 560px) {
    .brand {
        font-size: 18px;
    }

    .movie-grid,
    .category-grid,
    .category-list-grid,
    .filter-selects {
        grid-template-columns: 1fr;
    }

    .hero-meta,
    .detail-meta {
        gap: 8px;
    }

    .compact-card {
        grid-template-columns: auto 66px 1fr;
    }

    .compact-card img {
        width: 66px;
        height: 86px;
    }

    .detail-card,
    .side-card {
        padding: 22px;
    }

    .player-play {
        width: 68px;
        height: 68px;
        font-size: 27px;
    }
}
