:root {
    --bg: #fff7ed;
    --paper: #ffffff;
    --paper-soft: rgba(255, 255, 255, .78);
    --text: #111827;
    --muted: #6b7280;
    --line: rgba(146, 64, 14, .14);
    --amber: #d97706;
    --amber-deep: #92400e;
    --orange: #ea580c;
    --dark: #111827;
    --shadow: 0 22px 50px rgba(120, 53, 15, .16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 42%, #fde68a 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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;
    border-bottom: 1px solid rgba(217, 119, 6, .15);
    background: rgba(255, 251, 235, .86);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -.02em;
}

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

.brand-text {
    font-size: 20px;
}

.desktop-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    border-radius: 999px;
    padding: 10px 15px;
    color: #4b5563;
    font-weight: 700;
    transition: .2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--amber-deep);
    background: rgba(245, 158, 11, .15);
}

.header-action,
.primary-button,
.home-search button,
.wide-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 34px rgba(217, 119, 6, .26);
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease;
}

.header-action {
    padding: 10px 16px;
}

.primary-button,
.home-search button,
.wide-link {
    padding: 12px 20px;
}

.header-action:hover,
.primary-button:hover,
.home-search button:hover,
.wide-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(217, 119, 6, .34);
}

.secondary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: .2s ease;
}

.secondary-button,
.ghost-button {
    border: 1px solid rgba(255, 255, 255, .42);
    color: #fff;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(12px);
    padding: 12px 20px;
}

.ghost-button {
    color: var(--amber-deep);
    border-color: rgba(217, 119, 6, .22);
    background: rgba(255, 255, 255, .76);
}

.secondary-button:hover,
.ghost-button:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.text-link {
    color: var(--amber-deep);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(245, 158, 11, .16);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: var(--amber-deep);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--shadow);
}

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

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, .32), transparent 32%), linear-gradient(135deg, #111827, #78350f 50%, #111827);
}

.hero-stage {
    position: relative;
    min-height: 660px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s ease;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, .45fr);
    align-items: center;
    gap: 48px;
    padding: 96px max(24px, calc((100vw - 1180px) / 2)) 74px;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, .92), rgba(120, 53, 15, .68), rgba(17, 24, 39, .86)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.12);
    transform: scale(1.04);
}

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

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 12px;
    color: #92400e;
    background: rgba(251, 191, 36, .18);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}

.hero .eyebrow {
    color: #fde68a;
    background: rgba(255, 255, 255, .12);
}

.hero h1 {
    max-width: 820px;
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: .98;
    font-weight: 950;
    letter-spacing: -.05em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, .82);
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    color: #92400e;
    background: rgba(245, 158, 11, .16);
}

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

.hero-actions,
.hero-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.hero-links a {
    color: #fde68a;
    font-weight: 800;
}

.hero-poster {
    align-self: center;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 30px;
    padding: 14px;
    background: rgba(255, 255, 255, .13);
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 22px;
    object-fit: cover;
}

.hero-poster span {
    display: block;
    padding: 12px 6px 2px;
    color: #fde68a;
    font-weight: 900;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .42);
    backdrop-filter: blur(16px);
}

.hero-controls button {
    border: 0;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, .16);
}

.hero-controls > button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 50%;
    opacity: .45;
}

.hero-dot.is-active {
    width: 28px;
    border-radius: 999px;
    opacity: 1;
    background: #f59e0b;
}

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

.quick-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.quick-search h2,
.section-head h2,
.rank-panel h2,
.page-hero h1,
.detail-info h1,
.content-card h2,
.ranking-section h2 {
    margin: 8px 0 0;
    color: var(--text);
    font-weight: 950;
    letter-spacing: -.035em;
}

.quick-search h2,
.section-head h2,
.rank-panel h2,
.ranking-section h2 {
    font-size: clamp(24px, 3vw, 36px);
}

.home-search {
    display: flex;
    width: min(520px, 100%);
    gap: 10px;
    border-radius: 999px;
    padding: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

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

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

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

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

.category-pill,
.category-card,
.content-card,
.rank-panel,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-soft);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.category-pill {
    padding: 22px;
    transition: .2s ease;
}

.category-pill span {
    display: block;
    color: #78350f;
    font-size: 18px;
    font-weight: 950;
}

.category-pill small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.6;
}

.category-pill:hover,
.category-card:hover,
.movie-card:hover {
    transform: translateY(-5px);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(120, 53, 15, .12);
    transition: .2s ease;
}

.movie-card[hidden] {
    display: none;
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #fef3c7;
}

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

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

.score,
.card-year {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(17, 24, 39, .78);
    backdrop-filter: blur(8px);
}

