* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --border: rgba(148, 163, 184, 0.18);
    --border-hot: rgba(34, 211, 238, 0.45);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --purple: #a78bfa;
    --rose: #fb7185;
    --yellow: #facc15;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.16), transparent 32%),
        radial-gradient(circle at 82% 16%, rgba(96, 165, 250, 0.13), transparent 30%),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(103, 232, 249, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(103, 232, 249, 0.12) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 72%);
    z-index: -1;
}

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

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

button, input, select {
    font: inherit;
}

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

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

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

.desktop-nav,
.mobile-nav {
    align-items: center;
    gap: 8px;
}

.desktop-nav {
    display: flex;
}

.nav-link {
    padding: 10px 14px;
    color: var(--soft);
    border-radius: 12px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    padding: 0 24px 16px;
}

.mobile-nav.open {
    display: grid;
}

.main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.hero {
    position: relative;
    min-height: 680px;
    margin: 24px auto 56px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.5);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.72fr);
    align-items: center;
    gap: 36px;
    padding: 72px;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.4)),
        radial-gradient(circle at 18% 26%, rgba(34, 211, 238, 0.2), transparent 36%);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.08);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    color: var(--cyan);
    font-weight: 700;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    max-width: 760px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    font-weight: 900;
    background: linear-gradient(90deg, var(--cyan), var(--blue), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 35px rgba(34, 211, 238, 0.24);
}

.btn-ghost {
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.12);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 560px;
    margin-top: 34px;
}

.stat-card {
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(14px);
}

.stat-card strong {
    display: block;
    color: var(--cyan);
    font-size: 26px;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
}

.hero-poster {
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    transform: rotate(2deg);
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.55);
}

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

.hero-dots {
    position: absolute;
    left: 72px;
    bottom: 36px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

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

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

.section {
    margin-bottom: 64px;
}

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

.eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 900;
}

.section-desc {
    margin: 10px 0 0;
    max-width: 680px;
    color: var(--muted);
    line-height: 1.8;
}

.feature-card {
    display: grid;
    grid-template-columns: 0.86fr 1fr;
    gap: 28px;
    padding: 22px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.66));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.feature-media {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.feature-media img {
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.feature-card:hover .feature-media img {
    transform: scale(1.05);
}

.feature-content {
    padding: 18px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-content h2,
.feature-content h3 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 900;
}

.feature-content p {
    margin: 0 0 22px;
    color: var(--soft);
    line-height: 1.9;
}

.pills,
.card-tags,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill,
.card-tags span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: var(--soft);
    font-size: 13px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
}

.filter-panel {
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(18px);
    margin-bottom: 26px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    color: var(--text);
    outline: none;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.72);
}

.search-input:focus {
    border-color: rgba(34, 211, 238, 0.6);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    min-height: 40px;
    padding: 8px 13px;
    color: var(--soft);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 13px;
    background: rgba(30, 41, 59, 0.66);
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.filter-button.active,
.filter-button:hover {
    color: #fff;
    border-color: rgba(34, 211, 238, 0.4);
    background: rgba(34, 211, 238, 0.15);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.card-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.8);
}

.card-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

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

.card-score {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    color: #001018;
    font-size: 13px;
    font-weight: 900;
    border-radius: 999px;
    background: var(--yellow);
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    color: #001018;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
}

.card-body p {
    min-height: 45px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    transition: transform 0.45s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.92));
}

.category-card-content {
    position: relative;
    z-index: 1;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 14px;
    color: var(--soft);
    line-height: 1.7;
}

.rank-panel {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 44px 56px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.56);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-row:hover {
    transform: translateX(5px);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(34, 211, 238, 0.1);
}

.rank-num {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 56px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info strong {
    color: #fff;
    margin-bottom: 4px;
}

.rank-info em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.rank-score {
    color: var(--yellow);
    font-weight: 900;
    text-align: right;
}

.page-hero {
    padding: 72px 0 36px;
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

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

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

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

.player-card,
.detail-card,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

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

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.42);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    display: inline-flex;
    width: 82px;
    height: 82px;
    align-items: center;
    justify-content: center;
    color: #001018;
    font-size: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.28);
}

.play-overlay strong {
    font-size: 18px;
}

.player-title {
    padding: 20px 22px;
}

.player-title h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
    font-weight: 900;
}

.detail-card {
    padding: 28px;
    margin-top: 26px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 18px;
    color: var(--soft);
    line-height: 2;
}

.side-card {
    padding: 18px;
}

.side-cover {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    margin-bottom: 18px;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-link {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.46);
    transition: background 0.25s ease, transform 0.25s ease;
}

.side-link:hover {
    background: rgba(34, 211, 238, 0.12);
    transform: translateX(4px);
}

.side-link img {
    width: 58px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
}

.side-link strong,
.side-link span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.side-link strong {
    color: #fff;
    margin-bottom: 4px;
}

.side-link span {
    color: var(--muted);
    font-size: 13px;
}

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

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px;
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    align-items: center;
    gap: 24px;
    color: var(--muted);
}

.footer-logo {
    color: var(--text);
}

.footer-inner p {
    margin: 0;
    line-height: 1.7;
}

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

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

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

@media (max-width: 1100px) {
    .hero-slide {
        grid-template-columns: 1fr;
        padding: 56px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .mobile-toggle {
        display: flex;
    }

    .header-inner,
    .main,
    .footer-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero {
        min-height: 720px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 38px 24px 86px;
    }

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

    .hero-dots {
        left: 24px;
        bottom: 28px;
    }

    .feature-card,
    .filter-row,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 560px) {
    .logo {
        font-size: 17px;
    }

    .hero h1,
    .hero h2 {
        font-size: 40px;
    }

    .movie-grid,
    .movie-grid.dense,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 34px 50px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }
}
