:root {
    --bg: #fafaf9;
    --surface: #ffffff;
    --surface-soft: #fffbeb;
    --ink: #1c1917;
    --muted: #78716c;
    --line: #e7e5e4;
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-deep: #78350f;
    --shadow: 0 20px 45px rgba(28, 25, 23, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fffbeb 0, #fafaf9 18rem, #ffffff 100%);
    line-height: 1.65;
}

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

img,
video {
    display: block;
    width: 100%;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(120, 53, 15, 0.94);
    color: #fff7ed;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(28, 25, 23, 0.2);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 2.45rem;
    height: 2.45rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #78350f;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: inset 0 -5px 12px rgba(120, 53, 15, 0.24);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.nav-link {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: rgba(255, 251, 235, 0.82);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff7ed;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 1.25rem 1rem;
}

.mobile-nav.is-open {
    display: grid;
    gap: 0.5rem;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    color: #fff7ed;
    background: #1c1917;
    overflow: hidden;
}

.hero-slides {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    align-items: center;
    gap: 2rem;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 5rem 1.25rem 6rem;
    opacity: 0;
    pointer-events: none;
    transform: translateX(2rem);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -2;
}

.hero-bg img {
    height: 100%;
    object-fit: cover;
    filter: blur(14px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.4;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0, rgba(120, 53, 15, 0.84) 48%, rgba(28, 25, 23, 0.68) 100%);
}

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

.hero-content h1 {
    margin: 0.7rem 0 1rem;
    font-size: clamp(2.4rem, 6vw, 5.4rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.hero-line {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #fde68a;
    max-width: 820px;
}

.hero-text {
    margin: 1rem 0 0;
    max-width: 760px;
    color: rgba(255, 251, 235, 0.86);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.primary-btn,
.ghost-btn,
.more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0.75rem 1.15rem;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
    color: #fff7ed;
    background: linear-gradient(135deg, #d97706, #92400e);
    box-shadow: 0 16px 30px rgba(217, 119, 6, 0.28);
}

.primary-btn:hover,
.more-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(146, 64, 14, 0.28);
}

.ghost-btn {
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.1);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.18);
}

.hero-poster {
    display: block;
    border-radius: 1.6rem;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
    transform: rotate(1.5deg);
}

.hero-poster img {
    aspect-ratio: 4 / 5;
    height: 100%;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 1.75rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background: rgba(28, 25, 23, 0.48);
    backdrop-filter: blur(12px);
}

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

.hero-controls > button {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.4rem;
}

.hero-dots {
    display: flex;
    gap: 0.45rem;
}

.hero-dots button {
    width: 0.7rem;
    height: 0.7rem;
    padding: 0;
    opacity: 0.5;
}

.hero-dots button.is-active {
    width: 1.6rem;
    opacity: 1;
    background: #fbbf24;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-row span,
.detail-badges span,
.poster-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.tag-row span {
    padding: 0.22rem 0.55rem;
    color: #92400e;
    background: #fef3c7;
}

.hero-tags span,
.detail-tags span {
    color: #fef3c7;
    background: rgba(217, 119, 6, 0.5);
    border: 1px solid rgba(253, 230, 138, 0.26);
}

.search-band,
.content-section,
.detail-content,
.ranking-panel,
.page-hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: 4.5rem 1.25rem;
}

.search-band {
    padding-bottom: 2.8rem;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-head.centered {
    max-width: 760px;
    margin: 0 auto 1.6rem;
    display: block;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: var(--brand);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-head h2,
.page-hero h1,
.ranking-copy h2,
.detail-article h1 {
    margin: 0;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-head h2,
.ranking-copy h2 {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.section-head p,
.page-hero p,
.ranking-copy p {
    color: var(--muted);
}

.search-box {
    max-width: 760px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    min-height: 3.25rem;
    padding: 0 1.1rem;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.search-box input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16), var(--shadow);
}

.compact-search {
    margin: 0;
    max-width: 520px;
}

.category-strip,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1.3rem;
}

.category-strip a,
.filter-chips button {
    border: 1px solid #fcd34d;
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    color: #92400e;
    background: rgba(254, 243, 199, 0.72);
    cursor: pointer;
}

.category-strip a:hover,
.filter-chips button:hover,
.filter-chips button.is-active {
    color: #fff7ed;
    background: #d97706;
}

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

.featured-grid {
    margin-bottom: 2rem;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #fcd34d;
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1c1917;
}

.poster-link img {
    aspect-ratio: 16 / 10;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.poster-badge {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    padding: 0.25rem 0.55rem;
    color: #fff7ed;
    background: rgba(28, 25, 23, 0.72);
    backdrop-filter: blur(8px);
}

.movie-card-body {
    padding: 1rem;
}

.movie-title {
    margin: 0.7rem 0 0.25rem;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 800;
}

.movie-title a:hover {
    color: var(--brand);
}

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.movie-desc {
    margin-top: 0.55rem;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.more-link {
    color: #92400e;
    background: #fef3c7;
}

.ranking-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    border-radius: 2rem;
    color: #fff7ed;
    background: radial-gradient(circle at 10% 10%, rgba(251, 191, 36, 0.28), transparent 30%), linear-gradient(135deg, #78350f, #1c1917);
}

.ranking-copy h2,
.ranking-copy p {
    color: #fff7ed;
}

.ranking-copy p {
    color: rgba(255, 251, 235, 0.8);
}

.ranking-list,
.ranking-table {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.ranking-list li,
.ranking-row {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
}

.ranking-row {
    grid-template-columns: 3rem minmax(0, 1fr) minmax(120px, auto) auto;
    background: #fff;
    border: 1px solid var(--line);
}

.rank-num {
    color: #fbbf24;
    font-weight: 900;
}

.ranking-list a,
.ranking-row a {
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-list em,
.ranking-row em {
    font-style: normal;
    color: inherit;
    opacity: 0.78;
}

.page-hero {
    padding-top: 5rem;
    padding-bottom: 2rem;
}

.small-hero {
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.94rem;
}

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

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

.category-card a {
    display: block;
    min-height: 220px;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff, #fffbeb);
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-count {
    display: inline-flex;
    min-width: 3rem;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    color: #fff7ed;
    background: #d97706;
    font-weight: 900;
}

.category-card h2 {
    margin: 1rem 0 0.4rem;
    font-size: 1.5rem;
}

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

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 1rem;
}

.category-samples span {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 0.82rem;
}

.filter-panel {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 1.25rem 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.5rem;
    align-items: stretch;
    margin-top: 1.5rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: 1.6rem;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 0.7rem;
    color: #fff7ed;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.66));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    width: 5rem;
    height: 5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #78350f;
    background: #fbbf24;
    font-size: 2rem;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.detail-aside {
    overflow: hidden;
    border-radius: 1.6rem;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-aside img {
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
}

.detail-badges span {
    padding: 0.3rem 0.62rem;
    color: #92400e;
    background: #fef3c7;
}

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

.detail-article {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.06);
}

.detail-article h1 {
    margin-top: 0.8rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.detail-line {
    margin: 1rem 0 1.4rem;
    color: #92400e;
    font-size: 1.15rem;
    font-weight: 700;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0 0 1.8rem;
}

.info-list div {
    padding: 0.85rem;
    border-radius: 1rem;
    background: #fffbeb;
}

.info-list dt {
    color: var(--muted);
    font-size: 0.85rem;
}

.info-list dd {
    margin: 0.2rem 0 0;
    font-weight: 800;
}

.detail-article h2 {
    margin: 1.6rem 0 0.65rem;
    font-size: 1.35rem;
}

.detail-article p {
    color: #44403c;
}

.side-list {
    position: sticky;
    top: 5.6rem;
    align-self: start;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.06);
}

.side-list h2 {
    margin: 0 0 0.2rem;
    font-size: 1.25rem;
}

.compact-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem;
    border-radius: 1rem;
    background: #fffbeb;
    transition: background 0.25s ease, transform 0.25s ease;
}

.compact-card:hover {
    background: #fef3c7;
    transform: translateX(3px);
}

.compact-card img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.8rem;
}

.compact-card strong,
.compact-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

.site-footer {
    margin-top: 2rem;
    color: rgba(255, 251, 235, 0.8);
    background: #1c1917;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-inner p {
    margin: 0.25rem 0 0;
}

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

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

    .menu-toggle {
        display: block;
    }

    .hero-slide,
    .detail-layout,
    .detail-content,
    .ranking-panel {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 360px;
        transform: none;
    }

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

    .detail-aside {
        display: none;
    }

    .side-list {
        position: static;
    }
}

@media (max-width: 640px) {
    .hero-carousel,
    .hero-slides {
        min-height: 720px;
    }

    .hero-slide {
        padding-top: 3.5rem;
        padding-bottom: 5.5rem;
    }

    .hero-poster {
        max-width: 260px;
    }

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

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

    .ranking-row {
        grid-template-columns: 2.6rem minmax(0, 1fr);
    }

    .ranking-row span:not(.rank-num),
    .ranking-row em {
        display: none;
    }

    .player-shell,
    .movie-player {
        min-height: 260px;
    }
}
