@import url("https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@500;700;900&family=Noto+Sans+SC:wght@400;500;700;900&display=swap");

:root {
    --bg: #fff8eb;
    --bg-soft: #fffbf1;
    --ink: #35200f;
    --muted: #8b5e2e;
    --gold: #f6c453;
    --gold-deep: #b66a12;
    --amber: #92400e;
    --brown: #4a250b;
    --card: rgba(255, 251, 241, 0.92);
    --line: rgba(146, 64, 14, 0.16);
    --shadow: 0 24px 60px rgba(86, 45, 8, 0.18);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.26), transparent 32rem),
        linear-gradient(180deg, #fff7df 0%, #fffaf0 38%, #fff4dd 100%);
    font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #78350f 0%, #92400e 48%, #78350f 100%);
    border-bottom: 2px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 12px 30px rgba(69, 26, 3, 0.26);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 76px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff7d6;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #5a2b08;
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    font-family: "Ma Shan Zheng", cursive;
    font-size: 28px;
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.42);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    color: #fdecc8;
    white-space: nowrap;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(310px, 32vw);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(253, 230, 138, 0.25);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    min-width: 0;
    width: 100%;
    color: #fff7d6;
    background: transparent;
    border: 0;
    outline: none;
    padding: 11px 14px;
}

.header-search input::placeholder {
    color: rgba(253, 236, 200, 0.72);
}

.header-search button,
.btn,
.filter-controls button,
.play-button,
.search-submit {
    border: 0;
    cursor: pointer;
    color: #4a250b;
    font-weight: 800;
    border-radius: 999px;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: 0 14px 28px rgba(180, 83, 9, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
    margin-right: 4px;
    padding: 8px 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
}

.btn.secondary {
    color: #fff7d6;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(253, 230, 138, 0.28);
    box-shadow: none;
}

.btn:hover,
.header-search button:hover,
.filter-controls button:hover,
.play-button:hover,
.search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(180, 83, 9, 0.34);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #fdecc8;
}

main,
.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 72px;
}

.hero {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    border-radius: 0 0 42px 42px;
    color: #fff8d6;
    background: #451a03;
    box-shadow: var(--shadow);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 18%, rgba(251, 191, 36, 0.34), transparent 26rem),
        linear-gradient(110deg, rgba(69, 26, 3, 0.96), rgba(92, 35, 8, 0.82), rgba(146, 64, 14, 0.36));
    z-index: 2;
}

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

.hero-slide.active {
    opacity: 1;
}

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

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1280px;
    min-height: 610px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.7fr);
    gap: 42px;
    align-items: center;
    padding: 74px 24px 56px;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fde68a;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 16px;
    font-family: "Noto Serif SC", serif;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 690px;
    margin: 0 0 24px;
    color: rgba(255, 248, 214, 0.88);
    font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.meta-list span {
    color: #6b3a0d;
    background: rgba(253, 230, 138, 0.9);
    border: 1px solid rgba(180, 83, 9, 0.16);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.hero-panel {
    border-radius: 32px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(253, 230, 138, 0.28);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
}

.hero-panel h2 {
    margin: 16px 0 4px;
    font-size: 22px;
}

.hero-panel p {
    margin: 0;
    font-size: 14px;
}

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

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

.hero-dots button.active {
    width: 42px;
    background: #fde68a;
}

.section {
    margin-top: 58px;
}

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

.section-title {
    margin: 4px 0 0;
    color: var(--brown);
    font-family: "Noto Serif SC", serif;
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.15;
}

.section-desc {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 18px 38px rgba(86, 45, 8, 0.1);
    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.44);
    box-shadow: 0 26px 54px rgba(86, 45, 8, 0.2);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #78350f, #f59e0b);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.poster-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 4px 9px;
    color: #4a250b;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: rgba(253, 230, 138, 0.94);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    color: var(--brown);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.3;
}

