:root {
    --bg: #0b0f19;
    --panel: #111827;
    --panel-soft: #172033;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(255, 255, 255, 0.12);
    --amber: #d97706;
    --amber-light: #f59e0b;
    --blue: #2563eb;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: radial-gradient(circle at 20% 0%, rgba(217, 119, 6, 0.18), transparent 34%),
        linear-gradient(180deg, #0b0f19 0%, #121826 42%, #0b0f19 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.24));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header.is-scrolled {
    background: rgba(2, 6, 23, 0.94);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.32);
}

.brand-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    transition: color 0.2s ease;
}

.nav-link:hover,
.text-link:hover {
    color: var(--amber-light);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(320px, 26vw);
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.header-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 0;
    outline: none;
    color: #fff;
    background: transparent;
}

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

.header-search button,
.big-search button {
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: #fff;
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1360px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav a {
    display: block;
    padding: 10px 4px;
    color: rgba(255, 255, 255, 0.84);
}

.mobile-nav.is-open {
    display: block;
}

.hero-carousel {
    position: relative;
    height: clamp(620px, 78vh, 820px);
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.64;
}

.hero-slide img.is-missing,
.movie-card img.is-missing,
.ranking-item img.is-missing,
.detail-poster img.is-missing {
    display: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 35%, rgba(245, 158, 11, 0.24), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.26)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 46%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1360px) / 2));
    bottom: 120px;
    max-width: 760px;
    padding-right: 24px;
}

.hero-kicker,
.detail-meta,
.meta-row,
.tag-row,
.hero-actions,
.section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-kicker span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.hero-kicker span:first-child,
.tag-row span:first-child {
    background: rgba(217, 119, 6, 0.92);
    color: #fff;
}

.hero-content h1,
.subpage-hero h1,
.detail-copy h1 {
    margin: 18px 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-content p,
.subpage-hero p,
.quick-search p,
.category-tile p,
.detail-copy .one-line {
    color: rgba(226, 232, 240, 0.88);
    line-height: 1.8;
    font-size: 17px;
}

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

.primary-btn {
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    color: #fff;
    box-shadow: 0 16px 36px rgba(217, 119, 6, 0.35);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    backdrop-filter: blur(16px);
}

.hero-arrow.prev {
    left: 28px;
}

.hero-arrow.next {
    right: 28px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

.content-section,
.panel-section,
.subpage-main,
.detail-main {
    width: min(1360px, calc(100% - 32px));
    margin: 0 auto;
}

.panel-section {
    margin-top: -54px;
    position: relative;
    z-index: 4;
}

.quick-search,
.filter-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.big-search,
.filter-panel {
    display: flex;
}

.big-search {
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.big-search input {
    padding: 0 18px;
}

.big-search button {
    padding: 12px 24px;
}

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

.section-head {
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-head h2,
.rank-panel h2,
.quick-search h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 3vw, 40px);
}

.section-kicker {
    display: inline-flex;
    color: var(--amber-light);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.text-link {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.category-tile,
.category-overview-card,
.rank-panel,
.detail-article,
.detail-side,
.player-shell {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.9));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-tile {
    min-height: 170px;
    padding: 22px;
    overflow: hidden;
    position: relative;
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -38px;
    bottom: -38px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
}

.category-tile span {
    display: block;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 14px;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, rgba(217, 119, 6, 0.52), rgba(37, 99, 235, 0.3));
    overflow: hidden;
}

.large-card .poster-link {
    aspect-ratio: 16 / 11;
}

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

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

.poster-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    background: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.38), transparent 42%), linear-gradient(145deg, #111827, #020617);
    z-index: -1;
}

img.is-missing + .poster-fallback,
.detail-poster img.is-missing + .poster-fallback {
    z-index: 1;
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 3;
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: rgba(217, 119, 6, 0.94);
}

.rank-badge {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    background: rgba(37, 99, 235, 0.92);
}

.card-body {
    padding: 14px;
}

