:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --ink: #2d1f0f;
    --muted: #7c5f38;
    --line: rgba(146, 64, 14, 0.16);
    --amber: #d97706;
    --orange: #ea580c;
    --deep: #451a03;
    --card: rgba(255, 255, 255, 0.86);
    --shadow: 0 24px 60px rgba(120, 53, 15, 0.18);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 10%, rgba(245, 158, 11, 0.22), transparent 30%),
        radial-gradient(circle at 90% 0%, rgba(234, 88, 12, 0.18), transparent 28%),
        linear-gradient(180deg, #fffbeb 0%, #fff7ed 38%, #ffffff 100%);
    min-height: 100vh;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 251, 235, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(120, 53, 15, 0.08);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.brand-text {
    font-size: 1.35rem;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #5b4322;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    transform: translateY(-1px);
}

.top-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.search-hero-form input,
.filter-row input,
.filter-row select {
    border: 1px solid rgba(217, 119, 6, 0.24);
    background: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    min-height: 42px;
    padding: 0 16px;
    outline: none;
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.top-search input:focus,
.mobile-search input:focus,
.search-hero-form input:focus,
.filter-row input:focus,
.filter-row select:focus {
    border-color: rgba(217, 119, 6, 0.65);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.top-search button,
.mobile-search button,
.search-hero-form button,
.btn,
.card-link {
    border: 0;
    border-radius: 999px;
    min-height: 42px;
    padding: 0 18px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.top-search button:hover,
.mobile-search button:hover,
.search-hero-form button:hover,
.btn:hover,
.card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(217, 119, 6, 0.33);
}

.btn.ghost {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: none;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: #fff;
    color: var(--amber);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 22px;
    box-shadow: 0 12px 24px rgba(120, 53, 15, 0.12);
}

.mobile-panel {
    display: none;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
}

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

.mobile-search {
    display: flex;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: var(--deep);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.06);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(45, 31, 15, 0.94) 0%, rgba(69, 26, 3, 0.72) 44%, rgba(69, 26, 3, 0.16) 100%),
        linear-gradient(0deg, rgba(69, 26, 3, 0.58), rgba(69, 26, 3, 0.04));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 120px 24px 110px;
    margin-left: max(24px, calc((100vw - 1280px) / 2));
}

.hero-kicker,
.section-heading p,
.page-hero p,
.category-card-large p {
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.7rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.08em;
    text-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
}

.hero p {
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.9;
    max-width: 680px;
}

.hero-tags,
.tag-row,
.detail-meta,
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.86rem;
}

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

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

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

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

.hero-dots button.active {
    width: 34px;
    background: #f59e0b;
}

.section-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 62px 24px;
}

.quick-search {
    margin-top: -50px;
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(217, 119, 6, 0.14);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-hero-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
}

.search-hero-form input {
    min-height: 54px;
    font-size: 1rem;
}

.category-pills {
    margin-top: 18px;
}

.category-pills a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: #7c2d12;
    background: rgba(251, 191, 36, 0.16);
    border: 1px solid rgba(217, 119, 6, 0.14);
    font-weight: 800;
}

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

.section-heading.compact {
    align-items: center;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.article-panel h2,
.side-panel h2,
.spotlight-panel h2 {
    margin: 0;
    color: var(--deep);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.section-heading a {
    color: var(--amber);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid rgba(217, 119, 6, 0.14);
    box-shadow: 0 18px 44px rgba(120, 53, 15, 0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(217, 119, 6, 0.36);
    box-shadow: 0 28px 64px rgba(120, 53, 15, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.18;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.28), rgba(234, 88, 12, 0.22));
}

.poster-link img {
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-shine {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(69, 26, 3, 0.72), transparent);
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.card-meta span {
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.14);
    padding: 3px 8px;
}

.movie-card h2 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.35;
    color: var(--deep);
}

.movie-card p {
    margin: 10px 0 14px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.94rem;
}

.tag-row span {
    color: #92400e;
    background: rgba(245, 158, 11, 0.13);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 26px;
}

.ranking-panel,
.spotlight-panel,
.article-panel,
.side-panel,
.player-card,
.filter-panel,
.category-card-large {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(217, 119, 6, 0.14);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.ranking-panel,
.spotlight-panel {
    padding: 28px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 64px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 247, 237, 0.78);
    border: 1px solid rgba(217, 119, 6, 0.1);
}

.rank-num {
    color: #f59e0b;
    font-size: 1.25rem;
    font-weight: 950;
}

.rank-item img {
    width: 64px;
    height: 82px;
    border-radius: 14px;
    background: rgba(217, 119, 6, 0.18);
}

.rank-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.rank-copy strong,
.rank-copy em {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-copy em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.88rem;
}

.spotlight-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(69, 26, 3, 0.93), rgba(146, 64, 14, 0.9)),
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.36), transparent 45%);
    color: #fff7ed;
}

