:root {
    --bg: #fffaf0;
    --bg-soft: #fffbeb;
    --panel: rgba(255, 255, 255, 0.86);
    --text: #271a12;
    --muted: #75614f;
    --line: rgba(180, 83, 9, 0.18);
    --brand: #b45309;
    --brand-dark: #78350f;
    --brand-light: #f59e0b;
    --accent: #f97316;
    --shadow: 0 18px 45px rgba(120, 53, 15, 0.13);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(251, 191, 36, 0.22), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 45%, #fff7ed 100%);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    box-shadow: 0 10px 24px rgba(180, 83, 9, 0.28);
}

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

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

.brand-text em {
    margin-top: 4px;
    font-style: normal;
    font-size: 12px;
    color: var(--brand);
}

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

.nav-link,
.mobile-link {
    border-radius: 999px;
    color: #5d4636;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--brand-dark);
    background: rgba(251, 191, 36, 0.22);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.2);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--brand-dark);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.mobile-nav.open {
    display: grid;
    gap: 6px;
}

.mobile-link {
    padding: 11px 14px;
}

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
    background-size: cover;
    background-position: center;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(39, 26, 18, 0.82) 0%, rgba(76, 43, 16, 0.58) 43%, rgba(255, 251, 235, 0.2) 100%),
        radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.32), transparent 36%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.52fr);
    align-items: center;
    gap: 40px;
    padding: 80px 0 70px;
}

.hero-copy {
    color: #fff;
    max-width: 680px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy .eyebrow {
    color: #fbbf24;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.btn,
.btn-ghost,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-light), var(--accent));
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.32);
}

.btn:hover,
.btn-ghost:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(12px);
}

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

.hero-tags span,
.tag-row span,
.info-chip {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

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

.hero-poster {
    position: relative;
    min-height: 420px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(39, 26, 18, 0.38);
    transform: rotate(2deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(39, 26, 18, 0.72));
}

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

.hero-dot {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel {
    margin-top: -34px;
    position: relative;
    z-index: 6;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 0 10px;
    color: var(--text);
    background: transparent;
    font-size: 16px;
}

.search-box span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 10px 16px;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
}

.section {
    padding: 66px 0;
}

.section.alt {
    background: rgba(255, 255, 255, 0.48);
}

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

.section-head h2,
.page-title h1,
.detail-info h1,
.text-content h2 {
    margin: 0;
    color: var(--brand-dark);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head h2 {
    font-size: clamp(26px, 4vw, 42px);
}

.section-head p,
.page-title p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: var(--brand-dark);
    background: rgba(251, 191, 36, 0.22);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.score,
.type-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    backdrop-filter: blur(10px);
}

.score {
    left: 12px;
    background: rgba(180, 83, 9, 0.86);
}

.type-badge {
    right: 12px;
    background: rgba(39, 26, 18, 0.7);
}

.card-body {
    padding: 16px;
}

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

.card-body p {
    min-height: 50px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #9a6530;
    font-size: 13px;
    font-weight: 700;
}

.tag-row span {
    padding: 5px 9px;
    color: #7c2d12;
    background: #ffedd5;
}

.movie-card.compact .card-body p {
    min-height: auto;
}

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

.category-tile {
    position: relative;
    min-height: 168px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.9), rgba(249, 115, 22, 0.78));
    box-shadow: var(--shadow);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.category-tile strong {
    position: relative;
    font-size: 24px;
    line-height: 1.1;
}

.category-tile span {
    position: relative;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0;
    background: linear-gradient(135deg, #fffbeb 0%, #fed7aa 100%);
}

.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    right: -110px;
    top: -150px;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.32);
}

.page-title {
    position: relative;
    z-index: 2;
}

.page-title h1 {
    font-size: clamp(32px, 5vw, 54px);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.filter-bar input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 25px rgba(120, 53, 15, 0.08);
    font-size: 16px;
}

.empty-state {
    display: none;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.78);
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 25px rgba(120, 53, 15, 0.08);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
}

.rank-cover {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
}

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

.rank-info h3 {
    margin: 0 0 6px;
    color: var(--brand-dark);
    font-size: 18px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-score {
    color: var(--brand-dark);
    font-size: 20px;
    font-weight: 900;
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(120, 53, 15, 0.22);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: #9a6530;
    font-size: 14px;
    font-weight: 700;
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 60px);
}

.detail-info .lead {
    max-width: 760px;
    margin: 18px 0 0;
    color: #5d4636;
    font-size: 18px;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.info-chip {
    padding: 8px 13px;
    color: #7c2d12;
    background: rgba(255, 237, 213, 0.96);
    border: 1px solid rgba(251, 191, 36, 0.22);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #111827;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.28);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: #fff7ed;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
    font-size: 28px;
    font-weight: 900;
}

.player-overlay span:last-child {
    font-size: 18px;
    font-weight: 850;
}

.text-content {
    display: grid;
    gap: 18px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.text-content h2 {
    font-size: 28px;
}

.text-content p {
    margin: 0;
    color: #5d4636;
    font-size: 16px;
}

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

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

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

    .hero-poster {
        display: none;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 560px;
    }

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

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

    .search-box {
        grid-template-columns: 1fr;
    }

    .search-box span {
        min-width: 0;
    }

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

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

    .card-body {
        padding: 13px;
    }

    .card-body h3 {
        font-size: 16px;
    }

    .card-body p {
        min-height: auto;
        font-size: 13px;
    }

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

    .rank-score {
        grid-column: 3;
        font-size: 16px;
    }

    .detail-layout {
        gap: 24px;
    }

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

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

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text em {
        display: none;
    }

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

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

    .page-hero,
    .detail-hero,
    .section {
        padding: 46px 0;
    }
}
