:root {
    --sand-50: #faf8f3;
    --sand-100: #f5f0e6;
    --sand-200: #eadfce;
    --sand-300: #d8c4aa;
    --sand-500: #a98362;
    --sand-600: #9a704f;
    --sand-700: #885e40;
    --sand-800: #6f4d3a;
    --sand-900: #5b4030;
    --desert-50: #fef9f0;
    --desert-100: #fdf2e0;
    --desert-300: #f6c289;
    --desert-400: #f1a45f;
    --desert-500: #ec944f;
    --desert-600: #d97935;
    --desert-700: #b5602a;
    --ink: #231811;
    --muted: #766353;
    --white: #ffffff;
    --shadow: 0 14px 38px rgba(91, 64, 48, 0.14);
    --warm-shadow: 0 12px 28px rgba(236, 148, 79, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--sand-50);
    background: linear-gradient(90deg, var(--sand-800), var(--desert-700));
    box-shadow: 0 12px 24px rgba(91, 64, 48, 0.25);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--desert-400), var(--desert-700));
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

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

.nav-links a,
.mobile-panel a {
    padding: 10px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

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

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

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
}

.mobile-panel.open {
    display: grid;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--sand-900);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 22%, rgba(236, 148, 79, 0.32), transparent 32%),
        linear-gradient(90deg, rgba(35, 24, 17, 0.88), rgba(35, 24, 17, 0.58) 45%, rgba(35, 24, 17, 0.2)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent 45%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: center;
    gap: 56px;
    padding-top: 38px;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--desert-300);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero p,
.page-hero p,
.detail-side p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.72;
}

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

.hero-tags span,
.tag-row span,
.info-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(217, 121, 53, 0.88);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

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

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

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--desert-500), var(--desert-700));
    box-shadow: var(--warm-shadow);
}

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

.btn.ghost.dark {
    color: var(--sand-900);
    border-color: rgba(91, 64, 48, 0.16);
    background: rgba(255, 255, 255, 0.75);
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(12px);
    transform: rotate(1.5deg);
}

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

.hero-card span {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.34);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-arrow.prev {
    left: 20px;
}

.hero-arrow.next {
    right: 20px;
}

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

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

.hero-dots button.active {
    background: var(--desert-400);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 28px;
    display: grid;
    grid-template-columns: 1fr 116px;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.hero-search input,
.filter-box input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 16px;
    padding: 0 18px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
}

.hero-search button,
.filter-box button {
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    background: var(--desert-600);
    font-weight: 800;
    cursor: pointer;
}

.quick-cats {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 24px 0 10px;
}

.quick-cats a,
.filter-chips button {
    flex: 0 0 auto;
    padding: 11px 16px;
    border: 1px solid rgba(91, 64, 48, 0.12);
    border-radius: 999px;
    color: var(--sand-800);
    background: #ffffff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(91, 64, 48, 0.08);
}

.section-block {
    padding: 52px 0;
}

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

.section-head.tight {
    margin-bottom: 18px;
}

.section-head span {
    color: var(--desert-600);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-head h2 {
    margin: 6px 0 0;
    color: var(--sand-900);
    font-size: clamp(26px, 4vw, 40px);
}

.section-head a {
    color: var(--desert-700);
    font-weight: 800;
}

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

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

.all-grid {
    padding-bottom: 56px;
}

.movie-card {
    overflow: hidden;
    display: flex;
    min-width: 0;
    flex-direction: column;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--sand-100);
}

.movie-card.compact .poster-wrap {
    aspect-ratio: 3 / 4;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 48%);
}

.poster-meta {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 5px 9px;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.55);
    font-weight: 800;
    font-size: 13px;
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 15px;
}

.card-body strong {
    color: var(--sand-900);
    font-size: 17px;
    line-height: 1.35;
}

.card-body em {
    color: var(--sand-600);
    font-size: 13px;
    font-style: normal;
}

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

.tag-row span {
    min-height: 24px;
    color: var(--desert-700);
    background: var(--desert-100);
    font-size: 12px;
}

