:root {
    --deep-space-950: #020617;
    --deep-space-900: #0f172a;
    --deep-space-850: #14203a;
    --deep-space-800: #1e293b;
    --deep-space-700: #334155;
    --cloud-realm-500: #0ea5e9;
    --cloud-realm-600: #0284c7;
    --cloud-realm-300: #7dd3fc;
    --cyber-blue-600: #2563eb;
    --text-strong: #f8fafc;
    --text-main: #cbd5e1;
    --text-muted: #94a3b8;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #0f172a;
    --line: rgba(14, 165, 233, 0.26);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-main);
    background:
        radial-gradient(circle at 10% 10%, rgba(14, 165, 233, 0.17), transparent 28rem),
        radial-gradient(circle at 88% 0%, rgba(37, 99, 235, 0.15), transparent 32rem),
        var(--deep-space-950);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--cloud-realm-500), var(--cyber-blue-600));
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.25);
}

.brand-text {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cloud-realm-300), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    padding: 10px 13px;
    border-radius: 12px;
    color: #d1d5db;
    font-size: 0.94rem;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cloud-realm-300);
    background: rgba(30, 41, 59, 0.86);
    transform: translateY(-1px);
}

.header-search {
    width: 260px;
    display: flex;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.38);
    overflow: hidden;
}

.header-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text-strong);
    background: transparent;
    padding: 10px 12px;
}

.header-search button,
.hero-actions a,
.button-link,
.filter-panel button,
.player-overlay-button {
    border: 0;
    color: white;
    background: linear-gradient(135deg, var(--cloud-realm-600), var(--cyber-blue-600));
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-search button {
    padding: 0 14px;
}

.header-search button:hover,
.hero-actions a:hover,
.button-link:hover,
.player-overlay-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.24);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text-strong);
    background: rgba(30, 41, 59, 0.78);
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--deep-space-950);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08)),
        linear-gradient(0deg, var(--deep-space-950), rgba(2, 6, 23, 0.12) 46%, rgba(2, 6, 23, 0.4));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: flex;
    align-items: center;
    padding: 70px 0;
}

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

.hero-badge,
.section-kicker,
.category-chip,
.duration-chip,
.detail-chip,
.tag-pill,
.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
}

.hero-badge {
    padding: 7px 13px;
    color: white;
    background: rgba(37, 99, 235, 0.82);
    backdrop-filter: blur(10px);
    font-size: 0.88rem;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 18px 0 18px;
    color: white;
    font-size: clamp(2.35rem, 6vw, 5.15rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0;
    max-width: 58ch;
    color: #d1d5db;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.8;
}

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

.hero-actions a,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 750;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 180ms ease, background 180ms ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--cloud-realm-500);
}

.section {
    padding: 70px 0;
}

.section.alt {
    background: rgba(15, 23, 42, 0.76);
    border-block: 1px solid rgba(14, 165, 233, 0.15);
}

.section.gradient {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.52), rgba(2, 6, 23, 0.96));
}

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

.section-title h1,
.section-title h2,
.page-title h1 {
    margin: 0;
    color: white;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.16;
}

.section-title p,
.page-title p {
    max-width: 820px;
    margin: 12px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.section-kicker {
    color: var(--cloud-realm-300);
    font-weight: 800;
    margin-bottom: 8px;
}

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

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

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

.movie-card {
    min-width: 0;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: var(--deep-space-800);
    box-shadow: var(--shadow);
}

.movie-card-large .poster-wrap {
    border-radius: 22px;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease, filter 300ms ease;
}

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

.play-chip {
    position: absolute;
    inset: 0;
    width: 54px;
    height: 54px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: rgba(14, 165, 233, 0.88);
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 220ms ease, transform 220ms ease;
}

.poster-wrap:hover img {
    transform: scale(1.06);
    filter: saturate(1.15);
}

.poster-wrap:hover .play-chip {
    opacity: 1;
    transform: scale(1);
}

.duration-chip,
.category-chip {
    position: absolute;
    padding: 4px 8px;
    color: white;
    font-size: 0.72rem;
    font-weight: 750;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.duration-chip {
    right: 10px;
    bottom: 10px;
}

.category-chip {
    left: 10px;
    top: 10px;
    background: rgba(37, 99, 235, 0.84);
}

.rank-badge {
    position: absolute;
    z-index: 3;
    left: 10px;
    bottom: 10px;
    min-width: 34px;
    height: 34px;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 900;
}

.movie-card-body {
    padding-top: 13px;
}

.movie-card h3 {
    margin: 0;
    color: #e5e7eb;
    font-size: 0.98rem;
    line-height: 1.42;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-large h3 {
    font-size: 1.18rem;
}

.movie-card h3 a:hover {
    color: var(--cloud-realm-300);
}

.movie-card p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.movie-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: #64748b;
    font-size: 0.78rem;
}

.movie-stats span:first-child {
    color: #fbbf24;
}

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

.category-card {
    min-height: 210px;
    padding: 24px;
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.18), transparent 11rem),
        rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    transition: transform 180ms ease, border-color 180ms ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.58);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: white;
    font-size: 1.35rem;
}

