:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(59, 130, 246, 0.28);
    --blue: #38bdf8;
    --blue-strong: #2563eb;
    --cyan: #22d3ee;
    --green: #22c55e;
    --yellow: #f59e0b;
    --purple: #a855f7;
    --red: #f43f5e;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.24), transparent 34rem),
        radial-gradient(circle at 80% 12%, rgba(14, 165, 233, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 72%);
}

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

img {
    object-fit: cover;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

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

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(34, 211, 238, 0.9));
    color: white;
    font-size: 18px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.36);
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--blue);
}

.search-box {
    display: flex;
    align-items: center;
    width: 300px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
}

.search-box input,
.mobile-search input,
.filter-panel input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.search-box input {
    padding: 8px 14px;
}

.search-box button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--blue-strong), var(--cyan));
    color: white;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #dbeafe;
}

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

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

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    border-bottom: 1px solid rgba(59, 130, 246, 0.22);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 46%, rgba(2, 6, 23, 0.3) 100%),
        linear-gradient(0deg, #020617 0%, transparent 42%),
        var(--hero-image),
        radial-gradient(circle at 70% 30%, rgba(14, 165, 233, 0.28), rgba(15, 23, 42, 0.98));
    background-size: cover;
    background-position: center;
}

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

.hero-backdrop {
    position: absolute;
    inset: auto 8% 9% auto;
    width: min(420px, 36vw);
    height: min(420px, 36vw);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.36), rgba(34, 211, 238, 0.18));
    filter: blur(4px);
    opacity: 0.9;
}

.hero-content {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 54px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 680px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 20px;
}

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

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 11px;
    border: 1px solid rgba(56, 189, 248, 0.26);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: #bae6fd;
    font-size: 12px;
    font-weight: 700;
}

.link-tag:hover {
    border-color: rgba(56, 189, 248, 0.7);
    color: white;
}

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

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

.primary-button {
    background: linear-gradient(135deg, var(--blue-strong), var(--cyan));
    color: white;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.32);
}

.ghost-button,
.section-action {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
    color: var(--muted);
    font-weight: 700;
}

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

.hero-dot {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.content-section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-article h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.page-hero p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

.category-card,
.category-panel {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.48)),
        var(--category-image),
        rgba(15, 23, 42, 0.95);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.category-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 26px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.56);
}

.category-glow {
    position: absolute;
    inset: auto -18% -46% 28%;
    height: 160px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.25);
    filter: blur(38px);
}

.accent-green .category-glow,
.accent-green::after {
    background: rgba(34, 197, 94, 0.28);
}

.accent-yellow .category-glow,
.accent-yellow::after {
    background: rgba(245, 158, 11, 0.28);
}

.accent-purple .category-glow,
.accent-purple::after {
    background: rgba(168, 85, 247, 0.28);
}

.accent-red .category-glow,
.accent-red::after {
    background: rgba(244, 63, 94, 0.28);
}

.category-title {
    position: relative;
    font-size: 24px;
    font-weight: 900;
}

.category-desc {
    position: relative;
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

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

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

.movie-card,
.rank-card,
.side-card,
.detail-article,
.filter-panel {
    border: 1px solid rgba(59, 130, 246, 0.22);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.poster-link,
.poster-shell {
    display: block;
}

.poster-shell {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(56, 189, 248, 0.36), transparent 32%),
        linear-gradient(135deg, #0f172a, #1e293b);
}

.compact-card .poster-shell {
    aspect-ratio: 16 / 10;
}

.poster-shell img {
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 36%, rgba(2, 6, 23, 0.88));
}

.poster-badge,
.poster-score {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(2, 6, 23, 0.74);
    color: #e0f2fe;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.poster-badge {
    top: 10px;
    left: 10px;
}

.poster-score {
    right: 10px;
    bottom: 10px;
}

.movie-card-body {
    padding: 16px;
}

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

.movie-card h3 a:hover,
.rank-card h3 a:hover,
.category-samples a:hover,
.next-prev a:hover {
    color: var(--blue);
}

.movie-card-meta,
.movie-card-desc,
.rank-card p {
    color: var(--muted);
}

.movie-card-meta {
    margin: 6px 0 0;
    font-size: 13px;
}

.movie-card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 9px 0 12px;
    overflow: hidden;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

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

.rank-card {
    display: grid;
    grid-template-columns: 64px 110px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 154px;
    padding: 16px;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(34, 211, 238, 0.76));
    font-size: 20px;
    font-weight: 900;
}

