:root {
    --bg: #f8f5ef;
    --paper: #fffaf2;
    --paper-strong: #ffffff;
    --ink: #24201b;
    --muted: #756b60;
    --soft: #e8ded0;
    --line: rgba(83, 68, 49, 0.16);
    --earth: #8b5e34;
    --earth-dark: #674522;
    --earth-soft: #f0dfc8;
    --gold: #d7a64a;
    --night: #18130e;
    --shadow: 0 24px 60px rgba(45, 34, 22, 0.13);
    --shadow-soft: 0 14px 34px rgba(45, 34, 22, 0.10);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 5%, rgba(215, 166, 74, 0.18), transparent 28rem),
        linear-gradient(180deg, #fbf7f0 0%, var(--bg) 42%, #efe6da 100%);
    min-height: 100vh;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 250, 242, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 24px;
}

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

.brand {
    min-width: 260px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--earth), var(--gold));
    box-shadow: 0 10px 24px rgba(139, 94, 52, 0.28);
}

.brand-text {
    white-space: nowrap;
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 12px;
    color: #4a4035;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    background: var(--earth-soft);
    color: var(--earth-dark);
    transform: translateY(-1px);
}

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.nav-search input,
.mobile-nav input,
.filter-bar input {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    border-radius: 999px;
    padding: 12px 16px;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input:focus,
.mobile-nav input:focus,
.filter-bar input:focus {
    border-color: rgba(139, 94, 52, 0.52);
    box-shadow: 0 0 0 4px rgba(215, 166, 74, 0.14);
}

.nav-search button,
.mobile-nav button,
.primary-btn,
.ghost-btn,
.text-link {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-nav button,
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--earth), var(--earth-dark));
    box-shadow: 0 12px 28px rgba(103, 69, 34, 0.24);
}

.nav-search button,
.mobile-nav button {
    padding: 11px 18px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.nav-search button:hover,
.mobile-nav button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.76);
    border-radius: 14px;
    color: var(--earth-dark);
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    gap: 8px;
    flex-direction: column;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    height: 72vh;
    overflow: hidden;
    background: var(--night);
    color: #fff;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 56px;
    align-items: center;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 92px 24px 100px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(18, 13, 9, 0.95), rgba(18, 13, 9, 0.72) 42%, rgba(18, 13, 9, 0.46)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transform: scale(1.04);
    z-index: -2;
}

.hero-bg::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 25% 20%, rgba(215, 166, 74, 0.24), transparent 22rem),
        linear-gradient(180deg, transparent 0%, rgba(18, 13, 9, 0.82) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 900;
}

.hero-content h1 {
    margin: 0;
    max-width: 900px;
    font-size: clamp(2.35rem, 5.2vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-content h2 {
    margin: 22px 0 12px;
    font-size: clamp(1.4rem, 2.8vw, 2.8rem);
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.12rem;
    line-height: 1.85;
    margin: 0 0 28px;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-tags span {
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
    position: relative;
    height: 500px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
    transform: rotate(1.5deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: inherit;
    pointer-events: none;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
}

.hero-controls button {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    cursor: pointer;
}

.hero-controls > button {
    width: 34px;
    height: 34px;
    font-size: 1.35rem;
}

.hero-dots {
    display: flex;
    gap: 7px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    opacity: 0.58;
}

.hero-dot.is-active {
    width: 24px;
    opacity: 1;
    background: var(--gold);
}

.section-block,
.page-shell,
.detail-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.story-card h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.section-heading a,
.text-link {
    color: var(--earth-dark);
    font-weight: 900;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 250, 242, 0.88);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 94, 52, 0.32);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    height: 300px;
    overflow: hidden;
    background: #d9c9b7;
}

.poster-link img {
    transition: transform 0.38s ease;
}

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

.rank-badge,
.list-rank {
    position: absolute;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--gold), var(--earth));
    box-shadow: 0 10px 24px rgba(139, 94, 52, 0.3);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 42px;
    height: 34px;
    border-radius: 14px;
}

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

.movie-meta-line {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 9px;
    font-size: 1.18rem;
    line-height: 1.35;
}

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

.tag-row span {
    color: var(--earth-dark);
    background: var(--earth-soft);
}

.category-section {
    max-width: none;
    padding-left: max(24px, calc((100vw - 1280px) / 2));
    padding-right: max(24px, calc((100vw - 1280px) / 2));
}

.category-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
}

.category-tile {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: 26px;
    padding: 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: end;
    scroll-snap-align: start;
    box-shadow: var(--shadow-soft);
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent 0%, rgba(17, 12, 8, 0.88) 100%);
}

.category-tile span {
    font-size: 1.35rem;
    font-weight: 900;
}