.score {
    left: 12px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.card-year {
    right: 12px;
}

.card-content {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    color: #111827;
    font-size: 17px;
    font-weight: 950;
    line-height: 1.4;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
}

.rank-panel {
    position: sticky;
    top: 94px;
    padding: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-radius: 18px;
    padding: 10px;
    background: rgba(255, 255, 255, .72);
    transition: .2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: #fff;
}

.rank-no {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    background: #111827;
    font-weight: 950;
}

.rank-item img {
    width: 52px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

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

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

.rank-text strong {
    font-weight: 950;
}

.rank-text small {
    margin-top: 4px;
    color: var(--muted);
}

.rank-score {
    color: var(--amber-deep);
    font-weight: 950;
}

.wide-link {
    width: 100%;
    margin-top: 16px;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 26px;
}

.page-hero.slim {
    max-width: 980px;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 64px);
}

.page-hero p {
    max-width: 760px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumb a {
    color: var(--amber-deep);
}

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

.category-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    transition: .2s ease;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

.category-card h2 {
    margin: 8px 0 10px;
    font-size: 28px;
    font-weight: 950;
}

.category-card p {
    color: var(--muted);
    line-height: 1.8;
}

.category-card span {
    color: var(--amber-deep);
    font-weight: 950;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 220px auto;
    gap: 12px;
    margin-bottom: 26px;
    padding: 14px;
}

.search-box,
.select-box {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.search-box input,
.select-box select {
    width: 100%;
    border: 1px solid rgba(217, 119, 6, .18);
    border-radius: 16px;
    outline: 0;
    padding: 13px 14px;
    color: var(--text);
    background: #fff;
}

.empty-state {
    display: none;
    margin-top: 28px;
    border-radius: 22px;
    padding: 40px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, .78);
}

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

.ranking-section + .ranking-section {
    margin-top: 54px;
}

.ranking-layout {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.rank-list.large {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 14px;
    background: rgba(255, 255, 255, .72);
    box-shadow: var(--shadow);
}

.detail-hero {
    padding: 52px max(24px, calc((100vw - 1180px) / 2));
    color: #fff;
    background: radial-gradient(circle at 10% 0, rgba(251, 191, 36, .24), transparent 30%), linear-gradient(135deg, #111827, #78350f 52%, #111827);
}

.detail-hero .breadcrumb {
    justify-content: flex-start;
    color: rgba(255, 255, 255, .68);
}

.detail-hero .breadcrumb a {
    color: #fde68a;
}

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

.detail-poster {
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 28px;
    padding: 12px;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

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

.detail-info .section-kicker {
    color: #fde68a;
    background: rgba(255, 255, 255, .12);
}

.detail-info h1 {
    margin-top: 18px;
    color: #fff;
    font-size: clamp(36px, 6vw, 68px);
}

.detail-lead {
    max-width: 820px;
    color: rgba(255, 255, 255, .82);
    font-size: 18px;
    line-height: 1.85;
}

.detail-tags span {
    color: #fff7ed;
    background: rgba(255, 255, 255, .14);
}

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

.meta-list div {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, .1);
}

.meta-list dt {
    color: rgba(255, 255, 255, .58);
    font-size: 12px;
    font-weight: 900;
}

.meta-list dd {
    margin: 6px 0 0;
    color: #fff;
    font-weight: 900;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #111827;
    box-shadow: 0 26px 70px rgba(17, 24, 39, .32);
    aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    object-fit: contain;
    background: #000;
}

.player-cover {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    cursor: pointer;
    color: #fff;
    background-size: cover;
    background-position: center;
    transition: opacity .24s ease, visibility .24s ease;
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 45px rgba(217, 119, 6, .42);
    font-size: 34px;
    text-indent: 5px;
}

.player-cover strong {
    max-width: min(760px, 90%);
    font-size: clamp(24px, 4vw, 46px);
    line-height: 1.2;
    text-align: center;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    padding: 28px;
}

.content-card p {
    color: #374151;
    line-height: 1.95;
    font-size: 16px;
}

.site-footer {
    margin-top: 40px;
    color: rgba(255, 255, 255, .76);
    background: #111827;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 36px;
    padding: 44px 0;
}

.footer-brand {
    color: #fff;
    font-size: 24px;
}

.footer-inner p {
    max-width: 580px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: start;
}

.footer-links a {
    border-radius: 999px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, .08);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 18px;
    text-align: center;
    color: rgba(255, 255, 255, .55);
}

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

    .split-layout,
    .ranking-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero,
    .hero-stage {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 84px;
        text-align: left;
    }

    .hero-poster {
        max-width: 260px;
        transform: none;
    }

    .quick-search,
    .section-head,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .category-pills,
    .category-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .category-card {
        grid-template-columns: 130px minmax(0, 1fr);
    }

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

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

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

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

@media (max-width: 560px) {
    .header-inner,
    .section-wrap,
    .page-hero,
    .footer-inner,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

    .brand-text {
        font-size: 17px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero p,
    .page-hero p,
    .detail-lead {
        font-size: 16px;
    }

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

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

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

    .card-content {
        padding: 12px;
    }

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

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

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

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

    .rank-score {
        display: none;
    }

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

    .player-card {
        border-radius: 20px;
    }
}
