:root {
    --ancient-50: #faf7f0;
    --ancient-100: #f3ead7;
    --ancient-200: #e6d2ad;
    --ancient-300: #d4b37b;
    --ancient-500: #a97732;
    --ancient-600: #8b5e22;
    --ancient-700: #6f481a;
    --sage-50: #f1f6ef;
    --sage-100: #dcebd8;
    --sage-600: #557847;
    --earth-50: #fbf7f2;
    --earth-100: #eee1d3;
    --earth-700: #6a5140;
    --earth-800: #4e3b2f;
    --earth-900: #2d211a;
    --ink: #1e1712;
    --paper: #fffaf2;
    --line: rgba(110, 72, 26, 0.18);
    --shadow: 0 22px 60px rgba(45, 33, 26, 0.14);
    --shadow-soft: 0 12px 30px rgba(45, 33, 26, 0.10);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 15% 0%, rgba(169, 119, 50, 0.12), transparent 32%), var(--ancient-50);
    color: var(--earth-900);
    font-family: "Noto Serif SC", "Microsoft YaHei", "PingFang SC", serif;
    line-height: 1.7;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 247, 240, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(45, 33, 26, 0.06);
}

.header-inner,
.footer-inner,
.section-wrap,
.hero-inner,
.detail-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ancient-600), var(--ancient-300));
    color: #fff;
    box-shadow: 0 12px 24px rgba(139, 94, 34, 0.28);
}

.brand-text strong,
.brand-text em {
    display: block;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

.brand-text em {
    font-size: 12px;
    color: var(--ancient-700);
    font-style: normal;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--earth-800);
    font-size: 15px;
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--ancient-600);
    color: #fff;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--earth-900);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    background: #15100d;
    color: #fff;
}

.hero-slider {
    position: absolute;
    inset: 0;
}

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(16, 11, 8, 0.92) 0%, rgba(16, 11, 8, 0.64) 42%, rgba(16, 11, 8, 0.26) 100%),
        linear-gradient(0deg, rgba(16, 11, 8, 0.88) 0%, transparent 52%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: flex;
    align-items: center;
    padding: 92px 0 64px;
}

.hero-copy {
    width: min(680px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    color: #f8e6bf;
    font-weight: 700;
}

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

.hero p {
    max-width: 620px;
    color: #f9ead0;
    font-size: clamp(18px, 2.1vw, 23px);
    line-height: 1.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
    background: var(--ancient-600);
    color: #fff;
    box-shadow: 0 14px 28px rgba(139, 94, 34, 0.36);
}

.btn-primary:hover {
    background: var(--ancient-700);
}

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

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 13px;
}

.tag-row span {
    background: var(--sage-50);
    color: var(--sage-600);
}

.detail-tags span {
    background: var(--ancient-100);
    color: var(--ancient-700);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dot.active {
    background: #f8dca6;
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

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

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

.page-hero {
    padding: 70px 0 42px;
    background:
        radial-gradient(circle at 10% 20%, rgba(169, 119, 50, 0.18), transparent 28%),
        linear-gradient(135deg, #fffaf2, #f1f6ef);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.14;
}

.page-hero p {
    margin: 0;
    max-width: 760px;
    color: var(--earth-700);
    font-size: 18px;
}

.section-wrap {
    padding: 56px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.18;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--earth-700);
}

.text-link {
    color: var(--ancient-700);
    font-weight: 800;
}

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

.category-chip {
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, #fffdf8, #f3ead7);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-chip:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 94, 34, 0.34);
    box-shadow: var(--shadow);
}

.category-chip span {
    display: block;
    color: var(--earth-900);
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 8px;
}

.category-chip small {
    color: var(--earth-700);
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 242, 0.86);
    box-shadow: var(--shadow-soft);
    margin-bottom: 28px;
}

.search-box {
    display: grid;
    gap: 6px;
    color: var(--earth-700);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    outline: none;
    color: var(--earth-900);
    background: #fff;
}

.search-box input:focus {
    border-color: var(--ancient-500);
    box-shadow: 0 0 0 4px rgba(169, 119, 50, 0.14);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tags button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--earth-700);
    padding: 9px 13px;
    cursor: pointer;
}