.category-card p {
    margin: 0 0 16px;
    color: var(--text-muted);
    line-height: 1.75;
}

.category-card span {
    color: var(--cloud-realm-300);
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 150px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(14, 165, 233, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    transition: background 180ms ease, transform 180ms ease;
}

.rank-item:hover {
    background: rgba(30, 41, 59, 0.72);
    transform: translateY(-2px);
}

.rank-number {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-size: 1.2rem;
    font-weight: 900;
}

.rank-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: var(--deep-space-800);
}

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

.rank-copy h3 {
    margin: 0;
    color: white;
    font-size: 1rem;
}

.rank-copy p {
    margin: 8px 0 0;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    padding: 62px 0 32px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0)),
        radial-gradient(circle at 72% 4%, rgba(14, 165, 233, 0.22), transparent 22rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: var(--cloud-realm-300);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) 2fr;
    gap: 18px;
    align-items: end;
    margin: 24px 0 30px;
    padding: 20px;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(14, 165, 233, 0.26);
    border-radius: 12px;
    color: var(--text-strong);
    background: rgba(2, 6, 23, 0.46);
    padding: 0 12px;
    outline: 0;
}

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

.empty-state {
    padding: 26px;
    border: 1px dashed rgba(14, 165, 233, 0.35);
    border-radius: 18px;
    color: var(--text-muted);
    text-align: center;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: var(--deep-space-950);
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.34;
}

.detail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) saturate(1.1);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.64), var(--deep-space-950));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 36px;
    padding: 54px 0;
}

.detail-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 26px;
    background: var(--deep-space-800);
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    color: white;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
}

.detail-copy .lead {
    max-width: 78ch;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: 1.08rem;
    line-height: 1.85;
}

.detail-chips,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-chip,
.tag-pill {
    padding: 7px 11px;
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(14, 165, 233, 0.25);
    font-size: 0.88rem;
}

.player-section {
    padding: 46px 0 70px;
}

.player-shell {
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.movie-player video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.28), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    z-index: 4;
}

.player-overlay[hidden] {
    display: none;
}

.player-overlay-content {
    display: grid;
    gap: 16px;
    place-items: center;
    text-align: center;
}

.player-overlay-button {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 2rem;
}

.player-overlay-title {
    max-width: 70ch;
    color: #f8fafc;
    font-size: 1.08rem;
    font-weight: 800;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
}

.content-card,
.side-card {
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.content-card {
    padding: 30px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 18px;
    color: white;
    font-size: 1.45rem;
}

.content-card p {
    margin: 0 0 18px;
    color: var(--text-main);
    line-height: 1.95;
}

.side-card {
    padding: 22px;
    align-self: start;
    position: sticky;
    top: 98px;
}

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

.side-list a {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-list img {
    width: 92px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    background: var(--deep-space-800);
}

.side-list h3 {
    margin: 0;
    color: #e5e7eb;
    font-size: 0.92rem;
    line-height: 1.45;
}

.side-list span {
    display: inline-flex;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.78rem;
}

.site-footer {
    border-top: 1px solid rgba(14, 165, 233, 0.18);
    background: rgba(2, 6, 23, 0.9);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p {
    max-width: 58ch;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 1rem;
}

.footer-links {
    display: grid;
    gap: 9px;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--cloud-realm-300);
}

.footer-bottom {
    padding: 20px 0 28px;
    border-top: 1px solid rgba(14, 165, 233, 0.12);
    color: #64748b;
    font-size: 0.88rem;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

    .rank-list,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .side-card {
        position: static;
    }
}

@media (max-width: 900px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border-bottom: 1px solid rgba(14, 165, 233, 0.18);
        background: rgba(15, 23, 42, 0.98);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        width: 100%;
    }

    .hero-slider,
    .hero-content {
        min-height: 68vh;
    }

    .filter-panel,
    .detail-hero-inner,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .header-inner {
        min-height: 66px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .brand-text {
        font-size: 1.02rem;
    }

    .nav-menu {
        top: 66px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 86px;
    }

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

    .section {
        padding: 48px 0;
    }

    .section-head {
        display: grid;
    }

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

    .movie-card p,
    .movie-stats {
        display: none;
    }

    .rank-item {
        grid-template-columns: 38px 108px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 1rem;
    }

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

    .detail-hero-inner {
        padding: 36px 0;
    }

    .content-card {
        padding: 22px;
    }
}
