:root {
    --bg: #0f172a;
    --bg-deep: #020617;
    --panel: rgba(30, 41, 59, 0.68);
    --panel-solid: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #fbbf24;
    --amber-strong: #f59e0b;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.08), transparent 32rem),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), #fde68a);
    box-shadow: 0 0 26px rgba(251, 191, 36, 0.28);
    font-size: 14px;
}

.desktop-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
    overflow: hidden;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--soft);
    font-size: 14px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.card-category:hover,
.movie-card h3 a:hover,
.section-more:hover {
    color: var(--amber);
}

.nav-search {
    width: min(300px, 28vw);
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    overflow: hidden;
}

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

.nav-search input {
    padding: 9px 12px;
}

.nav-search button,
.large-search button,
.mobile-nav button,
.filter-bar button {
    border: 0;
    cursor: pointer;
    color: #111827;
    background: var(--amber);
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button {
    align-self: stretch;
    width: 42px;
}

.nav-search button:hover,
.large-search button:hover,
.mobile-nav button:hover,
.filter-bar button:hover,
.primary-button:hover {
    background: #fde047;
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.95);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 18px 24px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.mobile-nav input {
    padding: 11px 12px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.95);
}

.mobile-nav button {
    border-radius: 10px;
    padding: 0 18px;
}

.page-shell {
    padding-top: 64px;
}

.hero {
    position: relative;
    height: min(660px, 86vh);
    min-height: 520px;
    overflow: hidden;
    background: var(--bg-deep);
}

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

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

.hero-slide img,
.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 6s ease;
}

.hero-slide.is-active img {
    transform: scale(1.08);
}

.hero-overlay,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.68) 42%, rgba(15, 23, 42, 0.20) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(15, 23, 42, 0.3) 46%, transparent 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 74px;
    max-width: 780px;
}

.hero-meta,
.meta-line,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta a,
.hero-meta span,
.card-category,
.tag,
.player-source,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta a,
.card-category,
.tag,
.eyebrow {
    color: var(--amber);
    background: rgba(251, 191, 36, 0.13);
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.hero-meta a,
.hero-meta span,
.card-category,
.tag,
.eyebrow {
    padding: 5px 11px;
}

.hero-meta span {
    color: var(--soft);
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.one-line {
    max-width: 760px;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
}

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

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

.primary-button {
    color: #111827;
    background: var(--amber);
    box-shadow: 0 18px 45px rgba(251, 191, 36, 0.22);
}

.ghost-button {
    color: var(--text);
    border: 1px solid rgba(248, 250, 252, 0.22);
    background: rgba(15, 23, 42, 0.42);
}

.ghost-button:hover {
    border-color: rgba(251, 191, 36, 0.45);
    transform: translateY(-1px);
}

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

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.38);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--amber);
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 0;
}

.intro-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(280px, 1.45fr);
    gap: 16px;
    margin-top: -26px;
    position: relative;
    z-index: 4;
}

.intro-strip > div,
.large-search,
.category-card,
.ranking-panel,
.filter-bar,
.detail-content article,
.detail-meta-card,
.player-frame,
.ranking-row {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.intro-strip > div {
    padding: 22px;
}

.intro-strip strong {
    display: block;
    font-size: 34px;
    line-height: 1;
    color: var(--amber);
}

.intro-strip span {
    color: var(--muted);
}

.large-search {
    display: grid;
    grid-template-columns: 1fr auto;
    overflow: hidden;
}

.large-search input {
    min-height: 70px;
    padding: 0 20px;
}

.large-search button {
    padding: 0 24px;
    font-weight: 800;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.18;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

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

.movie-card {
    min-width: 0;
}

.poster-link,
.wide-poster,
.ranking-cover {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: var(--panel-solid);
}

.poster-link {
    aspect-ratio: 3 / 4;
    margin-bottom: 12px;
}

.poster-link img,
.wide-poster img,
.ranking-cover img,
.detail-poster img,
.category-preview img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.3s ease;
}

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

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.76);
    font-size: 12px;
    font-weight: 800;
}

.hover-copy {
    position: absolute;
    inset: auto 0 0 0;
    padding: 52px 12px 12px;
    color: var(--text);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent);
    font-size: 13px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
    gap: 28px;
}

.wide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.48);
}

.wide-poster {
    aspect-ratio: 16 / 11;
}

.wide-body h3 {
    margin-top: 10px;
}

.meta-line {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 10px;
    color: rgba(148, 163, 184, 0.55);
}

.ranking-panel {
    padding: 22px;
}

.small-heading {
    align-items: start;
    margin-bottom: 12px;
}

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

.rank-list a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-num,
.ranking-index {
    color: var(--amber);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 18px;
}

.small-hero > div {
    min-height: 240px;
    display: grid;
    align-content: end;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.16), transparent 38%),
        linear-gradient(120deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.72));
    box-shadow: var(--shadow);
}

.small-hero h1 {
    margin: 14px 0 10px;
}

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

