:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(6, 182, 212, 0.45);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #06b6d4;
    --blue: #3b82f6;
    --yellow: #facc15;
    --danger: #fb7185;
    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 24px 80px rgba(2, 8, 23, 0.42);
    --header-height: 72px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 5%, rgba(34, 211, 238, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 0%, rgba(59, 130, 246, 0.16), transparent 24rem),
        linear-gradient(180deg, #020617 0%, #08111f 46%, #020617 100%);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 72%);
}

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

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

button,
input {
    font: inherit;
}

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

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: var(--header-height);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}

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

.nav-link,
.mobile-nav-link {
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.12);
}

.nav-toggle {
    width: 44px;
    height: 44px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.76);
    cursor: pointer;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    margin-inline: auto;
    border-radius: 999px;
    background: currentColor;
}

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

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
}

.hero {
    position: relative;
    height: min(680px, calc(100vh - var(--header-height)));
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.25) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.25) 0%, #020617 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 72px;
}

.hero-copy {
    max-width: 690px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 18px var(--cyan);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    width: min(100%, 640px);
    margin: 22px 0 0;
    color: var(--muted-strong);
    font-size: 20px;
    line-height: 1.7;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(6, 182, 212, 0.12);
    font-size: 12px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.search-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-panel button {
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.28);
}

.ghost-button {
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.search-panel button:hover {
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 42px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--cyan);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.65);
}

.search-landing,
.section-block {
    position: relative;
    z-index: 2;
}

.search-landing {
    margin-top: -42px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1.2fr 2fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.search-panel strong,
.search-panel span {
    display: block;
}

.search-panel strong {
    font-size: 18px;
}

.search-panel span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.search-panel input,
.search-box input {
    width: 100%;
    min-height: 48px;
    color: var(--text);
    border: 1px solid var(--line);
    outline: 0;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
}

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

.section-block {
    padding: 56px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--cyan);
    font-weight: 800;
}

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

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

.category-card {
    position: relative;
    min-height: 132px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(59, 130, 246, 0.08)),
        rgba(15, 23, 42, 0.76);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: 0 22px 44px rgba(6, 182, 212, 0.14);
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 1;
    display: block;
}

.category-card strong {
    font-size: 22px;
}

.category-card em {
    margin-top: 12px;
    color: var(--muted-strong);
    font-style: normal;
    line-height: 1.55;
}

.category-glow {
    position: absolute;
    right: -44px;
    bottom: -44px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.16);
    filter: blur(12px);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 48px rgba(2, 8, 23, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 24px 70px rgba(6, 182, 212, 0.12);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(59, 130, 246, 0.12));
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.poster-wrap img.is-missing {
    opacity: 0;
}

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.86) 100%);
}

.play-float,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.play-float {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #00111a;
    background: var(--cyan);
    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.35);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--yellow), #fb923c);
}

.card-body {
    padding: 16px;
}

.card-meta {
    gap: 6px;
    margin-bottom: 12px;
}

.card-meta span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
}

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

.movie-card h3 a:hover {
    color: var(--cyan);
}

.movie-card p {
    min-height: 46px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(6, 182, 212, 0.12);
    font-size: 12px;
    font-weight: 700;
}

.card-compact {
    display: grid;
    grid-template-columns: 112px 1fr;
}

.card-compact .poster-wrap {
    aspect-ratio: 3 / 4;
}

.card-compact .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    padding-top: 52px;
}

.slim-hero {
    padding-bottom: 18px;
}

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

.page-hero p {
    max-width: 820px;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
}

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

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
}

.search-box {
    position: relative;
    flex: 1 1 360px;
}

.search-box span {
    position: absolute;
    left: 17px;
    top: 50%;
    color: var(--muted);
    transform: translateY(-50%);
}

.search-box input {
    padding: 0 16px 0 46px;
}

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

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(2, 6, 23, 0.52);
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(6, 182, 212, 0.12);
}

.empty-state {
    display: none;
    margin-top: 18px;
    padding: 28px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

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

.detail-main {
    padding-bottom: 76px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background-position: center;
    background-size: cover;
}

.detail-hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.28), #020617 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 46px 0 56px;
}

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

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-poster img.is-missing {
    opacity: 0;
}

.detail-copy h1 {
    max-width: 880px;
    font-size: clamp(38px, 6vw, 72px);
}

.detail-one-line {
    max-width: 820px;
    color: var(--muted-strong);
    font-size: 20px;
    line-height: 1.75;
}

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

.detail-copy .primary-button {
    margin-top: 28px;
}

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

.video-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 24px 60px rgba(6, 182, 212, 0.38);
    font-size: 30px;
}

.content-card {
    margin-bottom: 18px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.content-card p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 72px;
    padding: 42px 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
}

.footer-logo {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.footer-links {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.footer-links a {
    color: var(--muted-strong);
    font-weight: 700;
}

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

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

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

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

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

@media (max-width: 780px) {
    :root {
        --header-height: 64px;
    }

    .desktop-nav {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .site-logo {
        font-size: 17px;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 34px;
    }

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

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

    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .detail-poster {
        width: min(260px, 72vw);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-items: start;
    }
}

@media (max-width: 520px) {
    .container,
    .header-inner,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

    .hero {
        min-height: 650px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .movie-grid,
    .rank-grid,
    .wide-rank-grid {
        grid-template-columns: 1fr;
    }

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

    .card-compact {
        grid-template-columns: 96px 1fr;
    }

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