.category-tile small {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 34px;
}

.compact-heading {
    align-items: center;
}

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

.ranking-item {
    position: relative;
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 250, 242, 0.82);
    padding: 12px;
    box-shadow: 0 10px 28px rgba(45, 34, 22, 0.08);
}

.list-rank {
    position: static;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    font-weight: 900;
}

.ranking-poster {
    height: 104px;
    border-radius: 16px;
    overflow: hidden;
}

.ranking-info h3 {
    margin: 0 0 6px;
}

.ranking-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.ranking-meta {
    font-size: 0.88rem;
    font-weight: 800;
}

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

.movie-card-compact .poster-link {
    height: 210px;
}

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

.movie-card-compact h3 {
    font-size: 1rem;
}

.page-shell {
    padding-bottom: 80px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255, 250, 242, 0.92), rgba(239, 222, 200, 0.88));
    border: 1px solid var(--line);
    padding: clamp(34px, 6vw, 70px);
    box-shadow: var(--shadow-soft);
}

.page-hero h1 {
    font-size: clamp(2.1rem, 4vw, 4rem);
}

.page-hero p:not(.eyebrow) {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.8;
    font-size: 1.06rem;
}

.filter-bar {
    margin-top: 24px;
    max-width: 720px;
}

.prominent-filter {
    max-width: 880px;
}

.prominent-filter input {
    font-size: 1.08rem;
    padding: 16px 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumb a {
    color: var(--earth-dark);
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 250, 242, 0.86);
    box-shadow: var(--shadow-soft);
}

.category-cover {
    height: 220px;
    border-radius: 22px;
    overflow: hidden;
}

.category-overview-card h2 {
    margin: 0 0 10px;
}

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

.category-movie-grid,
.search-grid {
    margin-top: 30px;
}

.detail-shell {
    padding-bottom: 80px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
    color: #fff;
    border-radius: 34px;
    min-height: 560px;
    padding: clamp(26px, 5vw, 58px);
    background: var(--night);
    box-shadow: var(--shadow);
}

.detail-poster {
    height: 460px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
    font-size: clamp(2rem, 4.5vw, 4.6rem);
    line-height: 1.05;
}

.detail-one-line {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.12rem;
    line-height: 1.8;
}

.detail-meta {
    margin: 18px 0;
}

.detail-meta span {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.player-section,
.story-card {
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 250, 242, 0.9);
    box-shadow: var(--shadow-soft);
    padding: 24px;
}

.player-section h2 {
    margin-bottom: 18px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #080604;
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #050505;
    position: relative;
    z-index: 1;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), var(--earth));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
    font-size: 2rem;
    padding-left: 5px;
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
    gap: 24px;
}

.story-card p {
    color: var(--muted);
    line-height: 1.9;
    margin: 16px 0 0;
}

.info-list {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px 16px;
    margin: 16px 0 0;
}

.info-list dt {
    color: var(--muted);
    font-weight: 900;
}

.info-list dd {
    margin: 0;
}

.related-block {
    padding-left: 0;
    padding-right: 0;
}

.site-footer {
    margin-top: 86px;
    border-top: 1px solid var(--line);
    background: rgba(36, 32, 27, 0.96);
    color: rgba(255, 255, 255, 0.82);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    color: #fff;
}

.footer-inner p {
    margin: 0;
    color: rgba(255, 255, 255, 0.64);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 800;
}

.is-filter-hidden {
    display: none !important;
}

@media (max-width: 1120px) {
    .desktop-nav,
    .nav-search {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .brand {
        min-width: 0;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 28px;
    }

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

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

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

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

@media (max-width: 760px) {
    .header-inner {
        padding: 12px 16px;
    }

    .brand-text {
        max-width: 210px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-slider {
        min-height: 780px;
        height: auto;
    }

    .hero-slide {
        position: absolute;
        grid-template-columns: 1fr;
        align-items: end;
        padding: 64px 18px 112px;
    }

    .hero-poster {
        order: -1;
        width: min(72vw, 280px);
        height: 360px;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 13vw, 3.8rem);
    }

    .hero-summary,
    .detail-one-line {
        font-size: 1rem;
    }

    .section-block,
    .page-shell,
    .detail-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

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

    .poster-link {
        height: 380px;
    }

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

    .category-cover {
        height: 260px;
    }

    .ranking-item {
        grid-template-columns: 44px 76px minmax(0, 1fr);
    }

    .ranking-item .text-link {
        grid-column: 2 / -1;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .detail-poster {
        width: min(76vw, 280px);
        height: 380px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 460px) {
    .brand-text {
        max-width: 150px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .poster-link {
        height: 330px;
    }
}
