:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-400: #a8a29e;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --text: #292524;
    --muted: #6b625c;
    --card: #ffffff;
    --radius: 24px;
    --shadow: 0 18px 55px rgba(41, 37, 36, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, var(--stone-50) 0%, rgba(254, 243, 199, 0.42) 48%, var(--stone-100) 100%);
}

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

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

main {
    min-height: 70vh;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    color: var(--amber-50);
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.96), rgba(120, 53, 15, 0.72));
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(68, 64, 60, 0.18);
}

.nav-wrap {
    max-width: 1220px;
    height: 72px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--amber-900);
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.brand-text {
    font-size: 22px;
}

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

.nav-link,
.mobile-link {
    color: var(--amber-100);
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-300);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--amber-50);
}

.mobile-nav {
    display: none;
    padding: 0 22px 18px;
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--amber-200);
    background: rgba(146, 64, 14, 0.68);
}

.hero-carousel {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: var(--stone-900);
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

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

.hero-overlay,
.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.72) 38%, rgba(28, 25, 23, 0.26) 100%),
        linear-gradient(0deg, rgba(28, 25, 23, 0.92) 0%, rgba(28, 25, 23, 0.12) 58%, rgba(28, 25, 23, 0.58) 100%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 1220px;
    margin: 0 auto;
    padding: 190px 22px 130px;
    color: var(--amber-50);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--amber-500);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-desc {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 251, 235, 0.86);
    font-size: 19px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

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

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
    border: 1px solid rgba(253, 230, 138, 0.28);
    border-radius: 999px;
    color: var(--amber-100);
    background: rgba(120, 53, 15, 0.35);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 700;
}

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

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-size: 12px;
    font-weight: 700;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: var(--amber-950, #451a03);
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.32);
}

.btn.ghost {
    color: var(--amber-50);
    border-color: rgba(253, 230, 138, 0.38);
    background: rgba(255, 255, 255, 0.08);
}

.btn.ghost.light {
    color: var(--amber-900);
    border-color: rgba(120, 53, 15, 0.18);
    background: rgba(255, 255, 255, 0.62);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 251, 235, 0.42);
    cursor: pointer;
}

.hero-dot.active {
    width: 38px;
    border-radius: 999px;
    background: var(--amber-300);
}

.search-band,
.content-section,
.split-section,
.detail-content,
.player-section {
    max-width: 1220px;
    margin: 0 auto;
    padding: 58px 22px;
}

.search-band {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    align-items: center;
    gap: 28px;
    margin-top: -55px;
    position: relative;
    z-index: 6;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-band h2,
.section-head h2,
.ranking-panel h2,
.detail-block h2 {
    margin: 0;
    color: var(--stone-900);
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -0.04em;
}

.search-form,
.toolbar {
    display: flex;
    gap: 12px;
}

.search-form input,
.toolbar input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--stone-200);
    border-radius: 18px;
    padding: 0 16px;
    color: var(--text);
    background: var(--stone-50);
    outline: none;
    font-size: 15px;
}

.search-form input:focus,
.toolbar input:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.search-form button {
    min-width: 104px;
    border: 0;
    border-radius: 18px;
    color: #451a03;
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    font-weight: 900;
    cursor: pointer;
}

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

.section-head p,
.page-hero p,
.category-card p,
.category-overview p,
.footer-brand p,
.detail-lead,
.detail-block p,
.movie-card p {
    color: var(--muted);
    line-height: 1.75;
}

.section-head p {
    margin: 10px 0 0;
}

.section-more,
.panel-link {
    color: var(--amber-800);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.88);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 8px 30px rgba(41, 37, 36, 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.36);
    box-shadow: 0 20px 50px rgba(41, 37, 36, 0.16);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--stone-200);
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.82), transparent);
}

.poster-type,
.rank-num {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.poster-type {
    top: 12px;
    right: 12px;
    padding: 6px 9px;
    color: #451a03;
    background: var(--amber-200);
}

.rank-num {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--amber-50);
    background: rgba(120, 53, 15, 0.88);
}

.card-body {
    padding: 16px;
}

.card-meta {
    margin-bottom: 8px;
    color: var(--amber-800);
    font-size: 12px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--amber-700);
}

.movie-card p {
    min-height: 52px;
    margin: 10px 0 14px;
    font-size: 14px;
}

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

.split-section > div .content-section {
    padding: 0;
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 26px;
    border-radius: 28px;
    color: var(--stone-100);
    background: linear-gradient(180deg, var(--stone-900), #0c0a09);
    box-shadow: var(--shadow);
}

.ranking-panel h2 {
    color: var(--amber-100);
    margin-bottom: 18px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 6px 12px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 251, 235, 0.1);
}