.category-card {
    overflow: hidden;
}

.category-card a {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 200px;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    overflow: hidden;
}

.category-body {
    padding: 26px;
}

.category-body h2 {
    margin: 0 0 10px;
    font-size: 25px;
}

.category-body p {
    color: var(--muted);
    margin: 0 0 18px;
}

.category-body span {
    color: var(--amber);
    font-weight: 800;
}

.filter-section {
    padding-top: 32px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr)) auto;
    gap: 14px;
    padding: 18px;
    margin-bottom: 18px;
}

.filter-bar.single-filter {
    grid-template-columns: minmax(260px, 1fr) auto;
}

.filter-bar label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.76);
}

.filter-bar button {
    align-self: end;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    font-weight: 800;
}

.result-count {
    color: var(--muted);
    margin: 0 0 22px;
}

.movie-card.is-hidden,
.ranking-row.is-hidden {
    display: none;
}

.ranking-table {
    display: grid;
    gap: 16px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 92px 64px 1fr;
    gap: 20px;
    align-items: center;
    padding: 14px;
}

.ranking-cover {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
}

.ranking-info h2 {
    margin: 8px 0;
    font-size: 20px;
}

.detail-page {
    padding-top: 64px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--bg-deep);
}

.detail-bg {
    position: absolute;
    inset: 0;
    filter: blur(4px) saturate(0.9);
}

.detail-wrap {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px 48px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 30px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 38px;
    align-items: end;
    min-height: 460px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(248, 250, 252, 0.12);
}

.detail-info h1 {
    max-width: 860px;
}

.one-line {
    margin-bottom: 20px;
}

.tag-row {
    margin: 20px 0 28px;
}

.player-section {
    margin-top: -30px;
    position: relative;
    z-index: 5;
}

.player-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 18px;
}

.player-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(24px, 3vw, 34px);
}

.player-source {
    padding: 6px 12px;
    color: #111827;
    background: var(--amber);
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: var(--text);
    background: #000;
    cursor: pointer;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.20), rgba(0, 0, 0, 0.42) 38%, rgba(0, 0, 0, 0.82));
}

.player-cover img {
    position: absolute;
    inset: 0;
    opacity: 0.72;
}

.play-circle {
    position: relative;
    z-index: 2;
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: var(--amber);
    font-size: 30px;
    box-shadow: 0 0 46px rgba(251, 191, 36, 0.45);
}

.player-cover strong {
    position: relative;
    z-index: 2;
    margin-top: 116px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
}

.player-frame.is-playing .player-cover {
    display: none;
}

.player-message {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 12px;
    margin: 0;
    color: #fecaca;
    font-size: 14px;
    pointer-events: none;
}

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

.detail-content article {
    padding: 26px;
}

.detail-content article:nth-child(1) {
    grid-column: 1 / -1;
}

.detail-content h2 {
    margin: 0 0 12px;
    color: var(--text);
}

.detail-content p {
    margin: 0;
    color: var(--soft);
    font-size: 16px;
}

.detail-meta-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.detail-meta-card div {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 14px;
}

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

.detail-meta-card dd {
    margin: 0;
    color: var(--text);
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
}

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

.footer-inner p {
    color: var(--muted);
    max-width: 420px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: var(--muted);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--amber);
}

@media (max-width: 1180px) {
    .desktop-nav {
        gap: 14px;
    }

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

    .intro-strip,
    .split-section {
        grid-template-columns: 1fr 1fr;
    }

    .large-search {
        grid-column: 1 / -1;
    }
}

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

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .hero {
        min-height: 560px;
    }

    .hero-overlay,
    .detail-shade {
        background:
            linear-gradient(0deg, var(--bg) 0%, rgba(15, 23, 42, 0.72) 55%, rgba(15, 23, 42, 0.2) 100%),
            linear-gradient(90deg, rgba(2, 6, 23, 0.72), transparent);
    }

    .hero-content {
        left: 24px;
        bottom: 72px;
    }

    .intro-strip,
    .category-grid,
    .split-section,
    .wide-grid,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

    .category-preview {
        height: 220px;
    }

    .filter-bar,
    .filter-bar.single-filter {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .nav-wrap {
        padding: 0 16px;
    }

    .brand span:last-child {
        max-width: 8em;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .hero {
        min-height: 520px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .content-section,
    .page-hero,
    .detail-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .intro-strip {
        margin-top: 0;
        grid-template-columns: 1fr;
    }

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

    .movie-card-wide,
    .ranking-row,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .wide-poster,
    .ranking-cover {
        aspect-ratio: 16 / 10;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-grid {
        min-height: auto;
        align-items: start;
    }

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

    .player-heading {
        align-items: start;
        flex-direction: column;
    }

    .player-frame {
        border-radius: 14px;
    }

    .small-hero > div {
        padding: 24px;
    }

    .rank-list a {
        grid-template-columns: 36px 1fr;
    }

    .rank-meta {
        display: none;
    }
}
