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

:root {
    --dark: #3b1f07;
    --deep: #5c2c08;
    --mid: #8d4f13;
    --gold: #d99a3c;
    --light: #fff4d8;
    --paper: #fffaf0;
    --ink: #2d1b0c;
    --muted: #775831;
    --line: rgba(126, 82, 24, 0.2);
    --shadow: 0 20px 60px rgba(91, 48, 10, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(180deg, #fff9ec, #f9edcf 52%, #fffaf0);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at 30% 20%, #ffe8aa, #8d4f13);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: linear-gradient(90deg, rgba(59,31,7,.96), rgba(124,63,12,.96), rgba(59,31,7,.96));
    border-bottom: 2px solid rgba(243,201,120,.36);
    box-shadow: 0 10px 30px rgba(45,27,12,.28);
    backdrop-filter: blur(16px);
}

.header-inner,
.section-inner,
.footer-inner,
.page-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff7d9;
    white-space: nowrap;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f3c978, #9a5a17);
    color: var(--dark);
    font-family: "Ma Shan Zheng", cursive;
    font-size: 28px;
    box-shadow: 0 10px 24px rgba(0,0,0,.28);
}

.logo-text {
    font-family: "Noto Serif SC", serif;
    font-size: 22px;
    font-weight: 900;
}

.main-nav {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.main-nav a {
    color: #f8dfad;
    padding: 10px 12px;
    border-radius: 12px;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.top-search {
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255,246,220,.13);
    border: 1px solid rgba(255,224,158,.25);
}

.top-search input,
.hero-search-card input,
.filter-input,
.filter-select {
    border: 1px solid var(--line);
    outline: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255,255,255,.94);
    color: var(--ink);
}

.top-search input {
    width: 190px;
}

button,
.btn,
.top-search button,
.hero-search-card button,
.play-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    background: linear-gradient(135deg, #c17a24, #7c3f0c);
    box-shadow: 0 10px 24px rgba(124,63,12,.24);
    cursor: pointer;
    font: inherit;
}

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

.menu-toggle {
    display: none;
    background: rgba(255,255,255,.12);
    color: #fff4cf;
    border-radius: 12px;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--dark);
}

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

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

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

.hero-bg:before,
.hero-bg:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg:before {
    background: linear-gradient(90deg, rgba(35,18,4,.94), rgba(65,32,6,.72), rgba(65,32,6,.18));
}

.hero-bg:after {
    background: radial-gradient(circle at 18% 24%, rgba(245,190,88,.35), transparent 32%), linear-gradient(0deg, rgba(59,31,7,.92), transparent 52%);
}

.hero-bg img {
    position: absolute;
    right: 0;
    width: 64%;
}

.hero-content {
    position: relative;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 118px;
    color: #fff7dd;
}

.hero-kicker {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffd88b;
    background: rgba(255,232,178,.14);
    border: 1px solid rgba(255,232,178,.25);
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0 0;
    font-family: "Noto Serif SC", serif;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
}

.hero-content h2 {
    margin: 18px 0 12px;
    font-size: clamp(24px, 3.2vw, 44px);
    color: #ffe6ad;
}

.hero-content p {
    max-width: 700px;
    line-height: 1.9;
    color: #ffeecd;
    font-size: 18px;
}

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

.hero-tags span,
.card-tags span,
.detail-tags span {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(193,122,36,.12);
    color: var(--mid);
    border: 1px solid rgba(193,122,36,.18);
}

.hero-tags span {
    background: rgba(255,255,255,.14);
    color: #ffe7af;
    border-color: rgba(255,231,175,.22);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 700;
}

.btn.ghost {
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,233,185,.26);
}

