:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --orange-600: #ea580c;
    --ink: #2b1607;
    --muted: #6b4e2e;
    --card: #ffffff;
    --line: rgba(180, 83, 9, 0.18);
    --shadow: 0 18px 42px rgba(146, 64, 14, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 45%, #fffaf0 100%);
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

img.is-missing {
    opacity: 0;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 26px rgba(146, 64, 14, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--amber-800);
    letter-spacing: 0.02em;
}

.brand {
    font-size: 22px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 10px 28px rgba(217, 119, 6, 0.32);
}

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

.nav-links a,
.mobile-panel a {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--amber-800);
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    background: var(--amber-100);
    color: var(--amber-700);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--amber-100);
    padding: 10px;
}

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

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    background: linear-gradient(135deg, #78350f 0%, #b45309 48%, #f59e0b 100%);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.34;
    filter: saturate(1.05) contrast(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 15%, rgba(253, 230, 138, 0.55), transparent 28%),
        linear-gradient(90deg, rgba(69, 26, 3, 0.94), rgba(120, 53, 15, 0.76) 42%, rgba(69, 26, 3, 0.32));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
    align-items: center;
    gap: 46px;
    padding: 64px 0;
}

.hero-copy {
    color: #fff7ed;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.lead-text {
    max-width: 760px;
    color: rgba(255, 247, 237, 0.88);
    font-size: clamp(17px, 2vw, 23px);
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

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

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.22s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 14px 34px rgba(217, 119, 6, 0.34);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(217, 119, 6, 0.42);
}