.spotlight-panel h2 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 4rem);
}

.spotlight-panel p {
    color: rgba(255, 247, 237, 0.84);
    line-height: 1.9;
    margin: 18px 0 24px;
}

.page-hero {
    max-width: 1280px;
    margin: 36px auto 0;
    padding: 74px 24px 30px;
}

.page-hero > div {
    padding: 52px;
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(69, 26, 3, 0.93), rgba(146, 64, 14, 0.88)),
        radial-gradient(circle at 88% 8%, rgba(251, 191, 36, 0.36), transparent 38%);
    color: #fff7ed;
    box-shadow: var(--shadow);
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.page-hero span {
    display: block;
    max-width: 740px;
    margin-top: 16px;
    color: rgba(255, 247, 237, 0.82);
    line-height: 1.85;
    font-size: 1.08rem;
}

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

.category-card-large {
    padding: 28px;
    display: grid;
    gap: 22px;
}

.category-card-large h2 {
    margin: 0 0 10px;
    color: var(--deep);
    font-size: 1.7rem;
}

.category-card-large span {
    color: var(--muted);
    line-height: 1.8;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.category-samples a {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.13);
    color: #92400e;
    font-weight: 800;
    font-size: 0.88rem;
}

.filter-panel {
    padding: 24px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1.4fr repeat(2, minmax(140px, 0.5fr));
    gap: 12px;
    margin-bottom: 24px;
}

.library-filter {
    grid-template-columns: 1.4fr repeat(3, minmax(140px, 0.5fr));
}

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

.category-grid .movie-card h2 {
    font-size: 1rem;
}

.category-grid .movie-card p {
    font-size: 0.88rem;
}

.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 62px 24px 32px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-cover {
    aspect-ratio: 3 / 4.18;
    overflow: hidden;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.24), rgba(234, 88, 12, 0.2));
    box-shadow: var(--shadow);
}

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

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

.detail-copy h1 {
    font-size: clamp(2.4rem, 5vw, 5.2rem);
}

.detail-copy p {
    max-width: 860px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.9;
    margin: 22px 0;
}

.detail-meta {
    margin: 22px 0 18px;
}

.detail-meta span {
    color: #7c2d12;
    background: rgba(251, 191, 36, 0.14);
}

.detail-tags {
    margin-bottom: 26px;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #111827;
}

.play-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    color: #fff;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.28));
    cursor: pointer;
    z-index: 4;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.3);
    font-size: 34px;
}

.play-overlay strong {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

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

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
}

.article-panel,
.side-panel {
    padding: 30px;
}

.article-panel h2,
.side-panel h2 {
    font-size: 1.7rem;
    margin-bottom: 16px;
}

.article-panel p {
    color: #5b4322;
    line-height: 2;
    margin: 0 0 18px;
}

.side-panel dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.side-panel dl div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 247, 237, 0.8);
}

.side-panel dt {
    color: var(--muted);
    font-weight: 900;
}

.side-panel dd {
    margin: 0;
    color: var(--deep);
}

.prev-next {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.prev-next a {
    color: var(--amber);
    font-weight: 900;
}

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

.compact-card .card-body {
    padding: 14px;
}

.compact-card p {
    display: none;
}

.site-footer {
    margin-top: 42px;
    color: #fffbeb;
    background: linear-gradient(180deg, #78350f, #451a03);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px 34px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 28px;
}

.footer-grid p {
    color: rgba(255, 251, 235, 0.78);
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: rgba(255, 251, 235, 0.78);
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 28px;
    border-top: 1px solid rgba(255, 251, 235, 0.16);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: rgba(255, 251, 235, 0.7);
}

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

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

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

    .detail-main,
    .split-section {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero {
        min-height: 560px;
    }

    .hero-content {
        padding-top: 96px;
    }

    .search-hero-form,
    .filter-row,
    .library-filter,
    .detail-hero,
    .footer-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 360px;
    }

    .page-hero > div {
        padding: 34px;
    }
}

@media (max-width: 640px) {
    .header-inner {
        padding: 0 16px;
    }

    .hero h1,
    .detail-copy h1,
    .page-hero h1 {
        letter-spacing: -0.05em;
    }

    .section-shell,
    .page-hero,
    .detail-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .card-body {
        padding: 14px;
    }

    .movie-card p {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
}
