* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #1e293b;
    --panel-deep: #030712;
    --text: #f8fafc;
    --muted: #94a3b8;
    --subtle: #64748b;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #06b6d4;
    --cyan-strong: #0891b2;
    --blue: #3b82f6;
    --red: #ef4444;
    --green: #22c55e;
    --yellow: #eab308;
    --radius: 22px;
    --shadow: 0 20px 55px rgba(2, 6, 23, 0.45);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

.brand {
    font-size: 26px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.28);
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.9);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #e2e8f0;
    transition: transform 0.2s ease;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-nav .nav-link {
    display: block;
    padding: 13px 0;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-position: center;
    background-size: cover;
    transform: scale(1.015);
    transition: opacity 0.7s ease, transform 0.9s ease, visibility 0.7s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.22));
}

.hero-content {
    position: relative;
    width: min(720px, calc(100% - 32px));
    margin-left: max(16px, calc((100vw - 1180px) / 2));
    padding: 112px 0 92px;
}

.eyebrow,
.type-chip,
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: rgba(6, 182, 212, 0.92);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.24);
}

.eyebrow {
    gap: 12px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    margin: 22px 0 20px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    color: white;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 36px rgba(6, 182, 212, 0.22);
    transition: transform 0.2s ease, filter 0.2s ease;
}

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

.btn.ghost {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: none;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--cyan);
}

.section {
    padding: 72px 0;
    background: var(--bg);
}

.section.alt {
    background: linear-gradient(180deg, #020617, #0f172a);
}

.section.soft {
    background: #0f172a;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: white;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    flex: 0 0 auto;
    color: #22d3ee;
    font-weight: 800;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 250px;
    gap: 24px;
    overflow-x: auto;
    padding: 3px 4px 18px;
    scrollbar-width: thin;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #1e293b;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 65px rgba(8, 145, 178, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease, opacity 0.3s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.play-chip {
    position: absolute;
    inset: 0;
    width: 58px;
    height: 58px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: rgba(6, 182, 212, 0.9);
    opacity: 0;
    transform: scale(0.86);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: scale(1);
}

.type-chip {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    font-weight: 900;
    background: rgba(239, 68, 68, 0.94);
}

.movie-info {
    padding: 16px;
}

.movie-info h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h2 a {
    color: white;
    transition: color 0.2s ease;
}

.movie-info h2 a:hover {
    color: #22d3ee;
}

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.movie-tags,
.detail-meta,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-meta span,
.movie-tags span,
.movie-tags a,
.detail-meta span,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.movie-tags {
    margin-top: 10px;
}

.movie-tags a {
    color: #22d3ee;
    background: rgba(8, 145, 178, 0.16);
}

.page-hero {
    padding: 78px 0 42px;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.18), transparent 36%), linear-gradient(180deg, #020617, #0f172a);
}

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

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

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

.category-card span {
    margin-top: 24px;
    color: #22d3ee;
    font-weight: 800;
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 14px;
    padding: 18px;
    margin-bottom: 28px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
}

.filter-bar label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    color: white;
    background: #020617;
    outline: 0;
    padding: 0 14px;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.empty-state {
    display: none;
    padding: 28px;
    margin-top: 20px;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

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

.ranking-list {
    display: grid;
    gap: 18px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 56px 94px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.88);
    box-shadow: var(--shadow);
}

.ranking-number {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, var(--red), #f97316);
}

.ranking-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

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

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

.ranking-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.detail-hero {
    padding: 36px 0 72px;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 32%), linear-gradient(180deg, #020617, #0f172a 52%, #020617);
}

.breadcrumb {
    margin: 0 0 28px;
}

.breadcrumb a {
    color: #22d3ee;
}

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

.player-panel,
.detail-side,
.content-panel {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
}

.player-panel {
    overflow: hidden;
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: black;
}

.video-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
}

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

.player-start span:first-child {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.92);
    font-size: 28px;
    box-shadow: 0 18px 55px rgba(6, 182, 212, 0.36);
}

.player-start span:last-child {
    font-weight: 900;
}

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

.detail-title {
    padding: 24px;
}

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

.detail-side {
    overflow: hidden;
}

.detail-cover {
    aspect-ratio: 3 / 4;
    background: #0f172a;
}

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

.side-info {
    padding: 20px;
}

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

.side-info dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    margin: 0;
    color: #cbd5e1;
}

.side-info dt {
    color: var(--subtle);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 28px;
}

.content-panel {
    padding: 28px;
}

.content-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.content-panel p {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.95;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.tag-cloud span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.96);
}

.site-footer {
    padding: 56px 0 22px;
    background: linear-gradient(180deg, #0f172a, #020617);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    margin-bottom: 14px;
    font-size: 24px;
}

.site-footer p {
    margin: 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: #22d3ee;
}

.footer-bottom {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

    .detail-side {
        max-width: 420px;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .mobile-nav.is-open {
        display: block;
    }

    .brand {
        font-size: 21px;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 92px;
        padding-bottom: 88px;
    }

    .hero-control {
        display: none;
    }

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

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

    .category-cards,
    .footer-grid,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 44px 74px 1fr;
    }

    .ranking-item .btn {
        grid-column: 1 / -1;
    }
}

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

    .section {
        padding: 52px 0;
    }

    .movie-info {
        padding: 13px;
    }

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

    .scroll-row {
        grid-auto-columns: 210px;
    }
}
