:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --card: rgba(15, 23, 42, 0.72);
    --card-strong: rgba(30, 41, 59, 0.88);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(250, 204, 21, 0.38);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-soft: #cbd5e1;
    --gold: #facc15;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 12%, rgba(234, 179, 8, 0.18), transparent 28%),
        radial-gradient(circle at 90% 8%, rgba(249, 115, 22, 0.12), transparent 30%),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.26;
    background-image:
        radial-gradient(circle at 12px 18px, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 96px 80px, rgba(250, 204, 21, 0.65) 1px, transparent 1px);
    background-size: 150px 150px, 210px 210px;
    z-index: -1;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    width: min(1280px, calc(100% - 32px));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.site-logo__mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    box-shadow: 0 16px 36px rgba(234, 179, 8, 0.25);
}

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

.desktop-nav a,
.mobile-panel a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-soft);
    transition: color 0.25s ease, background 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--orange));
}

.header-search {
    width: min(280px, 26vw);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
}

.header-search input,
.mobile-panel input,
.filter-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search button,
.mobile-panel button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: #111827;
    background: var(--gold);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-panel form {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
}

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

.hero-section {
    position: relative;
    min-height: 700px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-section .star-field {
    opacity: 0.34;
}

.hero-carousel {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    min-height: 700px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    align-items: center;
    gap: 56px;
    padding: 96px 0 68px;
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(250, 204, 21, 0.4);
    border-radius: 999px;
    color: var(--gold);
    background: rgba(250, 204, 21, 0.08);
}

.hero-copy h1 {
    max-width: 820px;
    margin: 0 0 16px;
    font-size: clamp(2.8rem, 7vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.08em;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(1.5rem, 3vw, 2.6rem);
    color: #ffffff;
}

.hero-copy p {
    max-width: 760px;
    color: var(--muted-soft);
    font-size: 1.08rem;
    line-height: 1.9;
}

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

.hero-tags {
    margin: 22px 0;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-soft);
    background: rgba(255, 255, 255, 0.06);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

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

.button-primary {
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    box-shadow: 0 18px 46px rgba(234, 179, 8, 0.28);
}

.button-secondary {
    border: 1px solid var(--line);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.button-primary:hover,
.button-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

.hero-media {
    position: relative;
    min-height: 560px;
}

.hero-media::before {
    content: "";
    position: absolute;
    inset: 12% -18% 10% -14%;
    border-radius: 46px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.24), rgba(249, 115, 22, 0.06));
    filter: blur(16px);
}

.hero-media a {
    position: relative;
    z-index: 1;
    display: block;
    height: 560px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.75);
    box-shadow: var(--shadow);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.hero-media a:hover img {
    transform: scale(1.06);
}

.hero-media__caption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(14px);
}

.hero-media__caption strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.15rem;
}

.hero-media__caption small {
    color: var(--muted-soft);
}

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

.hero-dot {
    width: 44px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--gold), var(--orange));
}

.section {
    padding: 78px 0;
}

.section--tight {
    padding: 48px 0;
}

.section-header {
    max-width: 760px;
    margin: 0 auto 38px;
    text-align: center;
}

