:root {
    --bg: #fffaf0;
    --paper: #ffffff;
    --paper-soft: #fff7ed;
    --ink: #111827;
    --muted: #6b7280;
    --line: #fde68a;
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-soft: #fef3c7;
    --shadow: 0 24px 60px rgba(146, 64, 14, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 40%, #fffaf0 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(251, 191, 36, 0.25);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.nav-wrap,
.footer-grid,
.section,
.breadcrumb,
.detail-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-wrap {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
}

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

.brand-text strong {
    font-size: 1.28rem;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}

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

.main-nav a,
.nav-dropdown button {
    color: #374151;
    font-weight: 700;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown button:hover {
    color: var(--brand);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    padding: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    background: #ffffff;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(8px);
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
}

.dropdown-menu a:hover {
    background: var(--brand-soft);
}

.nav-search {
    display: flex;
    align-items: center;
    width: 280px;
    padding: 6px;
    gap: 6px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 999px;
    background: #ffffff;
}

.nav-search input,
.hero-search input,
.search-large input,
.filter-panel input,
.filter-panel select,
.mobile-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.nav-search button,
.hero-search button,
.search-large button,
.mobile-panel button {
    border: 0;
    color: #ffffff;
    white-space: nowrap;
    padding: 9px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #ffffff;
    background: var(--brand);
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--paper-soft);
    font-weight: 700;
}

.mobile-panel form {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

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

.hero-slide > img,
.detail-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at 20% 25%, #f59e0b, transparent 38%), linear-gradient(135deg, #111827, #7c2d12);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.52) 46%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1200px) / 2));
    top: 50%;
    width: min(620px, calc(100% - 64px));
    transform: translateY(-50%);
    color: #ffffff;
}

.hero-kicker,
.eyebrow {
    margin-bottom: 12px;
    color: #fbbf24;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-weight: 900;
    line-height: 1.12;
}

.hero-content h1,
.hero-content h2 {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-content p,
.page-hero p,
.detail-info p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
}

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

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

.hero-tags span,
.detail-meta span {
    padding: 7px 12px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 15px 32px rgba(234, 88, 12, 0.34);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    color: #ffffff;
    font-size: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 36px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.is-active {
    background: #f59e0b;
}

.section {
    padding: 70px 0;
}

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

.section-head.centered {
    display: block;
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
}

.section-head h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.18;
}

.section-head p,
.detail-content p,
.category-body p {
    color: var(--muted);
}

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

.intro-section {
    padding-bottom: 30px;
}

.hero-search,
.search-large {
    display: flex;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto;
    padding: 10px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.hero-search input,
.search-large input {
    padding: 0 16px;
}

.rail {
    display: flex;
    gap: 22px;
    padding: 10px 0 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.rail .movie-card {
    flex: 0 0 288px;
    scroll-snap-align: start;
}

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

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: var(--radius);
    box-shadow: 0 18px 45px rgba(120, 53, 15, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: radial-gradient(circle at 28% 22%, rgba(245, 158, 11, 0.82), transparent 35%), linear-gradient(135deg, #1f2937, #7c2d12);
}

.movie-card-compact .card-poster {
    aspect-ratio: 16 / 10;
}

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

.card-poster img.is-hidden {
    opacity: 0;
}

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

.card-badge,
.card-play {
    position: absolute;
    z-index: 2;
}

.card-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
}

.card-play {
    right: 14px;
    bottom: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 18px;
}

.card-meta {
    margin-bottom: 10px;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

.card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #d1d5db;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 1.12rem;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--brand);
}

.card-body p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.94rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-tags {
    margin-top: 14px;
}

.card-tags span {
    padding: 5px 9px;
    color: #9a3412;
    font-size: 0.76rem;
    border-radius: 999px;
    background: var(--paper-soft);
}

.warm-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100vw - 1200px) / 2));
    padding-right: max(16px, calc((100vw - 1200px) / 2));
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.85), rgba(255, 237, 213, 0.85));
}

