:root {
    --bg: #fff7ed;
    --paper: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(146, 64, 14, 0.16);
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-soft: #fef3c7;
    --shadow: 0 24px 70px rgba(92, 51, 6, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 36%, #ffffff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
    background: rgba(255, 251, 235, 0.92);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    color: #78350f;
    letter-spacing: -0.04em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #78350f;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-active {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.24);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #78350f;
    background: #fef3c7;
    font-size: 20px;
}

.home-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 420px);
    background: #451a03;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-content {
    position: relative;
    width: min(760px, calc(100% - 64px));
    margin-left: max(32px, calc((100vw - 1180px) / 2));
    color: #fff;
}

.eyebrow,
.page-hero p,
.section-title p {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.16);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 780px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.08em;
    text-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.hero-summary {
    max-width: 660px;
    margin-top: 24px;
    color: #fffbeb;
    font-size: 19px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 800;
}

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

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

.primary-btn,
.ghost-btn,
.search-rank-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-btn {
    color: #451a03;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.search-rank-link:hover,
.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
}

.hero-panel {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 34px;
    background: linear-gradient(180deg, rgba(69, 26, 3, 0.88), rgba(120, 53, 15, 0.72));
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.hero-search {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.hero-search label {
    display: block;
    margin-bottom: 10px;
    color: #fde68a;
    font-weight: 900;
}

.search-line {
    display: flex;
    gap: 10px;
}

.site-search,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(180, 83, 9, 0.18);
    border-radius: 16px;
    padding: 0 16px;
    outline: none;
    color: #451a03;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(120, 53, 15, 0.08);
}

.search-rank-link {
    white-space: nowrap;
    color: #451a03;
    background: #fef3c7;
}

.hero-thumbs {
    display: grid;
    gap: 12px;
}

.hero-dot {
    display: grid;
    grid-template-columns: 74px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    text-align: left;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: 0.2s ease;
}

.hero-dot img {
    width: 74px;
    height: 54px;
    border-radius: 12px;
}

.hero-dot span {
    font-weight: 900;
}

.hero-dot.is-active,
.hero-dot:hover {
    background: rgba(245, 158, 11, 0.3);
    border-color: rgba(253, 230, 138, 0.5);
}

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

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

.section-title h2 {
    color: #451a03;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-title a {
    color: #b45309;
    font-weight: 900;
}

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

.category-tile {
    min-height: 168px;
    padding: 22px;
    border-radius: 26px;
    color: #78350f;
    background: linear-gradient(135deg, #ffffff, #fef3c7);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    transition: 0.2s ease;
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 23px;
    font-weight: 950;
}

.category-tile span {
    color: #7c2d12;
    line-height: 1.7;
}

.movie-grid,
.rank-grid,
.overview-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(120, 53, 15, 0.12);
    transition: 0.2s ease;
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #fef3c7;
}

.poster img {
    transition: transform 0.28s ease;
}

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

.poster-year,
.rank-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

.poster-year {
    right: 10px;
    padding: 6px 9px;
    color: #451a03;
    background: #fbbf24;
}

.rank-badge {
    left: 10px;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.26);
}

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

.movie-card h3 {
    margin-bottom: 8px;
    color: #451a03;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.3;
}

.movie-card p {
    min-height: 48px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.movie-meta {
    margin-top: 12px;
}

.movie-meta span {
    color: #78350f;
    background: #fffbeb;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 108px 1fr;
}

.compact-card .poster {
    aspect-ratio: auto;
    min-height: 154px;
}

.compact-card .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plain-page {
    min-height: 70vh;
}

.page-hero {
    display: flex;
    align-items: center;
    min-height: 340px;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.compact-page-hero h1,
.category-page-hero h1 {
    max-width: 780px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.07em;
}

.compact-page-hero span,
.category-page-hero span {
    display: block;
    max-width: 720px;
    margin-top: 18px;
    color: #fffbeb;
    font-size: 18px;
    line-height: 1.8;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: 0.2s ease;
}

.category-cover {
    min-height: 180px;
    border-radius: 22px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.category-cover span {
    font-size: 26px;
    font-weight: 950;
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.category-overview-card h2 {
    margin: 6px 0 10px;
    color: #451a03;
    font-size: 26px;
    font-weight: 950;
}

.category-overview-card p {
    color: #6b7280;
    line-height: 1.8;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mini-links a,
.chip-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: #78350f;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 800;
}

.chip-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.chip-link.is-current {
    color: #451a03;
    background: #fbbf24;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(120, 53, 15, 0.1);
}

.movie-detail-page {
    background: linear-gradient(180deg, #451a03 0, #fffbeb 580px, #ffffff 100%);
}

.detail-hero {
    min-height: 560px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #fde68a;
    font-weight: 800;
}

.detail-info h1 {
    max-width: 860px;
    font-size: clamp(42px, 7vw, 82px);
    font-weight: 950;
    letter-spacing: -0.07em;
    line-height: 1;
}

.detail-one-line {
    max-width: 780px;
    margin-top: 22px;
    color: #fffbeb;
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    margin-top: 20px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 32px;
    background: #111827;
    box-shadow: 0 34px 90px rgba(17, 24, 39, 0.22);
}

.player-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
    transition: opacity 0.2s ease;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 7px;
    color: #451a03;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    font-size: 36px;
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.36);
}

.player-cover strong {
    font-size: 24px;
    font-weight: 950;
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.content-card {
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.content-card h2 {
    margin-bottom: 14px;
    color: #451a03;
    font-size: 26px;
    font-weight: 950;
}

.content-card p {
    color: #4b5563;
    line-height: 2;
}

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

.info-list div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: baseline;
}

.info-list dt {
    color: #92400e;
    font-weight: 900;
}

.info-list dd {
    color: #4b5563;
}

.site-footer {
    margin-top: 40px;
    padding: 44px 0;
    color: #78350f;
    background: #fffbeb;
    border-top: 1px solid rgba(245, 158, 11, 0.18);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.footer-inner p {
    max-width: 560px;
    margin-top: 10px;
    color: #92400e;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    color: #78350f;
    background: #fef3c7;
    font-weight: 800;
}

[data-search-card].is-hidden {
    display: none;
}

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

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

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

@media (max-width: 860px) {
    .site-header-inner {
        height: 64px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        padding: 14px;
        border-radius: 22px;
        background: rgba(255, 251, 235, 0.98);
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .home-hero {
        grid-template-columns: 1fr;
    }

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

    .hero-panel {
        border-left: 0;
    }

    .hero-content {
        width: min(100% - 32px, 720px);
        margin: 0 auto;
    }

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

    .rank-grid,
    .overview-grid,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

    .category-overview-card,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 280px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .container-narrow,
    .site-header-inner,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .site-logo,
    .footer-logo {
        font-size: 19px;
    }

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

    .hero-panel {
        padding: 18px;
    }

    .search-line,
    .section-title {
        flex-direction: column;
        align-items: stretch;
    }

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

    .compact-card {
        grid-template-columns: 96px 1fr;
    }

    .category-overview-card {
        padding: 12px;
    }

    .category-cover {
        min-height: 150px;
    }

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

    .movie-player {
        border-radius: 20px;
    }
}
