:root {
    --earth-950: #1c1712;
    --earth-900: #2a2118;
    --earth-850: #35291e;
    --earth-800: #403126;
    --earth-700: #584433;
    --earth-100: #eee4d8;
    --stone-950: #171717;
    --stone-900: #26211d;
    --stone-700: #57534e;
    --stone-600: #6b625a;
    --stone-300: #d6d3d1;
    --stone-200: #e7e5e4;
    --stone-100: #f5f1ec;
    --stone-50: #fbf8f3;
    --bronze-700: #7e5b39;
    --bronze-600: #98724c;
    --bronze-500: #b4875a;
    --bronze-400: #d0a374;
    --bronze-300: #e4c19a;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(42, 33, 24, 0.12);
    --shadow-card: 0 12px 30px rgba(42, 33, 24, 0.14);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--stone-900);
    background: var(--stone-50);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--stone-50);
    background: rgba(42, 33, 24, 0.96);
    box-shadow: 0 10px 30px rgba(28, 23, 18, 0.24);
    backdrop-filter: blur(16px);
}

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

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

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--earth-900);
    background: linear-gradient(135deg, var(--bronze-300), var(--bronze-500));
    box-shadow: 0 8px 20px rgba(180, 135, 90, 0.35);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
    font-weight: 650;
}

.site-nav a,
.mobile-panel a,
.site-logo,
.footer-logo,
.footer-grid a {
    transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.mobile-panel a:hover,
.site-logo:hover,
.footer-grid a:hover {
    color: var(--bronze-300);
}

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--stone-50);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid rgba(231, 229, 228, 0.16);
}

.mobile-panel.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: var(--white);
    background: var(--earth-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 35%, rgba(180, 135, 90, 0.2), transparent 36%),
        linear-gradient(90deg, rgba(28, 23, 18, 0.96) 0%, rgba(42, 33, 24, 0.84) 42%, rgba(42, 33, 24, 0.34) 100%),
        linear-gradient(0deg, rgba(28, 23, 18, 0.92), rgba(28, 23, 18, 0.18) 48%, rgba(28, 23, 18, 0.58));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    align-items: center;
    min-height: 680px;
    padding: 88px 0 70px;
}

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

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 13px;
    border-radius: 999px;
    color: var(--bronze-300);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(228, 193, 154, 0.28);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.06em;
}

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

.hero-title {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.1;
}

.hero-desc {
    max-width: 640px;
    margin: 0 0 26px;
    color: var(--stone-200);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: var(--stone-50);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.button,
.section-more,
.search-button,
.page-link,
.play-overlay {
    border: 0;
    cursor: pointer;
}

.button,
.section-more,
.search-button,
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button.primary,
.search-button,
.page-link.active {
    color: var(--white);
    background: var(--bronze-500);
    box-shadow: 0 12px 28px rgba(180, 135, 90, 0.34);
}

.button.secondary,
.section-more,
.page-link {
    color: var(--earth-900);
    background: var(--earth-100);
}

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

.button:hover,
.section-more:hover,
.search-button:hover,
.page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(42, 33, 24, 0.16);
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    width: min(720px, 100%);
    margin-top: 28px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(64, 49, 38, 0.12);
    border-radius: 13px;
    padding: 0 14px;
    outline: none;
    background: var(--white);
    color: var(--stone-900);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100vw - var(--container)) / 2));
    bottom: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

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

.hero-rail {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100vw - var(--container)) / 2));
    top: 136px;
    width: min(360px, calc(100% - 48px));
    display: grid;
    gap: 14px;
}

.focus-card {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 13px;
    padding: 12px;
    border-radius: 18px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
}

.focus-card img {
    width: 86px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.focus-card strong {
    display: block;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.focus-card span {
    color: var(--stone-200);
    font-size: 12px;
}

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

.content-section.alt {
    background: var(--stone-100);
}

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

.section-head h2,
.page-head h1 {
    margin: 0;
    color: var(--earth-900);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-head p {
    max-width: 740px;
    margin: 10px 0 0;
    color: var(--stone-600);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--earth-100);
}

.movie-card.compact .poster-link {
    aspect-ratio: 16 / 10;
}

.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);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(0deg, rgba(28, 23, 18, 0.72), transparent);
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(28, 23, 18, 0.72);
    backdrop-filter: blur(8px);
}

