:root {
    color-scheme: light;
    --amber-50: #fff7ed;
    --amber-100: #ffedd5;
    --amber-200: #fed7aa;
    --amber-300: #fdba74;
    --amber-500: #f59e0b;
    --orange-500: #f97316;
    --rose-600: #e11d48;
    --rose-800: #9f1239;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(146, 64, 14, 0.16);
    --glass: rgba(255, 255, 255, 0.78);
    --shadow: 0 20px 55px rgba(124, 45, 18, 0.15);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 237, 213, 0.9), transparent 26rem),
        linear-gradient(180deg, #fff7ed 0%, #fffaf5 34%, #ffffff 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff7ed;
    background: linear-gradient(90deg, #78350f 0%, #9a3412 48%, #881337 100%);
    box-shadow: 0 10px 30px rgba(67, 20, 7, 0.24);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #7c2d12;
    background: linear-gradient(135deg, #fef3c7, #fb923c);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 24px rgba(0, 0, 0, 0.18);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
    padding: 9px 13px;
    border-radius: 999px;
    color: rgba(255, 247, 237, 0.82);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.header-search {
    width: 250px;
}

.search-box {
    position: relative;
}

.search-box input,
.local-search-wrap input {
    width: 100%;
    border: 1px solid rgba(251, 191, 36, 0.22);
    outline: none;
    border-radius: 999px;
    padding: 10px 15px;
    color: #3f1d0b;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 1px rgba(120, 53, 15, 0.08);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, 86vw);
    max-height: 420px;
    overflow: auto;
    display: none;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(67, 20, 7, 0.25);
    color: var(--ink);
}

.search-results.is-open {
    display: grid;
    gap: 8px;
}

.search-result-item {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 13px;
    background: #fff7ed;
    transition: background 0.2s ease, transform 0.2s ease;
}

.search-result-item:hover {
    background: #ffedd5;
    transform: translateY(-1px);
}

.search-result-title {
    font-weight: 800;
    color: #7c2d12;
}

.search-result-meta {
    color: #7c2d12;
    opacity: 0.72;
    font-size: 13px;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    color: #fff7ed;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px 11px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.mobile-search .search-results {
    left: 0;
    right: auto;
}

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

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #1c0f07;
    color: #fff;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.12) contrast(1.03);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(28, 15, 7, 0.92), rgba(124, 45, 18, 0.72) 45%, rgba(136, 19, 55, 0.18) 100%),
        linear-gradient(0deg, rgba(28, 15, 7, 0.8), transparent 58%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 42px;
    align-items: center;
    padding: 90px 0 80px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #fed7aa;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 1.04;
    font-weight: 950;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.hero-copy p {
    max-width: 660px;
    margin: 20px 0 0;
    color: rgba(255, 247, 237, 0.88);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.78;
}

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

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

.hero-tags span,
.movie-mini-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #7c2d12;
    background: #ffedd5;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 10px;
}

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

.btn-primary,
.btn-secondary,
.section-action,
.rank-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.section-action,
.rank-link {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316 50%, #e11d48);
    box-shadow: 0 14px 35px rgba(225, 29, 72, 0.26);
}

.btn-secondary {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(14px);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-action:hover,
.rank-link:hover {
    transform: translateY(-2px);
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
}

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

.hero-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 70px 20px 20px;
    background: linear-gradient(0deg, rgba(28, 15, 7, 0.94), transparent);
}

.hero-card-caption strong {
    font-size: 20px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
    z-index: 3;
}

.hero-dot {
    width: 36px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    background: #fbbf24;
}

.content-section,
.category-overview,
.detail-section,
.library-section {
    padding: 56px 0;
}

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

.section-heading h1,
.section-heading h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
    color: #7c2d12;
    font-weight: 950;
}

.section-heading p,
.page-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 70px rgba(124, 45, 18, 0.2);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #451a03, #9a3412);
    aspect-ratio: 3 / 4;
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    color: #7c2d12;
    background: rgba(254, 243, 199, 0.94);
    font-size: 12px;
    font-weight: 900;
    padding: 5px 9px;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.72);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #e11d48);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.32);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-topline,
.movie-meta,
.rank-meta,
.breadcrumb {
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
}

.movie-card-topline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.movie-card h3 {
    margin: 0;
    color: #1f2937;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #c2410c;
}

.movie-card p {
    margin: 8px 0 13px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-mini-tags span {
    font-size: 12px;
    padding: 4px 8px;
}

.horizontal-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 300px);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scroll-snap-type: x mandatory;
}

