:root {
    --bg: #fff8ed;
    --panel: #ffffff;
    --ink: #261407;
    --muted: #865f2c;
    --soft: #fff1d5;
    --line: rgba(159, 103, 23, 0.18);
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-deep: #451a03;
    --shadow: 0 22px 55px rgba(120, 53, 15, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(251, 191, 36, 0.24), transparent 28rem),
        linear-gradient(180deg, #fff8ed 0%, #ffffff 45%, #fffaf1 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

img {
    max-width: 100%;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(217, 119, 6, 0.18);
    background: rgba(255, 248, 237, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    color: var(--brand-deep);
}

.brand-text small {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

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

.nav-link {
    padding: 9px 6px;
    color: #6b3d0a;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand);
    transform: translateY(-1px);
}

.nav-link-sub {
    font-size: 14px;
    color: #9a651a;
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 999px;
    background: #ffffff;
}

.top-search input,
.search-page-form input,
.local-filter {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.top-search input {
    width: 190px;
    padding: 6px 8px 6px 12px;
}

.top-search button,
.search-page-form button,
.primary-btn {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.22);
    cursor: pointer;
}

.top-search button {
    padding: 8px 14px;
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--brand-dark);
    background: transparent;
    font-size: 24px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.mobile-nav a {
    padding: 10px;
    text-align: center;
    border-radius: 14px;
    color: var(--brand-dark);
    background: #fff4de;
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    background: #1c0f05;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.hero-slide > img.image-missing,
.poster img.image-missing,
.poster-large img.image-missing,
.category-cover img.image-missing {
    opacity: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(34, 17, 3, 0.92) 0%, rgba(68, 32, 4, 0.62) 44%, rgba(83, 46, 8, 0.28) 100%),
        radial-gradient(circle at 75% 18%, rgba(251, 191, 36, 0.32), transparent 30rem);
}

.hero-content {
    position: relative;
    z-index: 3;
    min-height: 74vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(42px, 8vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
    line-height: 1.8;
}

.hero-tags,
.tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    padding: 7px 12px;
    color: #fffbeb;
    background: rgba(255, 255, 255, 0.18);
}

.tags span {
    padding: 5px 9px;
    color: #92400e;
    background: #ffedd5;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.page-hero .ghost-btn {
    border-color: rgba(217, 119, 6, 0.25);
    color: var(--brand-dark);
    background: #fff7e8;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.stats-strip {
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: -36px;
}

.stats-strip div {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.stats-strip strong {
    display: block;
    color: var(--brand-dark);
    font-size: 30px;
}

.stats-strip span {
    color: var(--muted);
    font-weight: 700;
}

.section,
.page-main {
    padding: 64px 0;
}

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

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

.section-heading h2 {
    margin: 0;
    color: var(--brand-deep);
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-more,
.text-link {
    color: var(--brand);
    font-weight: 800;
}

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

.category-tile {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.34), transparent 11rem),
        #ffffff;
    box-shadow: 0 16px 36px rgba(146, 64, 14, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile span {
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: var(--brand);
    font-size: 42px;
    line-height: 1;
}

.category-tile small {
    color: var(--muted);
    line-height: 1.6;
}

.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: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 32px rgba(146, 64, 14, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster img,
.poster-large img,
.category-cover img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster em {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 4;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(69, 26, 3, 0.76);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.poster-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.card-body h3 {
    margin: 7px 0 8px;
    color: var(--brand-deep);
    font-size: 18px;
    line-height: 1.35;
}

.card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: #6f4a1b;
    font-size: 14px;
    line-height: 1.7;
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 170px 1fr;
}

.horizontal-card .poster {
    aspect-ratio: 4 / 5;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 5;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    box-shadow: 0 12px 20px rgba(127, 29, 29, 0.24);
}

.page-hero {
    margin-top: 34px;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 85% 20%, rgba(251, 191, 36, 0.3), transparent 18rem),
        linear-gradient(135deg, #fff7ed, #ffffff);
    box-shadow: var(--shadow);
}

.page-hero.compact {
    padding: 42px;
}

.page-hero .eyebrow {
    border-color: rgba(217, 119, 6, 0.18);
    color: var(--brand-dark);
    background: #fffbeb;
}

.page-hero h1 {
    margin: 0 0 12px;
    color: var(--brand-deep);
    font-size: clamp(34px, 6vw, 64px);
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(146, 64, 14, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #451a03, #d97706);
}

.category-cover span {
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 4;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.category-overview-card h2 {
    margin: 0 0 8px;
    color: var(--brand-deep);
    font-size: 24px;
}

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

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
}

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

.filter-chip {
    padding: 8px 14px;
    border: 1px solid rgba(217, 119, 6, 0.24);
    border-radius: 999px;
    color: var(--brand-dark);
    background: #fff7ed;
    font-weight: 800;
}

.filter-chip.active {
    color: #ffffff;
    background: var(--brand);
}

.local-filter {
    min-width: 260px;
    padding: 12px 16px;
    border: 1px solid rgba(217, 119, 6, 0.24);
    border-radius: 999px;
    background: #fffaf1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 28px 0 18px;
    color: var(--muted);
    font-weight: 700;
}

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

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

.player-panel,
.detail-content,
.side-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(146, 64, 14, 0.08);
}

.player-panel {
    overflow: hidden;
}

.video-player {
    position: relative;
    background: #1c0f05;
}

.video-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.46));
    cursor: pointer;
}

.play-overlay span {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
    font-size: 26px;
}

.play-overlay strong {
    font-size: 18px;
}

.video-player.loaded .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.player-status {
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 5;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(0, 0, 0, 0.48);
    font-size: 12px;
}

.detail-content {
    margin-top: 22px;
    padding: 28px;
}

.detail-content h1 {
    margin: 0 0 12px;
    color: var(--brand-deep);
    font-size: clamp(30px, 5vw, 52px);
    letter-spacing: -0.05em;
}

.detail-content h2 {
    margin: 30px 0 10px;
    color: var(--brand-dark);
    font-size: 24px;
}

.detail-content p {
    margin: 0;
    color: #604016;
    line-height: 1.95;
}

.detail-meta {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: #fff1d5;
    font-weight: 800;
    font-size: 13px;
}

.large-tags {
    margin: 12px 0 8px;
}

.detail-side {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 18px;
}

.side-card {
    overflow: hidden;
    padding: 20px;
}

.poster-large {
    position: relative;
    padding: 0;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #451a03, #d97706);
}

.side-card h2 {
    margin: 0 0 16px;
    color: var(--brand-deep);
}

.side-card dl {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    margin: 0;
}

.side-card dt {
    color: var(--muted);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: var(--ink);
}

.search-page-form {
    display: flex;
    gap: 10px;
    width: min(720px, 100%);
    margin-top: 26px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.search-page-form input {
    flex: 1;
    padding: 10px 16px;
    font-size: 16px;
}

.search-page-form button {
    padding: 0 24px;
}

.site-footer {
    margin-top: 40px;
    padding: 44px 0;
    border-top: 1px solid var(--line);
    background: #fff7e8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 28px;
}

.footer-grid p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: var(--brand-deep);
}

.footer-grid a:not(.brand) {
    display: block;
    margin-bottom: 9px;
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 1024px) {
    .main-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .mobile-nav.open {
        display: grid;
    }

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

    .detail-grid,
    .footer-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .hero-content h1 {
        font-size: 46px;
    }

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

    .stats-strip,
    .category-grid,
    .movie-grid,
    .hot-layout {
        grid-template-columns: 1fr;
    }

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

    .toolbar,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .local-filter {
        min-width: 0;
        width: 100%;
    }

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