:root {
    --page-bg-start: #fff7ed;
    --page-bg-end: #f5f5f4;
    --text-main: #3f2d1c;
    --text-soft: #7c5d35;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-900: #78350f;
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-700: #b91c1c;
    --red-800: #991b1b;
    --red-900: #7f1d1d;
    --white: #ffffff;
    --shadow-sm: 0 6px 18px rgba(120, 53, 15, 0.08);
    --shadow-md: 0 16px 36px rgba(120, 53, 15, 0.16);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.24);
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background: linear-gradient(180deg, var(--page-bg-start), var(--page-bg-end));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.96);
    border-bottom: 1px solid rgba(253, 230, 138, 0.9);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--amber-900);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--red-700));
    box-shadow: 0 12px 30px rgba(185, 28, 28, 0.26);
    font-size: 18px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--amber-900);
    font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--amber-700);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-nav input {
    width: 220px;
    border: 2px solid var(--amber-300);
    border-radius: var(--radius-pill);
    background: var(--white);
    padding: 10px 16px;
    outline: none;
    color: var(--amber-900);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-search input:focus {
    border-color: var(--amber-600);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.header-search button {
    border: 0;
    border-radius: var(--radius-pill);
    color: var(--white);
    background: var(--amber-600);
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.primary-button:hover {
    background: var(--amber-700);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(253, 230, 138, 0.6);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--amber-900);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 22px;
    border-top: 1px solid var(--amber-200);
}

.mobile-nav.is-open {
    display: grid;
    gap: 14px;
}

.mobile-nav input {
    width: 100%;
}

.hero {
    position: relative;
    min-height: 520px;
    height: 70vh;
    overflow: hidden;
    background: #111827;
}

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

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2));
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: clamp(42px, 10vw, 110px);
    z-index: 2;
    max-width: 760px;
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: var(--radius-pill);
    color: var(--amber-100);
    background: rgba(255, 255, 255, 0.16);
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 7vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-intro p {
    max-width: 760px;
    margin: 0 0 26px;
    color: #ffedd5;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: var(--radius-pill);
    padding: 12px 22px;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    border-color: rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(0, 0, 0, 0.34);
    cursor: pointer;
    font-size: 42px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.54);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: 38px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    border-radius: var(--radius-pill);
    background: var(--amber-300);
}

.content-section {
    padding: 64px 0;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--amber-900);
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--text-soft);
}

.section-heading a {
    color: var(--amber-700);
    font-weight: 800;
    white-space: nowrap;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(253, 230, 138, 0.78);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1f2937;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
    filter: brightness(0.82);
}

.card-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: rgba(217, 119, 6, 0.92);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translateY(0);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    min-height: 54px;
    overflow: hidden;
    color: var(--red-900);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-title:hover {
    color: var(--red-700);
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    color: var(--red-700);
    font-size: 14px;
    font-weight: 800;
}

.card-meta a,
.card-meta span {
    border-radius: var(--radius-pill);
    background: var(--red-100);
    padding: 4px 10px;
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    color: #6b4f2c;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.card-tags span {
    border-radius: var(--radius-pill);
    color: var(--amber-900);
    background: var(--amber-100);
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

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

.compact-card .card-title {
    font-size: 16px;
}

.filter-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
    border: 1px solid rgba(253, 230, 138, 0.9);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.76);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 14px;
}

.filter-search input {
    width: 100%;
    border: 2px solid var(--amber-300);
    border-radius: var(--radius-pill);
    padding: 12px 18px;
    outline: none;
}

.filter-search span {
    min-width: 120px;
    color: var(--amber-900);
    font-weight: 800;
    text-align: right;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chips button {
    border: 1px solid var(--amber-200);
    border-radius: var(--radius-pill);
    color: var(--amber-900);
    background: var(--amber-50);
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-chips button.is-active,
.filter-chips button:hover {
    color: var(--white);
    background: var(--amber-600);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 152px minmax(0, 1fr) 120px;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(253, 230, 138, 0.8);
    border-radius: var(--radius-md);
    background: var(--white);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-row:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.rank-number {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-700), var(--amber-600));
    font-size: 22px;
    font-weight: 900;
}

.rank-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: #1f2937;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    color: var(--red-900);
    font-size: 19px;
    font-weight: 900;
}