.btn.soft {
    color: var(--dark);
    background: linear-gradient(135deg, #ffe3a6, #f4bd62);
}

.hero-panel {
    position: absolute;
    z-index: 9;
    right: max(16px, calc((100vw - 1180px)/2));
    bottom: 78px;
    width: min(360px, calc(100% - 32px));
    display: grid;
    gap: 14px;
}

.hero-search-card,
.hero-rank-entry {
    border-radius: 24px;
    padding: 18px;
    background: rgba(255,250,238,.9);
    border: 1px solid rgba(255,229,170,.55);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search-card strong,
.hero-rank-entry span {
    display: block;
    color: var(--deep);
    font-size: 18px;
    margin-bottom: 12px;
}

.hero-search-card form {
    display: flex;
    gap: 8px;
}

.hero-search-card input {
    width: 100%;
}

.hero-rank-entry a {
    color: var(--mid);
    font-weight: 700;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    background: rgba(255,255,255,.25);
    border: 1px solid rgba(255,225,166,.65);
}

.hero-dot.active {
    width: 36px;
    background: #ffd884;
}

.section {
    padding: 64px 0;
}

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

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: var(--dark);
    font-family: "Noto Serif SC", serif;
    font-size: clamp(28px, 4vw, 44px);
}

.section-head p,
.page-title p,
.detail-title p {
    color: var(--muted);
    line-height: 1.8;
}

.more-link {
    color: var(--mid);
    font-weight: 700;
}

.category-grid,
.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

.category-card,
.movie-card,
.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255,255,255,.9);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(91,48,10,.12);
}

.category-card:hover,
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 70px rgba(91,48,10,.26);
}

.category-thumbs {
    height: 110px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--mid);
}

.category-card strong,
.category-card span {
    display: block;
    padding: 0 16px;
}

.category-card strong {
    margin-top: 14px;
    font-size: 18px;
    color: var(--deep);
}

.category-card span {
    margin-top: 8px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #7c3f0c, #f3c978);
}

.poster:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(45,27,12,.52), transparent 52%);
}

.rank-badge {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffdf8b, #c17a24);
    color: var(--dark);
    font-weight: 900;
}

.card-body {
    padding: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--mid);
    font-size: 13px;
}

.card-body h3 {
    min-height: 48px;
    margin: 9px 0 0;
    font-size: 17px;
    line-height: 1.45;
    color: var(--dark);
}

.card-body p {
    min-height: 68px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    padding: 58px 0;
    color: #fff2cf;
    background: radial-gradient(circle at 15% 0, rgba(255,218,139,.5), transparent 32%), linear-gradient(135deg, var(--dark), var(--mid));
}

.page-title h1,
.page-title p {
    color: inherit;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255,245,218,.75);
}

.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,.82);
    border: 1px solid var(--line);
}

.filter-input {
    flex: 1 1 260px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
    gap: 28px;
    align-items: start;
}

.video-wrap {
    position: relative;
    background: #050403;
    aspect-ratio: 16 / 9;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-mask {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 40%, rgba(255,213,128,.22), rgba(0,0,0,.72));
}

.play-mask.is-hidden {
    display: none;
}

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    padding: 14px 24px;
}

.play-button span {
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #fff;
}

.detail-title,
.detail-card,
.side-card {
    padding: 24px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 6px 12px;
    background: #fff4d8;
    color: var(--mid);
}

.detail-card {
    margin-top: 22px;
}

.detail-card h2,
.side-card h2 {
    color: var(--dark);
    font-family: "Noto Serif SC", serif;
}

.detail-card p {
    line-height: 1.95;
    color: #5d421f;
}

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

.side-item {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255,247,226,.78);
}

.side-item img {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
}

.side-item strong {
    display: block;
    color: var(--dark);
}

.side-item span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 48px;
    padding: 46px 0;
    color: #ffe9b5;
    background: linear-gradient(135deg, var(--dark), var(--mid));
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 30px;
}

.footer-logo {
    font-family: "Noto Serif SC", serif;
    font-size: 26px;
    font-weight: 900;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
}

.hidden-by-filter {
    display: none !important;
}

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

    .top-search {
        display: none;
    }

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

@media (max-width: 760px) {
    .main-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        padding: 12px;
        border-radius: 20px;
        background: rgba(59,31,7,.96);
    }

    .main-nav.is-open {
        display: flex;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-slider {
        min-height: 720px;
    }

    .hero-bg img {
        width: 100%;
        opacity: .45;
    }

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

    .hero-panel {
        left: 16px;
        right: 16px;
        bottom: 64px;
        width: auto;
    }

    .hero-search-card form,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }
}