.rank-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.rank-poster img {
    width: 100%;
    height: 100%;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 10px 0;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 700;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68)),
        var(--hero-image),
        radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.24), transparent 34rem);
    background-size: cover;
    background-position: center;
}

.small-hero {
    padding: 92px 0 48px;
}

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

.page-hero h1 {
    max-width: 820px;
    font-size: clamp(38px, 6vw, 64px);
}

.filter-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 14px 18px;
    border-radius: 18px;
}

.filter-panel input {
    min-height: 40px;
}

.filter-hint {
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.empty-state {
    margin-top: 18px;
    padding: 28px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--muted);
    text-align: center;
}

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

.category-panel::after {
    position: absolute;
    inset: auto -20% -32% 38%;
    content: "";
    height: 220px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.26);
    filter: blur(46px);
}

.category-panel-body {
    position: relative;
    z-index: 2;
    min-height: 320px;
    padding: 34px;
}

.category-panel h2 {
    margin: 0;
    font-size: 34px;
}

.category-panel p {
    max-width: 620px;
    color: #cbd5e1;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 26px;
}

.category-samples a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.5);
    color: #dbeafe;
    font-size: 13px;
    font-weight: 700;
}

.detail-hero {
    padding: 92px 0 56px;
}

.detail-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, #020617, transparent 44%);
}

.detail-hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 20%, rgba(56, 189, 248, 0.36), transparent 32%),
        linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.06;
}

.detail-one-line {
    max-width: 860px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #cbd5e1;
    font-weight: 700;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 50% 42%, rgba(56, 189, 248, 0.18), transparent 28%),
        #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.74)),
        radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.28), transparent 36%);
    color: white;
    font-size: 18px;
    font-weight: 900;
    pointer-events: auto;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue-strong), var(--cyan));
    box-shadow: 0 20px 46px rgba(37, 99, 235, 0.38);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    transform: translateX(8px) scale(0.56);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.detail-article,
.side-card {
    border-radius: 24px;
}

.detail-article {
    padding: 34px;
}

.detail-article p {
    margin: 14px 0 0;
    color: #cbd5e1;
    font-size: 17px;
}

.article-kicker {
    margin-top: 34px;
}

.detail-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.side-card {
    padding: 24px;
}

.side-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.side-card dl div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
}

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

.side-card dd {
    margin: 0;
    color: #e0f2fe;
    font-weight: 700;
}

.next-prev {
    display: grid;
    gap: 12px;
}

.next-prev a {
    color: #cbd5e1;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.75);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
}

.footer-inner p {
    max-width: 520px;
    margin: 8px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: #cbd5e1;
    font-weight: 700;
}

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

@media (max-width: 1120px) {
    .search-box {
        width: 240px;
    }

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

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

@media (max-width: 860px) {
    .header-inner {
        gap: 14px;
    }

    .site-nav,
    .search-box {
        display: none;
    }

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

    .hero-carousel {
        height: 620px;
    }

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

    .hero-summary,
    .detail-one-line {
        font-size: 17px;
    }

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

    .detail-hero-content {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 20px;
        align-items: center;
    }

    .detail-poster {
        border-radius: 18px;
    }

    .rank-card {
        grid-template-columns: 50px 86px minmax(0, 1fr);
        gap: 12px;
    }
}

@media (max-width: 580px) {
    .header-inner,
    .mobile-nav,
    .content-section,
    .page-hero-content,
    .detail-hero-content,
    .footer-inner {
        width: min(100% - 24px, 1280px);
    }

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

    .hero-carousel {
        height: 660px;
    }

    .hero-content h1,
    .detail-info h1,
    .page-hero h1 {
        letter-spacing: -0.04em;
    }

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

    .category-grid,
    .category-panel-grid,
    .movie-grid,
    .library-grid {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 44px 72px minmax(0, 1fr);
        padding: 12px;
    }

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

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

    .detail-hero {
        padding-top: 62px;
    }

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

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

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