:root {
    --page: #fff7ed;
    --paper: #ffffff;
    --paper-soft: rgba(255, 255, 255, 0.86);
    --ink: #1f160c;
    --muted: #6b5d4e;
    --line: rgba(146, 64, 14, 0.16);
    --gold: #f59e0b;
    --gold-dark: #d97706;
    --orange: #fb923c;
    --shadow: 0 24px 70px rgba(124, 45, 18, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 38%, #fff7ed 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.35);
}

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

.main-nav a,
.quick-cats a {
    padding: 9px 14px;
    color: #5f4b32;
    border-radius: 999px;
    transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active,
.quick-cats a:hover {
    color: #ffffff;
    background: var(--gold);
}

.quick-cats {
    display: flex;
    justify-content: center;
    gap: 8px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 12px;
    overflow-x: auto;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
    border-radius: 999px;
}

.hero-slider {
    position: relative;
    height: min(72vh, 760px);
    min-height: 560px;
    overflow: hidden;
    background: #0f0a04;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.08) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, transparent 38%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100vw - 1240px) / 2 + 20px));
    width: min(660px, calc(100vw - 48px));
    transform: translateY(-50%);
    color: #ffffff;
}

.eyebrow,
.hero-meta,
.hero-tags,
.card-meta,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.eyebrow span,
.hero-tags span,
.detail-tags span,
.tag-row span,
.tag-row a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.eyebrow span {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(252, 211, 77, 0.26);
}

.hero-content h1 {
    margin: 16px 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 21px);
}

.hero-meta {
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-meta span:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 8px;
    background: var(--gold);
    border-radius: 999px;
    vertical-align: middle;
}

.hero-tags {
    margin-bottom: 28px;
}

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

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

.btn-primary,
.btn-ghost,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary,
.home-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover,
.home-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(245, 158, 11, 0.4);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-ghost.dark {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--line);
}

.hero-control {
    position: absolute;
    right: max(24px, calc((100vw - 1240px) / 2 + 20px));
    bottom: 86px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 4;
}

.hero-control button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px !important;
    height: 10px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.35) !important;
}

.hero-dot.is-active {
    width: 30px !important;
    background: var(--gold) !important;
}

.hero-category-bar {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 5;
    display: flex;
    gap: 10px;
    width: min(1200px, calc(100vw - 40px));
    padding: 12px;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
}

.hero-category-bar a {
    flex: 0 0 auto;
    padding: 9px 15px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    font-weight: 700;
}

.content-section,
.sub-hero,
.detail-hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: 58px 20px;
}

.intro-panel,
.sub-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: center;
}

.intro-panel > div,
.sub-hero > div,
.article-copy,
.filter-panel,
.player-shell,
.detail-copy {
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.intro-panel > div,
.sub-hero > div,
.article-copy,
.detail-copy {
    padding: 34px;
}

.eyebrow-text,
.section-title span {
    margin: 0 0 8px;
    color: var(--gold-dark);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.intro-panel h2,
.sub-hero h1,
.section-title h2,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.intro-panel p,
.sub-hero p,
.article-copy p,
.detail-copy p {
    color: var(--muted);
    font-size: 17px;
}

.home-search {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.home-search input {
    min-width: 0;
    flex: 1;
    padding: 0 18px;
    border: 0;
    outline: none;
    background: transparent;
}

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

.section-more {
    color: var(--gold-dark);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(124, 45, 18, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 68px rgba(124, 45, 18, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1f160c;
}

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

.movie-card:hover .poster-link img,
.category-card:hover img,
.ranking-cover:hover img,
.detail-poster:hover img {
    transform: scale(1.06);
}

.card-badge,
.rank-mark,
.card-play {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    border-radius: 999px;
}

.card-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(10px);
}

.rank-mark {
    top: 12px;
    right: 12px;
    min-width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.34);
}

.card-play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    padding-left: 4px;
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 18px;
}

.card-meta {
    color: #8a6f4b;
    font-size: 13px;
    font-weight: 700;
}

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

.movie-card h3,
.ranking-item h3 {
    margin: 10px 0 8px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.movie-card h3 a:hover,
.ranking-item h3 a:hover {
    color: var(--gold-dark);
}

.movie-card p,
.ranking-item p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row span,
.tag-row a {
    color: #92400e;
    background: #ffedd5;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    color: #ffffff;
    background: #1f160c;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
    transition: transform 0.45s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.14));
}

.category-card div {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
}

.category-card span {
    color: #fcd34d;
    font-size: 13px;
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin: 5px 0;
    font-size: 25px;
    line-height: 1.1;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
}

.large-cats .category-card {
    min-height: 260px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--ink);
    background: #fffaf0;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
}

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

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

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 58px 110px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(124, 45, 18, 0.08);
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border-radius: 16px;
    font-size: 18px;
    font-weight: 900;
}

.ranking-cover {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1f160c;
    border-radius: 16px;
}

.ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.sub-hero {
    padding-top: 72px;
}

.category-hero,
.ranking-hero {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    margin-top: 32px;
    padding: 42px;
    color: #ffffff;
    background: #1f160c;
    border-radius: 32px;
}

.category-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
}

.category-hero > div,
.ranking-hero > div {
    position: relative;
    z-index: 2;
    max-width: 680px;
    background: rgba(0, 0, 0, 0.42);
    border-color: rgba(255, 255, 255, 0.16);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    gap: 30px;
    align-items: center;
    padding-top: 54px;
}

.detail-poster {
    overflow: hidden;
    background: #1f160c;
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: var(--gold-dark);
    font-weight: 900;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 24px 0;
    list-style: none;
}

.detail-meta li {
    padding: 14px;
    background: #fff7ed;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.detail-meta span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.detail-meta strong {
    display: block;
    margin-top: 4px;
}

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

.detail-tags span {
    color: #92400e;
    background: #ffedd5;
    border-color: #fed7aa;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #080604;
    border-radius: 30px;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ffffff;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22), rgba(0, 0, 0, 0.42));
    border: 0;
    cursor: pointer;
}

.player-overlay span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    padding-left: 7px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border-radius: 999px;
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.42);
    font-size: 34px;
}

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

.article-copy h2 {
    margin: 24px 0 10px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.article-copy h2:first-child {
    margin-top: 0;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1240px;
    margin: 40px auto 0;
    padding: 34px 20px 50px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.site-footer div,
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.site-footer strong {
    color: var(--ink);
}

.site-footer a:hover {
    color: var(--gold-dark);
}

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

    .compact-ranking {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 68px;
        left: 20px;
        right: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 22px;
        box-shadow: var(--shadow);
    }

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

    .quick-cats {
        justify-content: flex-start;
    }

    .hero-slider {
        min-height: 640px;
        height: auto;
    }

    .hero-content {
        top: 47%;
    }

    .hero-category-bar {
        bottom: 16px;
        border-radius: 22px;
    }

    .hero-control {
        right: 22px;
        bottom: 96px;
    }

    .intro-panel,
    .sub-hero,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .ranking-item {
        grid-template-columns: 46px 86px minmax(0, 1fr);
    }

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

@media (max-width: 560px) {
    .header-inner {
        padding-inline: 14px;
    }

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

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

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-control {
        left: 18px;
        right: auto;
    }

    .content-section,
    .sub-hero,
    .detail-hero {
        padding: 40px 14px;
    }

    .intro-panel > div,
    .sub-hero > div,
    .article-copy,
    .detail-copy {
        padding: 24px;
    }

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

    .home-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
    }

    .home-search input {
        min-height: 48px;
    }

    .section-title,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