.card-title:hover {
    color: var(--gold-deep);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

.card-body p {
    min-height: 66px;
    margin: 0 0 12px;
    color: #65401e;
    font-size: 14px;
}

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

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

.category-tile {
    min-height: 155px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 24px;
    color: #fff8d6;
    background:
        radial-gradient(circle at top right, rgba(253, 230, 138, 0.35), transparent 9rem),
        linear-gradient(135deg, #78350f, #b45309);
    box-shadow: 0 18px 40px rgba(120, 53, 15, 0.2);
}

.category-tile strong {
    font-size: 22px;
}

.category-tile span {
    color: rgba(255, 248, 214, 0.8);
}

.rank-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 58px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid var(--line);
}

.rank-item:hover {
    border-color: rgba(245, 158, 11, 0.52);
    background: #fff7e8;
}

.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #4a250b;
    font-weight: 900;
    border-radius: 14px;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.rank-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    color: var(--brown);
}

.rank-text em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.sidebar-card,
.filter-panel,
.detail-panel,
.content-card,
.search-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 42px rgba(86, 45, 8, 0.1);
}

.sidebar-card {
    padding: 18px;
}

.filter-panel,
.search-panel {
    padding: 18px;
    margin-bottom: 24px;
}

.filter-controls,
.search-box {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
}

.filter-controls input,
.filter-controls select,
.search-box input {
    width: 100%;
    border: 1px solid rgba(146, 64, 14, 0.22);
    border-radius: 999px;
    background: #fffaf0;
    color: var(--ink);
    outline: none;
    padding: 12px 16px;
}

.filter-controls button,
.search-submit {
    padding: 12px 18px;
}

.page-hero {
    overflow: hidden;
    padding: 42px;
    border-radius: 32px;
    color: #fff8d6;
    background:
        radial-gradient(circle at top right, rgba(253, 230, 138, 0.34), transparent 16rem),
        linear-gradient(135deg, #78350f, #b45309);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 12px 0 10px;
    font-family: "Noto Serif SC", serif;
    font-size: clamp(34px, 4vw, 56px);
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 248, 214, 0.86);
    font-size: 17px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #1c0f06;
    box-shadow: 0 28px 58px rgba(69, 26, 3, 0.32);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 30px;
    text-align: center;
    color: #fff8d6;
    background:
        radial-gradient(circle at center, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72)),
        linear-gradient(135deg, rgba(120, 53, 15, 0.18), rgba(245, 158, 11, 0.14));
}

.play-overlay.hidden {
    display: none;
}

.play-button {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 32px;
}

.play-hint {
    margin-top: 16px;
    color: rgba(255, 248, 214, 0.82);
}

.detail-panel {
    padding: 28px;
}

.detail-title {
    margin: 14px 0;
    color: var(--brown);
    font-family: "Noto Serif SC", serif;
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.1;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: #78350f;
}

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

.detail-section h2,
.sidebar-card h2,
.content-card h2 {
    margin: 0 0 12px;
    color: var(--brown);
    font-family: "Noto Serif SC", serif;
}

.detail-section {
    margin-top: 26px;
}

.detail-section p,
.content-card p {
    margin: 0;
    color: #57351a;
    font-size: 16px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.site-footer {
    color: #fdecc8;
    background: linear-gradient(135deg, #451a03, #78350f 58%, #451a03);
    padding: 54px 24px 28px;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-brand {
    margin-bottom: 12px;
    font-family: "Ma Shan Zheng", cursive;
    font-size: 30px;
    color: #fde68a;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #fde68a;
}

.site-footer a {
    display: block;
    margin: 7px 0;
    color: rgba(253, 236, 200, 0.82);
}

.site-footer a:hover {
    color: #ffffff;
}

.copyright {
    max-width: 1280px;
    margin: 36px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(253, 230, 138, 0.18);
    color: rgba(253, 236, 200, 0.66);
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(146, 64, 14, 0.3);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.55);
}

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

@media (max-width: 1100px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .nav-toggle {
        display: block;
        justify-self: end;
    }

    .main-nav,
    .header-search {
        grid-column: 1 / -1;
        display: none;
        width: 100%;
    }

    .main-nav.open,
    .header-search.open {
        display: flex;
    }

    .main-nav.open {
        flex-wrap: wrap;
        padding-bottom: 6px;
    }

    .header-search.open {
        margin-bottom: 14px;
    }

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

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

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

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

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

    main,
    .page-main {
        padding: 20px 14px 52px;
    }

    .hero {
        border-radius: 0 0 28px 28px;
        min-height: 720px;
    }

    .hero-content {
        min-height: 720px;
        padding: 48px 16px 70px;
    }

    .hero-panel {
        max-width: 290px;
    }

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

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

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

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

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

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