.section-header span {
    color: var(--gold);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-header h1,
.section-header h2 {
    margin: 12px 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.1;
}

.section-header p {
    color: var(--muted-soft);
    line-height: 1.85;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 28px 66px rgba(0, 0, 0, 0.36);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.movie-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-card__poster img {
    transform: scale(1.08);
    opacity: 0.86;
}

.movie-card__play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #111827;
    font-weight: 800;
    background: var(--gold);
    transform: translateY(12px);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.movie-card__body {
    padding: 16px;
}

.movie-card__meta {
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 0.82rem;
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.movie-card p {
    min-height: 52px;
    margin: 0 0 14px;
    color: var(--muted-soft);
    font-size: 0.92rem;
    line-height: 1.7;
}

.movie-card--compact .movie-card__body {
    padding: 14px;
}

.movie-card--compact p {
    min-height: auto;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(250, 204, 21, 0.16), rgba(249, 115, 22, 0.04)),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(250, 204, 21, 0.16);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 14px;
    font-size: 1.6rem;
}

.category-card p {
    position: relative;
    margin: 0 0 22px;
    color: var(--muted-soft);
    line-height: 1.8;
}

.category-card a {
    position: relative;
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 999px;
    color: #111827;
    font-weight: 800;
    background: var(--gold);
}

.filter-toolbar {
    position: sticky;
    top: 82px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 30px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.84);
    backdrop-filter: blur(16px);
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.filter-search span {
    flex-shrink: 0;
    color: var(--gold);
    font-weight: 800;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.filter-buttons button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--muted-soft);
    background: rgba(255, 255, 255, 0.06);
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
    color: #111827;
    background: var(--gold);
}

.ranking-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-item__link {
    display: grid;
    grid-template-columns: 56px 70px minmax(0, 1fr) 72px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.ranking-item__link:hover {
    transform: translateX(4px);
    border-color: var(--line-strong);
    background: var(--card-strong);
}

.ranking-item__rank {
    color: var(--gold);
    font-size: 1.35rem;
    font-weight: 900;
    text-align: center;
}

.ranking-item img {
    width: 70px;
    height: 98px;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

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

.ranking-item__content strong {
    margin-bottom: 6px;
    font-size: 1.08rem;
}

.ranking-item__content em {
    margin-bottom: 5px;
    color: var(--gold);
    font-style: normal;
    font-size: 0.9rem;
}

.ranking-item__content small {
    color: var(--muted-soft);
    line-height: 1.6;
}

.ranking-item__score {
    justify-self: end;
    padding: 7px 11px;
    border-radius: 999px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--orange));
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 36px;
    align-items: center;
    padding: 54px 0 36px;
}

.player-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: var(--shadow);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72)),
        rgba(2, 6, 23, 0.25);
    z-index: 3;
}

.player-overlay.is-hidden {
    display: none;
}

.play-icon {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    box-shadow: 0 20px 54px rgba(234, 179, 8, 0.28);
}

.detail-copy {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--card);
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.1;
}

.detail-copy p {
    color: var(--muted-soft);
    line-height: 1.86;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #111827;
    background: var(--gold);
    font-weight: 800;
}

.content-panel {
    margin: 34px 0;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--card);
}

.content-panel h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 1.65rem;
}

.content-panel p {
    margin: 0;
    color: var(--muted-soft);
    line-height: 2;
}

.empty-state {
    display: none;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: var(--muted-soft);
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
}

body.has-empty-results .empty-state {
    display: block;
}

body.has-empty-results .movie-grid,
body.has-empty-results .ranking-list {
    display: none;
}

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-slide,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-section,
    .hero-carousel {
        min-height: 980px;
    }

    .hero-media {
        min-height: 420px;
    }

    .hero-media a {
        height: 420px;
    }

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

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

    .filter-toolbar {
        position: static;
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .site-header__inner,
    .page-main,
    .hero-carousel,
    .mobile-panel {
        width: min(100% - 22px, 1280px);
    }

    .hero-section,
    .hero-carousel {
        min-height: 900px;
    }

    .hero-slide {
        gap: 26px;
        padding: 58px 0 76px;
    }

    .hero-copy p {
        font-size: 0.98rem;
    }

    .hero-media {
        min-height: 360px;
    }

    .hero-media a {
        height: 360px;
        border-radius: 24px;
    }

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

    .movie-card__body {
        padding: 12px;
    }

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

    .ranking-item__link {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .ranking-item__score {
        display: none;
    }

    .ranking-item img {
        width: 58px;
        height: 82px;
    }

    .detail-copy,
    .content-panel {
        padding: 20px;
        border-radius: 22px;
    }
}