.wide-band {
    margin: 28px 0;
    background: linear-gradient(90deg, var(--desert-50), var(--sand-100));
    border-radius: 36px;
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 34px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 58px minmax(0, 1fr) 54px;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(91, 64, 48, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(91, 64, 48, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--warm-shadow);
}

.rank-num {
    color: var(--desert-600);
    font-size: 19px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.rank-info strong {
    overflow: hidden;
    color: var(--sand-900);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    color: var(--desert-700);
    font-weight: 900;
    text-align: right;
}

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

.page-main {
    padding-bottom: 60px;
}

.page-hero {
    margin-top: 34px;
    padding: 52px;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 88% 10%, rgba(236, 148, 79, 0.42), transparent 35%),
        linear-gradient(135deg, var(--sand-900), var(--sand-700));
    box-shadow: var(--shadow);
}

.small-hero {
    margin-bottom: 34px;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.82);
}

.page-actions {
    margin-top: 18px;
}

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

.category-card {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 28px;
    color: var(--sand-900);
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
    color: var(--desert-600);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.category-card h2 {
    margin: 0;
    font-size: 28px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-card ul {
    margin: auto 0 0;
    padding: 0;
    list-style: none;
    color: var(--sand-700);
    line-height: 1.9;
    font-size: 14px;
}

.filter-panel {
    margin: 28px 0;
    padding: 18px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-box {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 12px;
}

.filter-box input {
    height: 48px;
    border: 1px solid rgba(91, 64, 48, 0.1);
    background: var(--sand-50);
}

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

.filter-chips button {
    border: 0;
    cursor: pointer;
}

.empty-state {
    display: none;
    margin: 32px 0 80px;
    padding: 26px;
    border-radius: 22px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-state.show {
    display: block;
}

.full-rank {
    padding-bottom: 64px;
}

.detail-main {
    background: linear-gradient(180deg, var(--sand-900), var(--sand-50) 560px, #ffffff);
}

.player-band {
    padding: 22px 0 46px;
    color: #ffffff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

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

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.85fr);
    gap: 26px;
    align-items: stretch;
}

.player-frame {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.player-frame video {
    width: 100%;
    height: 100%;
    min-height: 360px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.54));
    cursor: pointer;
}

.play-overlay.hidden {
    display: none;
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--desert-500), var(--desert-700));
    font-size: 38px;
    box-shadow: var(--warm-shadow);
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 3;
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
    text-align: center;
}

.player-message.show {
    display: block;
}

.detail-side {
    overflow: hidden;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    align-content: start;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
}

.detail-side img {
    width: 150px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.detail-side h1 {
    font-size: clamp(26px, 3vw, 42px);
}

.detail-side p {
    font-size: 15px;
    line-height: 1.75;
}

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

.detail-article,
.related-panel {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-article {
    padding: 34px;
}

.info-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.info-strip span {
    color: var(--desert-700);
    background: var(--desert-100);
}

.detail-article h2,
.related-panel h2 {
    margin: 0 0 16px;
    color: var(--sand-900);
    font-size: 26px;
}

.detail-article h2:not(:first-of-type) {
    margin-top: 30px;
}

.detail-article p {
    margin: 0 0 14px;
    color: #4f4035;
    font-size: 16px;
    line-height: 1.95;
}

.pager-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 32px;
}

.pager-links a {
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--sand-800);
    background: var(--sand-100);
    font-weight: 800;
}

.related-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

.related-grid .movie-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    border-radius: 18px;
}

.related-grid .poster-wrap {
    height: 128px;
    aspect-ratio: auto;
}

.related-grid .card-body {
    padding: 12px;
}

.site-footer {
    color: var(--sand-200);
    background: linear-gradient(180deg, var(--sand-800), var(--sand-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 430px;
    color: var(--sand-300);
    line-height: 1.8;
}

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

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

.footer-links a {
    color: var(--sand-300);
}

.footer-links a:hover {
    color: var(--desert-300);
}

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

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

    .hero-content,
    .player-layout,
    .detail-content,
    .two-col,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        display: none;
    }

    .related-panel {
        position: static;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        padding: 78px 0 120px;
        align-items: end;
    }

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

    .hero-search input,
    .hero-search button {
        min-height: 46px;
    }

    .hero-dots {
        bottom: 126px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .page-hero {
        padding: 32px 22px;
        border-radius: 26px;
    }

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

    .rank-item {
        grid-template-columns: 36px 52px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .detail-side {
        grid-template-columns: 106px minmax(0, 1fr);
    }

    .detail-side img {
        width: 106px;
    }

    .player-frame,
    .player-frame video {
        min-height: 230px;
    }

    .detail-article {
        padding: 24px;
    }

    .pager-links {
        grid-template-columns: 1fr;
    }
}

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

    .brand {
        font-size: 19px;
    }

    .movie-grid,
    .compact-grid,
    .side-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

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