.rank-info p {
    display: -webkit-box;
    margin: 6px 0 8px;
    overflow: hidden;
    color: var(--text-soft);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--amber-900);
    font-size: 13px;
    font-weight: 800;
}

.rank-meta span {
    border-radius: var(--radius-pill);
    background: var(--amber-100);
    padding: 3px 9px;
}

.rank-score {
    text-align: right;
}

.rank-score strong {
    display: block;
    color: var(--red-700);
    font-size: 30px;
    line-height: 1;
}

.rank-score span {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 800;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(252, 211, 77, 0.5), transparent 34%), linear-gradient(135deg, var(--red-800), var(--amber-700));
    padding: 88px 0 96px;
}

.page-hero p {
    color: #ffedd5;
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.category-overview-card {
    overflow: hidden;
    border: 1px solid rgba(253, 230, 138, 0.8);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px;
    background: var(--amber-100);
}

.category-preview a {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 10px;
    background: #1f2937;
}

.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-body {
    padding: 22px;
}

.category-overview-body h2 {
    margin: 0 0 10px;
    color: var(--red-900);
}

.category-overview-body p {
    margin: 0 0 16px;
    color: var(--text-soft);
}

.category-overview-body span {
    display: inline-flex;
    border-radius: var(--radius-pill);
    color: var(--white);
    background: var(--amber-600);
    padding: 6px 12px;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: #111827;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) brightness(0.36);
    transform: scale(1.06);
}

.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.3));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    min-height: 620px;
    padding: 64px 0;
}

.detail-poster {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #fde68a;
    font-weight: 800;
}

.detail-intro p {
    color: #ffedd5;
}

.detail-section {
    padding-top: 52px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #030712;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #030712;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35));
}

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

.player-button {
    position: relative;
    z-index: 1;
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--amber-600);
    font-size: 34px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-cover:hover .player-button {
    background: var(--amber-700);
    transform: scale(1.08);
}

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

.detail-copy,
.detail-side {
    border: 1px solid rgba(253, 230, 138, 0.8);
    border-radius: var(--radius-lg);
    background: var(--white);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.detail-copy h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: var(--red-900);
    font-size: 26px;
}

.detail-copy p {
    margin: 0 0 28px;
    color: #5c4033;
    font-size: 17px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 14px;
    margin: 0 0 20px;
}

.detail-side dt {
    color: var(--text-soft);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: var(--red-900);
    font-weight: 800;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    border-radius: var(--radius-pill);
    color: var(--amber-900);
    background: var(--amber-100);
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.site-footer {
    margin-top: 40px;
    color: #fecaca;
    background: linear-gradient(135deg, var(--red-900), #450a0a);
    padding: 54px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    color: var(--white);
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    border-top: 1px solid rgba(254, 202, 202, 0.28);
    padding-top: 22px;
    text-align: center;
}

[hidden],
.is-filtered-out {
    display: none !important;
}

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .detail-hero-inner,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .header-inner {
        min-height: 66px;
    }

    .logo {
        font-size: 20px;
    }

    .hero {
        min-height: 560px;
        height: 78vh;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 76px;
    }

    .hero h1,
    .page-hero h1,
    .detail-intro h1 {
        font-size: 36px;
    }

    .hero-control {
        width: 40px;
        height: 40px;
        font-size: 34px;
    }

    .hero-prev {
        left: 10px;
    }

    .hero-next {
        right: 10px;
    }

    .hero-dots {
        left: 18px;
        right: auto;
        bottom: 28px;
    }

    .content-section {
        padding: 42px 0;
    }

    .section-heading {
        display: grid;
        align-items: start;
    }

    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .card-body {
        padding: 14px;
    }

    .card-title {
        min-height: 46px;
        font-size: 15px;
    }

    .card-body p,
    .card-tags {
        display: none;
    }

    .rank-row {
        grid-template-columns: 48px 92px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 18px;
    }

    .rank-score {
        grid-column: 2 / -1;
        text-align: left;
    }

    .detail-hero-inner {
        min-height: auto;
        padding: 42px 0;
    }

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

    .player-button {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .filter-search {
        display: grid;
    }

    .filter-search span {
        min-width: 0;
        text-align: left;
    }
}