.year-badge {
    left: 12px;
}

.rank-badge {
    right: 12px;
    background: var(--bronze-500);
}

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

.movie-title {
    display: block;
    color: var(--earth-900);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-title:hover {
    color: var(--bronze-700);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 10px;
    color: var(--stone-600);
    font-size: 12px;
}

.movie-card-body p {
    min-height: 44px;
    margin: 0 0 14px;
    color: var(--stone-700);
    font-size: 14px;
}

.tag-row span,
.detail-tags span {
    color: var(--earth-800);
    background: var(--earth-100);
}

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

.category-card {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--white), var(--stone-100));
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0;
    color: var(--earth-900);
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--stone-600);
}

.category-card span {
    color: var(--bronze-700);
    font-weight: 850;
}

.page-hero {
    padding: 70px 0 54px;
    color: var(--white);
    background:
        radial-gradient(circle at 78% 10%, rgba(180, 135, 90, 0.26), transparent 32%),
        linear-gradient(135deg, var(--earth-950), var(--earth-800));
}

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

.breadcrumb a:hover {
    color: var(--bronze-300);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 0.7fr);
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.empty-state {
    display: none;
    padding: 48px;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--stone-600);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 120px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--bronze-400), var(--bronze-700));
}

.rank-row img {
    width: 120px;
    height: 72px;
    border-radius: 13px;
    object-fit: cover;
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 4px;
    color: var(--earth-900);
    font-size: 19px;
}

.rank-row p {
    margin: 0;
    color: var(--stone-600);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
    gap: 30px;
    padding: 48px 0 72px;
}

.detail-card,
.side-card {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-card {
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--white);
    background: radial-gradient(circle, rgba(28, 23, 18, 0.1), rgba(28, 23, 18, 0.72));
    font-weight: 850;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: var(--earth-900);
    background: var(--bronze-300);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
    font-size: 30px;
}

.detail-body {
    padding: 30px;
}

.detail-body h1 {
    margin: 0 0 12px;
    color: var(--earth-900);
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
    color: var(--stone-600);
    font-weight: 700;
}

.detail-copy {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.detail-copy h2 {
    margin: 0 0 8px;
    color: var(--earth-900);
    font-size: 24px;
}

.detail-copy p {
    margin: 0;
    color: var(--stone-700);
}

.side-card {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.side-card h2 {
    margin: 0 0 20px;
    color: var(--earth-900);
    font-size: 22px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 98px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 98px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.related-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--earth-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-item span {
    color: var(--stone-600);
    font-size: 12px;
}

.related-item:hover strong {
    color: var(--bronze-700);
}

.site-footer {
    color: var(--stone-200);
    background: var(--earth-950);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-grid p {
    max-width: 520px;
    color: var(--stone-300);
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: var(--bronze-300);
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid li + li {
    margin-top: 8px;
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--stone-300);
}

.footer-bottom p {
    margin: 0;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

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

    .nav-toggle {
        display: block;
    }

    .hero-rail {
        display: none;
    }

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

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

    .side-card {
        position: static;
    }
}

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

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 58px;
    }

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

    .hero-controls {
        left: 16px;
        right: auto;
        bottom: 26px;
    }

    .section-head,
    .page-head {
        display: block;
    }

    .section-more {
        margin-top: 18px;
    }

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

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

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

    .rank-row {
        grid-template-columns: 42px 92px 1fr;
    }

    .rank-row .button {
        grid-column: 2 / 4;
        width: 100%;
    }

    .rank-row img {
        width: 92px;
        height: 62px;
    }

    .detail-body {
        padding: 22px;
    }

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

@media (max-width: 480px) {
    .movie-grid,
    .movie-grid.compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .mobile-panel.is-open {
        grid-template-columns: 1fr;
    }

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

    .hero-title {
        font-size: 28px;
    }
}