.ghost-btn {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(135deg, #fde68a, #f97316);
    box-shadow: 0 24px 70px rgba(69, 26, 3, 0.42);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

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

.hero-dot {
    width: 28px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
    background: #fff7ed;
}

.quick-panel {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    margin-top: -54px;
    position: relative;
    z-index: 8;
}

.search-card,
.category-chip-wrap,
.ranking-panel,
.category-panel,
.content-card,
.side-card,
.category-card-large a {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.search-card {
    padding: 24px;
}

.search-card h2,
.section-heading-row h2,
.content-card h2,
.side-card h2 {
    margin: 0;
    color: var(--amber-900, #78350f);
}

.search-card p {
    margin: 8px 0 18px;
    color: var(--muted);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid var(--line);
}

.search-box span {
    font-weight: 900;
    color: var(--amber-700);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.category-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    gap: 12px;
    padding: 22px;
}

.category-chip-wrap a,
.footer-links a {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-size: 14px;
    font-weight: 800;
    transition: 0.2s ease;
}

.category-chip-wrap a:hover,
.footer-links a:hover {
    color: #fff;
    background: var(--amber-600);
}

.section-block {
    padding: 72px 0 20px;
}

.section-title {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-title span {
    color: var(--amber-600);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-title h2 {
    margin: 8px 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar select {
    min-height: 46px;
    padding: 0 36px 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--amber-800);
    background: #fff;
    font-weight: 800;
}

.inline-search {
    min-width: min(380px, 100%);
    background: #fff;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(146, 64, 14, 0.11);
    border: 1px solid rgba(180, 83, 9, 0.12);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(146, 64, 14, 0.18);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fde68a, #fb923c 55%, #92400e);
}

.poster img {
    transition: transform 0.55s ease, opacity 0.2s ease;
}

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

.duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
}

.duration {
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--amber-700);
    font-size: 12px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 7px 0 6px;
    font-size: 18px;
    line-height: 1.3;
}

.compact-grid .movie-card h3 {
    font-size: 15px;
}

.movie-card p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-grid .movie-card p {
    display: none;
}

.tag-row span {
    color: var(--amber-800);
    background: var(--amber-50);
    border: 1px solid var(--line);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    padding-top: 56px;
}

.ranking-panel,
.category-panel,
.content-card,
.side-card {
    padding: 24px;
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading-row a {
    color: var(--amber-700);
    font-weight: 900;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 34px 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fff7ed;
    transition: 0.2s ease;
}

.rank-row:hover {
    background: var(--amber-100);
}

.rank-row img {
    width: 54px;
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fde68a, #fb923c);
}

.list-rank {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    background: var(--amber-600);
    font-weight: 900;
}

.list-rank.dot {
    color: var(--amber-700);
    background: var(--amber-100);
}

.rank-main {
    min-width: 0;
}

.rank-main strong,
.rank-main small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-main small {
    color: var(--muted);
}

.rank-row em {
    color: var(--amber-700);
    font-style: normal;
    font-weight: 900;
}

.category-grid-mini,
.category-overview-grid {
    display: grid;
    gap: 16px;
}

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

.category-tile {
    display: block;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    border: 1px solid var(--line);
    transition: 0.22s ease;
}

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

.category-tile span {
    color: var(--amber-800);
    font-size: 18px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.page-hero,
.detail-hero {
    color: #fff7ed;
    background:
        radial-gradient(circle at 85% 20%, rgba(253, 230, 138, 0.34), transparent 26%),
        linear-gradient(135deg, #78350f, #b45309 54%, #f59e0b);
}

.page-hero {
    padding: 78px 0;
}

.small-hero {
    padding: 70px 0;
}

.page-hero h1 {
    max-width: 900px;
}

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

.category-card-large a {
    display: block;
    min-height: 220px;
    padding: 28px;
    transition: 0.24s ease;
}

.category-card-large a:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 56px rgba(146, 64, 14, 0.2);
}

.category-card-large span {
    color: var(--amber-600);
    font-weight: 900;
}

.category-card-large h2 {
    margin: 10px 0;
    font-size: 26px;
}

.category-card-large p {
    color: var(--muted);
}

.category-card-large strong {
    display: inline-flex;
    margin-top: 14px;
    color: var(--amber-700);
}

.detail-hero {
    padding: 34px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: rgba(255, 247, 237, 0.78);
}

.breadcrumb a {
    color: #fff7ed;
    font-weight: 800;
}

.breadcrumb em {
    font-style: normal;
}

.detail-top {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #fde68a, #fb923c);
    box-shadow: 0 24px 60px rgba(69, 26, 3, 0.35);
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-tags {
    margin: 20px 0;
}

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

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

.detail-meta-grid span {
    padding: 13px;
    border-radius: 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-meta-grid b {
    display: block;
    color: rgba(255, 247, 237, 0.7);
    font-size: 12px;
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 24px 64px rgba(69, 26, 3, 0.24);
    aspect-ratio: 16 / 9;
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 18px 38px rgba(217, 119, 6, 0.34);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 31px;
    top: 24px;
    border-left: 22px solid #fff;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
}

.player-cover strong {
    font-size: 18px;
}

.content-card p {
    color: var(--muted);
    font-size: 17px;
}

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

.side-ranks .rank-row {
    grid-template-columns: 26px 46px minmax(0, 1fr);
}

.side-ranks .rank-row em {
    display: none;
}

.side-ranks .rank-row img {
    width: 46px;
    height: 62px;
}

.site-footer {
    color: #fde68a;
    background: #451a03;
    padding: 42px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.8fr;
    gap: 32px;
}

.site-footer p {
    color: #fcd68b;
    max-width: 460px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff7ed;
    font-size: 18px;
}

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

.copyright {
    margin-top: 34px;
    padding: 18px;
    text-align: center;
    color: #fbbf24;
    border-top: 1px solid rgba(253, 230, 138, 0.15);
}

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

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

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

    .split-section,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-side {
        order: 2;
    }
}

@media (max-width: 860px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content,
    .quick-panel,
    .detail-top,
    .detail-meta-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 42px 0 82px;
    }

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

    .quick-panel {
        margin-top: -32px;
    }

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

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

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

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

    .movie-card-body {
        padding: 12px;
    }

    .movie-card p,
    .tag-row {
        display: none;
    }

    .rank-row {
        grid-template-columns: 30px 46px minmax(0, 1fr);
    }

    .rank-row img {
        width: 46px;
        height: 62px;
    }

    .rank-row em {
        display: none;
    }

    .page-hero {
        padding: 54px 0;
    }

    .section-block {
        padding-top: 48px;
    }
}