.filter-tags button.active,
.filter-tags button:hover {
    background: var(--ancient-600);
    color: #fff;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #fffaf4;
    border: 1px solid var(--line);
    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, 34, 0.34);
    box-shadow: var(--shadow);
}

.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #2d211a, #8b5e22);
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.05);
}

.cover-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(139, 94, 34, 0.9);
    color: #fff;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.cover-type {
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    font-size: 12px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    width: 38px;
    height: 38px;
    background: rgba(30, 23, 18, 0.78);
}

.movie-info {
    padding: 16px;
}

.movie-title {
    display: block;
    color: var(--earth-900);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

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

.movie-meta,
.movie-line {
    margin: 8px 0 0;
}

.movie-meta {
    color: var(--ancient-700);
    font-size: 13px;
    font-weight: 700;
}

.movie-line {
    color: var(--earth-700);
    font-size: 14px;
}

.tag-row {
    margin-top: 12px;
}

.movie-card-compact .movie-line {
    display: none;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: #fffaf4;
    border: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(45, 33, 26, 0.06);
}

.rank-item:hover {
    border-color: rgba(139, 94, 34, 0.35);
    transform: translateX(4px);
}

.rank-index {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--earth-900);
    color: #f8dca6;
    font-weight: 900;
}

.rank-item img {
    width: 70px;
    height: 94px;
    border-radius: 12px;
    object-fit: cover;
    background: #2d211a;
}

.rank-title {
    min-width: 0;
    color: var(--earth-900);
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    color: var(--earth-700);
    font-size: 14px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #14100d;
    color: #fff;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.42;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(1.2);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 16, 13, 0.96), rgba(20, 16, 13, 0.74));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    padding: 78px 0 64px;
}

.detail-poster {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    background: #2d211a;
}

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

.breadcrumb {
    margin-bottom: 16px;
    color: #f8dca6;
    font-size: 14px;
}

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

.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
}

.detail-meta {
    margin: 0 0 18px;
    color: #f4ddba;
    font-weight: 700;
}

.detail-line {
    margin: 0 0 20px;
    color: #fff1d8;
    font-size: 19px;
}

.player-section {
    padding-top: 56px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #090706;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #090706;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: #090706;
    cursor: pointer;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
}

.player-cover span {
    position: absolute;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(139, 94, 34, 0.9);
    color: #fff;
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.player-cover.is-hidden {
    display: none;
}

.content-panel {
    margin-top: 28px;
    padding: 30px;
    border-radius: var(--radius-lg);
    background: #fffaf4;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.content-panel h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.content-panel p {
    color: var(--earth-800);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #211811;
    color: #f9ead0;
    margin-top: 56px;
}

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

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

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

.footer-links a {
    color: #f8dca6;
}

.empty-state {
    display: none;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fffaf4;
    color: var(--earth-700);
}

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

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

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

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .site-nav {
        display: none;
        width: 100%;
        justify-content: flex-start;
        padding-top: 8px;
    }

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

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

    .hero-arrow {
        display: none;
    }

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

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

    .detail-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

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

    .rank-meta {
        display: none;
    }

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

@media (max-width: 560px) {
    .header-inner,
    .footer-inner,
    .section-wrap,
    .hero-inner,
    .detail-wrap {
        width: min(100% - 22px, 1200px);
    }

    .brand-text em {
        display: none;
    }

    .hero,
    .hero-inner {
        min-height: 560px;
    }

    .hero-inner {
        padding-top: 70px;
    }

    .hero h1,
    .hero h2 {
        font-size: 40px;
    }

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

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

    .movie-card {
        display: grid;
        grid-template-columns: 126px minmax(0, 1fr);
    }

    .movie-cover {
        height: 100%;
    }

    .movie-line {
        display: none;
    }

    .page-hero {
        padding: 42px 0 28px;
    }

    .content-panel {
        padding: 22px;
    }
}

.category-card-large {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px;
    border-radius: 24px;
    background: #fffaf4;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

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

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

.category-preview img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: #2d211a;
}

.category-card-copy h2 {
    margin: 0 0 8px;
    font-size: 25px;
}

.category-card-copy p {
    margin: 0;
    color: var(--earth-700);
}

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

@media (max-width: 820px) {
    .category-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .category-card-large {
        grid-template-columns: 1fr;
    }
}