.meta-row {
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.meta-row a {
    color: var(--amber-light);
}

.card-body h3 {
    min-height: 48px;
    margin: 10px 0 8px;
    font-size: 16px;
    line-height: 1.45;
}

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

.card-body .tag-row {
    gap: 6px;
}

.card-body .tag-row span {
    min-height: 22px;
    padding: 4px 7px;
    font-size: 11px;
}

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

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

.ranking-list.compact {
    margin-top: 18px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 34px 54px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ranking-no {
    color: var(--amber-light);
    font-weight: 900;
}

.ranking-item img {
    width: 54px;
    height: 74px;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(145deg, #1f2937, #020617);
}

.ranking-info strong,
.ranking-info em {
    display: block;
}

.ranking-info em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.score {
    color: #fff;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.86);
    font-weight: 900;
    font-size: 13px;
}

.subpage-main {
    padding-top: 116px;
    padding-bottom: 80px;
}

.subpage-hero {
    padding: 70px 32px;
    border-radius: 32px;
    background: radial-gradient(circle at 82% 20%, rgba(217, 119, 6, 0.26), transparent 28%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
}

.subpage-hero h1 {
    margin-bottom: 16px;
}

.filter-panel {
    grid-template-columns: 1.5fr repeat(3, 1fr);
    margin: 26px 0;
    display: grid;
}

.filter-panel input,
.filter-panel select {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.filter-panel select option {
    color: #111827;
}

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

.category-overview-list {
    display: grid;
    gap: 24px;
    margin-top: 28px;
}

.category-overview-card {
    padding: 24px;
}

.overview-main {
    display: block;
    margin-bottom: 20px;
}

.overview-main h2 {
    margin: 10px 0;
    font-size: 30px;
}

.overview-main p {
    color: var(--muted);
    line-height: 1.7;
}

.overview-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.rank-wide {
    padding-top: 28px;
}

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

.detail-main {
    padding-top: 104px;
    padding-bottom: 80px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    padding: 18px 0;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    padding: 28px;
    border-radius: 32px;
    background: radial-gradient(circle at 82% 28%, rgba(217, 119, 6, 0.22), transparent 30%), linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
}

.detail-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(217, 119, 6, 0.55), rgba(37, 99, 235, 0.26));
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-copy {
    align-self: center;
}

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

.detail-meta {
    margin: 22px 0;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.site-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-start {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    box-shadow: 0 20px 54px rgba(217, 119, 6, 0.45);
}

.video-start.is-hidden {
    display: none;
}

.player-status {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    padding-top: 34px;
}

.detail-article,
.detail-side {
    padding: 28px;
}

.detail-article h2,
.detail-side h2 {
    margin-top: 0;
    font-size: 26px;
}

.detail-article p {
    color: rgba(226, 232, 240, 0.86);
    line-height: 2;
    font-size: 16px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    margin: 0;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
}

.related-section {
    width: 100%;
}

.site-footer {
    margin-top: 80px;
    padding: 56px 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.96));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    width: min(1360px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 26px;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.site-footer p,
.site-footer a,
.site-footer span {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer a {
    display: block;
}

.footer-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-tags a,
.footer-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 30;
}

.back-top.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.is-filtered-out {
    display: none !important;
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .movie-grid,
    .full-grid,
    .overview-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .rank-panel {
        position: static;
    }

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

@media (max-width: 760px) {
    .header-inner,
    .content-section,
    .panel-section,
    .subpage-main,
    .detail-main,
    .footer-grid {
        width: min(100% - 24px, 1360px);
    }

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

    .hero-carousel {
        height: 720px;
    }

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

    .hero-content h1,
    .subpage-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search,
    .filter-panel {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .big-search {
        display: grid;
        grid-template-columns: 1fr;
        border-radius: 18px;
        gap: 8px;
    }

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

    .category-grid,
    .featured-grid,
    .movie-grid,
    .full-grid,
    .overview-strip,
    .rank-wide .ranking-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .subpage-main,
    .detail-main {
        padding-top: 96px;
    }

    .subpage-hero,
    .detail-hero,
    .detail-article,
    .detail-side {
        padding: 20px;
        border-radius: 24px;
    }

    .detail-meta,
    .hero-actions {
        gap: 8px;
    }

    .ranking-item {
        grid-template-columns: 28px 48px 1fr;
    }

    .ranking-item .score {
        grid-column: 3;
        width: max-content;
    }

    .card-body h3 {
        font-size: 14px;
    }

    .video-start {
        width: 66px;
        height: 66px;
        font-size: 26px;
    }
}
