:root {
    --bg: #fbf7f2;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #251915;
    --muted: #77645a;
    --line: #eadbd0;
    --primary: #a05f3d;
    --primary-dark: #854c34;
    --accent: #f59e0b;
    --shadow: 0 20px 55px rgba(82, 52, 35, 0.12);
    --shadow-soft: 0 12px 35px rgba(82, 52, 35, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28rem),
        linear-gradient(180deg, #fffaf2 0%, var(--bg) 40%, #f7efe7 100%);
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

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

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

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(234, 219, 208, 0.75);
    background: rgba(255, 250, 242, 0.88);
    backdrop-filter: blur(18px);
}

.nav-row {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--primary-dark);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 22px rgba(160, 95, 61, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary-dark);
    background: #f3e3d4;
}

.top-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(330px, 34vw);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-soft);
}

.top-search input,
.local-filter input,
.search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.top-search input {
    padding: 8px 12px;
}

.top-search button,
.search-box button,
.primary-btn,
.secondary-btn,
.play-link {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(160, 95, 61, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.search-box button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.play-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(160, 95, 61, 0.32);
}

.secondary-btn {
    color: var(--primary-dark);
    background: #fff;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--primary-dark);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    margin-bottom: 56px;
    color: #fff;
    background: #1c120e;
}

.hero-slider {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.72s ease;
    background-image:
        linear-gradient(90deg, rgba(26, 15, 10, 0.94) 0%, rgba(26, 15, 10, 0.78) 42%, rgba(26, 15, 10, 0.36) 100%),
        var(--image);
    background-position: center;
    background-size: cover;
}

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

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.72fr);
    align-items: center;
    gap: 56px;
    padding: 118px 0 78px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: #ffe4ba;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    max-width: 740px;
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.hero h2 {
    font-size: clamp(32px, 5vw, 64px);
}

.hero-summary {
    max-width: 700px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(16px, 1.45vw, 20px);
    line-height: 1.85;
}

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.tag-list span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--primary-dark);
    background: #f6eadf;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #ffe4ba;
    background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
    position: relative;
    max-width: 360px;
    margin-left: auto;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #2d201a;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 2;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: 0.2s ease;
}

.hero-dot.is-active {
    width: 60px;
    background: #fff;
}

.main-section {
    padding: 34px 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1,
.category-hero h1,
.search-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-head p,
.page-title p,
.category-hero p,
.search-hero p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--primary-dark);
    background: #f6eadf;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(234, 219, 208, 0.82);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(160, 95, 61, 0.25);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #312018, #8b5b3e);
}

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

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

.type-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 6px 9px;
    color: #fff;
    background: rgba(37, 25, 21, 0.72);
    backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: auto;
    right: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-info h3 a:hover {
    color: var(--primary-dark);
}

.movie-info p {
    min-height: 3.5em;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.tag-list,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.category-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0 12px;
}

.category-strip a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 15px;
    color: var(--primary-dark);
    background: #fff;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

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

.category-card {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 247, 237, 0.82)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 14rem);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-label {
    color: var(--primary-dark);
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin: 14px 0;
    font-size: 20px;
    line-height: 1.45;
}

.category-card em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.7;
}

.page-hero,
.category-hero,
.search-hero,
.detail-hero {
    padding: 54px 0 30px;
}

.page-title,
.category-hero,
.search-hero {
    max-width: 820px;
}

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

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.local-filter,
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 28px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.local-filter input,
.search-box input {
    padding: 13px 14px;
}

.filter-empty {
    display: none;
    margin: 24px 0;
    border: 1px dashed var(--line);
    border-radius: 22px;
    padding: 26px;
    color: var(--muted);
    background: #fff;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    background: #2d201a;
    box-shadow: var(--shadow);
}

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

.detail-title h1 {
    margin-bottom: 18px;
}

.detail-intro {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.meta-box {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: #fff;
}

.meta-box span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.meta-box strong {
    display: block;
    margin-top: 4px;
    line-height: 1.35;
}

.player-section {
    padding: 32px 0;
}

.player-section h2,
.article-section h2 {
    margin: 0 0 18px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #120d0b;
    box-shadow: 0 34px 80px rgba(37, 25, 21, 0.24);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0d0b0a;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(18, 13, 11, 0.1), rgba(18, 13, 11, 0.78)),
        rgba(18, 13, 11, 0.14);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-mark {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--primary-dark);
    background: #fff;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.26);
}

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

.article-section,
.info-panel {
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.article-section p,
.info-panel p {
    color: var(--muted);
    line-height: 1.95;
    font-size: 16px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid #f1e4d8;
    padding-bottom: 10px;
}

.info-list span {
    color: var(--muted);
    font-weight: 800;
}

.info-list strong {
    line-height: 1.55;
}

.search-results-title {
    margin: 16px 0 24px;
    color: var(--muted);
    font-weight: 800;
}

.site-footer {
    margin-top: 60px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.58);
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0;
}

.footer-grid p {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.footer-links a {
    border-radius: 999px;
    padding: 10px 14px;
    background: #f6eadf;
    color: var(--primary-dark);
    font-weight: 800;
}

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

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

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

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .nav-row {
        min-height: 64px;
        gap: 12px;
    }

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

    .nav-links {
        position: fixed;
        top: 74px;
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--line);
        border-radius: 24px;
        padding: 12px;
        background: #fffaf2;
        box-shadow: var(--shadow);
    }

    body.menu-open .nav-links {
        display: flex;
    }

    .nav-link {
        padding: 14px 16px;
    }

    .top-search {
        display: none;
    }

    .hero,
    .hero-slider {
        min-height: 690px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 92px 0 72px;
    }

    .hero-poster {
        max-width: 230px;
        margin: 0;
    }

    .hero-controls {
        bottom: 18px;
    }

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

    .movie-info {
        padding: 13px;
    }

    .movie-info h3 {
        font-size: 16px;
    }

    .movie-info p {
        font-size: 13px;
    }

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

    .local-filter,
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .article-section,
    .info-panel {
        padding: 20px;
    }
}

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

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

    .primary-btn,
    .secondary-btn,
    .play-link {
        text-align: center;
    }
}