.horizontal-rail .movie-card {
    scroll-snap-align: start;
}

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

.category-card {
    display: grid;
    min-height: 210px;
    padding: 24px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(135deg, #92400e, #f97316 52%, #be123c);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -60px;
    bottom: -70px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 24px;
}

.category-card p {
    margin: 12px 0 22px;
    color: rgba(255, 247, 237, 0.86);
    line-height: 1.65;
}

.category-card span {
    position: relative;
    z-index: 1;
    align-self: end;
    font-weight: 900;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 70px 92px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(124, 45, 18, 0.09);
}

.rank-number {
    color: #c2410c;
    font-size: 26px;
    font-weight: 950;
    text-align: center;
}

.rank-row img {
    width: 92px;
    height: 122px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-row p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.local-tools {
    margin: 24px 0 28px;
}

.local-search-wrap {
    max-width: 520px;
    margin-bottom: 14px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 8px 14px;
    color: #7c2d12;
    background: #fff;
    font-weight: 800;
}

.filter-btn.is-active,
.filter-btn:hover {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #e11d48);
    border-color: transparent;
}

.empty-state {
    margin: 18px 0 0;
    color: var(--muted);
}

.page-title {
    padding: 52px 0 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

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

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #130904;
    box-shadow: 0 28px 80px rgba(30, 10, 4, 0.28);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.22), rgba(19, 9, 4, 0.58));
    transition: opacity 0.25s ease;
}

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

.play-layer span:first-child {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #e11d48);
    font-size: 26px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.detail-info {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 0;
    color: #7c2d12;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.16;
}

.detail-info .lead {
    margin: 16px 0;
    color: #4b5563;
    line-height: 1.8;
    font-size: 17px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    padding: 10px 12px;
    border-radius: 14px;
    color: #7c2d12;
    background: #ffedd5;
    font-weight: 800;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 20px 0 58px;
}

.article-card,
.related-panel {
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}

.article-card h2,
.related-panel h2 {
    margin: 0 0 14px;
    color: #7c2d12;
    font-size: 26px;
}

.article-card p {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.9;
}

.related-panel {
    position: sticky;
    top: 92px;
    align-self: start;
}

.mini-media-list {
    display: grid;
    gap: 13px;
}

.mini-media-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    background: #fff7ed;
    color: #7c2d12;
    font-weight: 800;
}

.mini-media-card:hover {
    background: #ffedd5;
}

.mini-media-card img {
    width: 72px;
    height: 94px;
    object-fit: cover;
    border-radius: 12px;
}

.movie-card[hidden] {
    display: none;
}

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

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

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

    .related-panel {
        position: static;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 76px 0 90px;
    }

    .hero-card {
        display: none;
    }

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

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

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

    .rank-link {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 620px) {
    .header-inner {
        width: min(100% - 22px, 1180px);
        gap: 12px;
    }

    .site-logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

    .page-main,
    .hero-content {
        width: min(100% - 22px, 1180px);
    }

    .hero-slider {
        min-height: 72vh;
    }

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

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

    .section-heading {
        display: grid;
        align-items: start;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

    .rank-row {
        grid-template-columns: 44px 70px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-row img {
        width: 70px;
        height: 96px;
    }

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

    .article-card,
    .related-panel,
    .detail-info {
        padding: 20px;
        border-radius: 22px;
    }
}
