:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --card: rgba(15, 23, 42, 0.78);
    --card-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --purple: #8b5cf6;
    --rose: #fb7185;
    --amber: #f59e0b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(2, 6, 23, 0.9);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #dff6ff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(34, 211, 238, 0.85));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
    font-size: 15px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

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

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

main {
    padding-top: 76px;
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(139, 92, 246, 0.18));
}

.hero-slide img.image-missing,
.poster img.image-missing,
.detail-poster img.image-missing,
.detail-backdrop img.image-missing {
    opacity: 0;
}

.hero-slide::before,
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slide::before {
    background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.92) 30%, rgba(2, 6, 23, 0.42) 68%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-slide::after {
    background: radial-gradient(circle at 72% 45%, rgba(34, 211, 238, 0.22), transparent 28rem);
}

.hero-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    width: min(680px, 100%);
    padding-top: 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.16);
    font-size: 13px;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero p {
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.7;
}

.hero-meta,
.movie-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: var(--muted);
}

.hero-meta span,
.movie-meta span,
.detail-meta span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(148, 163, 184, 0.12);
    color: #dbeafe;
    font-size: 13px;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.28);
    transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.button.secondary {
    background: rgba(15, 23, 42, 0.75);
    box-shadow: none;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: 72px 0;
}

.section.compact-section {
    padding: 46px 0;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: #60a5fa;
    font-size: 14px;
    font-weight: 700;
}

.section h2,
.page-title h1,
.detail-content h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-desc,
.page-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.38);
    background: var(--card-strong);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 15%, rgba(59, 130, 246, 0.35), transparent 12rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
}

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

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

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 700;
}

.play-icon {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.32);
}

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

.movie-card h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.35;
    min-height: 42px;
}

.movie-card h3 a:hover {
    color: #93c5fd;
}

.movie-meta {
    gap: 6px;
    margin-bottom: 10px;
}

.movie-meta span {
    padding: 3px 8px;
    font-size: 12px;
    color: #cbd5e1;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    border-radius: 999px;
    padding: 4px 8px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.12);
    font-size: 12px;
}

.filter-panel {
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: var(--shadow);
}

.filter-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 12px;
}

.filter-search input,
.filter-selects select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    outline: none;
    color: #e2e8f0;
    background: rgba(2, 6, 23, 0.75);
}

.filter-search input {
    min-height: 48px;
    padding: 0 16px;
}

.filter-search button {
    border: 0;
    border-radius: 14px;
    padding: 0 18px;
    color: #ffffff;
    background: rgba(59, 130, 246, 0.78);
    cursor: pointer;
}

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

.filter-selects select {
    min-height: 44px;
    padding: 0 12px;
}

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

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

.page-hero {
    padding: 78px 0 42px;
    background:
        radial-gradient(circle at 24% 10%, rgba(59, 130, 246, 0.28), transparent 22rem),
        linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(15, 23, 42, 0));
}

.page-title {
    width: min(780px, 100%);
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background:
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.18), transparent 10rem),
        linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.7));
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.4);
}

.category-tile strong {
    display: block;
    margin-bottom: 12px;
    font-size: 21px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-tile span {
    position: absolute;
    left: 22px;
    bottom: 20px;
    color: #93c5fd;
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 76px 92px 1fr auto;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(96, 165, 250, 0.36);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(139, 92, 246, 0.82));
    font-size: 20px;
    font-weight: 800;
}

.rank-thumb {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.75);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.rank-info p {
    display: -webkit-box;
    margin: 10px 0 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--muted);
    line-height: 1.65;
}

.rank-score {
    min-width: 98px;
    text-align: right;
    color: #fbbf24;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    padding: 70px 0 54px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(139, 92, 246, 0.18));
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    filter: blur(2px);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 48%, rgba(2, 6, 23, 0.72) 100%);
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.85);
    box-shadow: var(--shadow);
}

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

.detail-text h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.75;
}

.player-section {
    padding: 58px 0 18px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.24), transparent 15rem),
        rgba(2, 6, 23, 0.28);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button-core {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    border-radius: 999px;
    padding: 18px 26px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 50px rgba(37, 99, 235, 0.38);
    font-size: 18px;
    font-weight: 800;
}

.player-status {
    padding: 12px 16px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.95);
    font-size: 13px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding: 42px 0 76px;
}

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

.content-card + .content-card {
    margin-top: 22px;
}

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

.related-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.related-link {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    border-radius: 14px;
    padding: 8px;
    background: rgba(2, 6, 23, 0.38);
    transition: background 0.2s ease;
}

.related-link:hover {
    background: rgba(59, 130, 246, 0.14);
}

.related-link img {
    width: 58px;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.8);
}

.related-link strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.35;
}

.related-link span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

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

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

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

.footer-links a {
    color: var(--muted);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 18px;
    color: #64748b;
    text-align: center;
}

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

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

@media (max-width: 820px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 76px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.95);
        box-shadow: var(--shadow);
    }

    .site-header.is-open .nav-menu {
        display: flex;
    }

    .nav-link {
        padding: 15px 18px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    }

    .hero {
        height: 68vh;
        min-height: 520px;
    }

    .section-head {
        display: block;
    }

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

    .filter-selects {
        grid-template-columns: 1fr 1fr;
    }

    .rank-item {
        grid-template-columns: 54px 70px 1fr;
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
    }

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

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

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 20px;
    }

    .hero {
        min-height: 600px;
    }

    .hero-actions,
    .detail-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .filter-search,
    .filter-selects {
        grid-template-columns: 1fr;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

    .rank-item {
        grid-template-columns: 44px 62px 1fr;
        gap: 10px;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 16px;
    }

    .rank-info h2 {
        font-size: 16px;
    }

    .rank-info p {
        display: none;
    }

    .content-card,
    .related-card {
        padding: 20px;
    }
}