.ranking-index {
    grid-row: span 2;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #451a03;
    background: var(--amber-300);
    font-weight: 900;
}

.ranking-title {
    color: var(--amber-50);
    font-weight: 800;
}

.ranking-meta {
    color: var(--stone-400);
    font-size: 13px;
}

.panel-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--amber-300);
}

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

.category-card,
.category-overview {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: var(--card);
    box-shadow: 0 10px 34px rgba(41, 37, 36, 0.1);
}

.category-card {
    min-height: 260px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--amber-50);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.35s ease;
}

.category-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.12));
    z-index: 1;
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 251, 235, 0.82);
    font-size: 14px;
}

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

.page-hero {
    padding: 150px 22px 78px;
    color: var(--amber-50);
    background:
        radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.24), transparent 32%),
        linear-gradient(135deg, var(--stone-900), var(--amber-900));
}

.page-hero.slim {
    padding-bottom: 62px;
}

.page-hero > * {
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero h1 {
    color: var(--amber-50);
}

.page-hero p {
    max-width: 760px;
    margin-top: 18px;
    color: rgba(255, 251, 235, 0.8);
    font-size: 18px;
}

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

.category-overview {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 22px;
    padding: 18px;
    align-items: center;
}

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

.category-preview img {
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.category-overview h2 {
    margin: 0;
    font-size: 28px;
}

.toolbar {
    margin-bottom: 24px;
}

.toolbar.stacked {
    flex-direction: column;
}

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

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(120, 53, 15, 0.18);
    border-radius: 999px;
    color: var(--amber-900);
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
    border-color: transparent;
    color: #451a03;
    background: var(--amber-300);
}

.empty-state {
    display: none;
    margin: 32px 0 0;
    padding: 28px;
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.76);
}

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

.detail-hero {
    position: relative;
    min-height: 690px;
    color: var(--amber-50);
    overflow: hidden;
    background: var(--stone-900);
}

.detail-bg,
.detail-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.detail-bg img {
    object-fit: cover;
    filter: blur(2px) saturate(0.95);
    transform: scale(1.04);
}

.detail-wrap {
    position: relative;
    z-index: 2;
    max-width: 1220px;
    margin: 0 auto;
    padding: 140px 22px 70px;
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 48px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 251, 235, 0.72);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--amber-300);
}

.detail-copy h1 {
    color: var(--amber-50);
}

.detail-lead {
    max-width: 780px;
    margin: 22px 0;
    color: rgba(255, 251, 235, 0.86);
    font-size: 19px;
}

.detail-tags {
    margin-top: 18px;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.stream-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    color: var(--amber-50);
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.28), rgba(28, 25, 23, 0.76));
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.2s ease;
}

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

.player-overlay span {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #451a03;
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    font-size: 30px;
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
}

.player-overlay strong {
    font-size: 22px;
}

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

.detail-block {
    padding: 30px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 32px rgba(41, 37, 36, 0.08);
}

.detail-block p {
    margin-bottom: 0;
    font-size: 17px;
}

.related-section {
    padding-top: 14px;
}

.site-footer {
    margin-top: 40px;
    color: var(--stone-300, #d6d3d1);
    background: linear-gradient(180deg, var(--stone-900), #0c0a09);
}

.footer-inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 38px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    max-width: 560px;
}

.footer-brand strong {
    margin-left: 10px;
    color: var(--amber-100);
    font-size: 20px;
}

.footer-brand p {
    margin: 14px 0 0;
    color: var(--stone-400);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-links a {
    color: var(--amber-200);
    font-weight: 800;
}

.footer-bottom {
    padding: 16px 22px 22px;
    border-top: 1px solid rgba(255, 251, 235, 0.08);
    color: var(--stone-400);
    text-align: center;
    font-size: 14px;
}

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

    .split-section,
    .search-band {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

    .brand-text {
        font-size: 19px;
    }

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

    .hero-copy {
        padding-top: 150px;
    }

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

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

    .detail-wrap {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 130px;
    }

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

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

@media (max-width: 560px) {
    .nav-wrap {
        height: 64px;
        padding: 0 16px;
    }

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

    .hero-copy {
        padding: 128px 18px 110px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

    .hero-desc,
    .page-hero p,
    .detail-lead {
        font-size: 16px;
    }

    .search-band,
    .content-section,
    .split-section,
    .detail-content,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .search-band {
        margin-top: -36px;
        border-radius: 22px;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form button {
        min-height: 48px;
    }

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

    .page-hero {
        padding-top: 118px;
    }

    .detail-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .player-overlay span {
        width: 64px;
        height: 64px;
    }
}