.pale-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100vw - 1200px) / 2));
    padding-right: max(16px, calc((100vw - 1200px) / 2));
    background: linear-gradient(180deg, #f9fafb, #ffffff);
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.tab-buttons button {
    padding: 10px 18px;
    color: #7c2d12;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
}

.tab-buttons button.is-active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.25);
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.section-link {
    display: inline-flex;
    margin-top: 24px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 82% 16%, rgba(245, 158, 11, 0.9), transparent 28%), linear-gradient(135deg, #111827 0%, #7c2d12 100%);
}

.page-hero > div {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0;
}

.compact-hero > div {
    padding: 74px 0;
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

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

.category-tile {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: var(--radius);
    box-shadow: 0 18px 45px rgba(120, 53, 15, 0.1);
}

.category-cover {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #1f2937, #7c2d12);
}

.category-cover img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
}

.category-cover span {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 8px 12px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(8px);
    font-weight: 800;
}

.category-body h2 {
    margin: 4px 0 10px;
}

.mini-posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 18px 0;
}

.mini-posters img {
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: #fef3c7;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 26px;
}

.filter-panel input,
.filter-panel select {
    height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 14px;
    background: #ffffff;
}

.empty-state {
    display: none;
    padding: 38px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.empty-state.is-visible {
    display: block;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 150px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.rank-num {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: #ffffff;
    border-radius: 18px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    font-weight: 900;
}

.rank-cover img {
    width: 150px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
    background: #fef3c7;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

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

.breadcrumb {
    padding: 22px 0;
    color: var(--muted);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--brand-dark);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #111827;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    filter: saturate(1.05);
}

.detail-overlay {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.76));
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #7c2d12;
}

.detail-info {
    color: #ffffff;
}

.detail-info h1 {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
}

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

.player-section {
    padding-bottom: 36px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(17, 24, 39, 0.22);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.68));
    cursor: pointer;
}

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

.player-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 18px 35px rgba(234, 88, 12, 0.38);
    font-size: 2.4rem;
}

.detail-content article {
    padding: 32px;
    background: #ffffff;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: var(--radius);
    box-shadow: 0 18px 45px rgba(120, 53, 15, 0.08);
}

.detail-content p {
    margin: 12px 0 24px;
    font-size: 1.05rem;
}

.search-section {
    min-height: 420px;
}

.search-large {
    margin-bottom: 32px;
}

.site-footer {
    margin-top: 60px;
    padding: 48px 0 24px;
    color: #fef3c7;
    background: linear-gradient(135deg, #111827, #7c2d12);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 38px;
}

.footer-brand {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 1.45rem;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: rgba(254, 243, 199, 0.78);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.site-footer nav a {
    padding: 8px 12px;
    border: 1px solid rgba(254, 243, 199, 0.22);
    border-radius: 999px;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 18px;
    color: rgba(254, 243, 199, 0.62);
    border-top: 1px solid rgba(254, 243, 199, 0.16);
    text-align: center;
}

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

    .mobile-toggle {
        display: grid;
        place-items: center;
    }

    .hero {
        height: 560px;
    }

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

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

    .site-footer nav {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .brand-text small {
        display: none;
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        left: 18px;
        width: calc(100% - 36px);
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 46px 0;
    }

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

    .hero-search,
    .search-large {
        border-radius: 24px;
        flex-direction: column;
    }

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

    .category-tile,
    .detail-grid,
    .rank-item,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        padding: 42px 0;
    }

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

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

@media (max-width: 520px) {
    .nav-wrap,
    .section,
    .breadcrumb,
    .detail-grid,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1200px);
    }

    .movie-grid,
    .movie-grid.three-col,
    .movie-grid.four-col {
        grid-template-columns: 1fr;
    }

    .card-poster,
    .movie-card-compact .card-poster {
        aspect-ratio: 16 / 10;
    }
}
