:root {
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --bg-panel: rgba(30, 41, 59, 0.72);
    --bg-card: #1e293b;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --blue: #2563eb;
    --blue-light: #38bdf8;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 28rem),
        linear-gradient(180deg, #0f172a 0%, #172554 45%, #0f172a 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.38);
    backdrop-filter: blur(16px);
}

.site-nav {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.55);
    font-size: 13px;
}

.logo-text,
.footer-logo span:last-child {
    font-size: 20px;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.nav-link:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #e2e8f0;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

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

.mobile-nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.06);
}

.page-main {
    position: relative;
    z-index: 1;
}

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

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

.hero-slides,
.hero-slide,
.hero-slide img,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 900ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

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

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.92) 0%, transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
}

.hero-content h1 {
    max-width: 720px;
    margin: 18px 0 12px;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--muted-strong);
    font-size: clamp(18px, 2vw, 24px);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(125, 211, 252, 0.38);
    border-radius: 999px;
    padding: 7px 12px;
    color: #bae6fd;
    background: rgba(37, 99, 235, 0.72);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
    font-size: 13px;
    font-weight: 700;
}

.hero-meta,
.rank-meta,
.latest-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    color: var(--muted);
    font-size: 13px;
}

.hero-meta span:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 16px;
    margin-left: 14px;
    vertical-align: middle;
    background: rgba(148, 163, 184, 0.5);
}

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

.primary-button,
.ghost-button,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search button {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.38);
}

.ghost-button {
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.home-search button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-control {
    position: absolute;
    z-index: 6;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(2, 6, 23, 0.56);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 38px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.search-entrance,
.content-section,
.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-entrance {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 460px);
    align-items: center;
    gap: 28px;
    margin-top: -52px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-entrance h2,
.section-heading h2,
.page-hero h1,
.copy-card h2,
.detail-intro h1 {
    margin: 10px 0;
    line-height: 1.15;
}

.search-entrance p,
.page-hero p,
.category-card p,
.copy-card p,
.detail-intro p,
.rank-info p,
.latest-info p,
.card-desc {
    color: var(--muted-strong);
}

.home-search {
    display: flex;
    gap: 12px;
}

.home-search input,
.filter-search input,
.filter-selects select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    outline: none;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.82);
    padding: 0 14px;
}

.content-section {
    padding: 72px 0 0;
}

.panel-section {
    margin-top: 72px;
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(30, 41, 59, 0.56);
    box-shadow: var(--shadow);
}

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

.section-heading h2,
.section-heading h3 {
    font-size: clamp(26px, 3vw, 36px);
}

.section-heading a,
.text-link {
    color: #7dd3fc;
    font-weight: 700;
}

.compact-heading h3 {
    margin: 8px 0 0;
    font-size: 24px;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

.popular-grid,
.catalog-grid,
.small-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.88);
    box-shadow: 0 18px 52px rgba(2, 6, 23, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(56, 189, 248, 0.46);
    box-shadow: 0 24px 68px rgba(37, 99, 235, 0.18);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #020617;
}

.movie-card-large .card-cover {
    aspect-ratio: 21 / 9;
}

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

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 58%);
}

.badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.86);
    backdrop-filter: blur(10px);
}

.badge-year {
    left: 12px;
}

.badge-type {
    right: 12px;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 800;
    font-size: 18px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: #7dd3fc;
}

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

.card-desc-large {
    min-height: 48px;
    font-size: 14px;
}

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

.tag-row span {
    border-radius: 999px;
    padding: 3px 8px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
}

.category-section-stack {
    display: grid;
    gap: 48px;
}

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

.latest-item,
.ranking-row,
.copy-card,
.filter-panel,
.category-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-panel);
    box-shadow: 0 18px 52px rgba(2, 6, 23, 0.18);
}

.latest-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 14px;
}

.latest-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #020617;
}

.latest-cover img,
.rank-cover img,
.category-cover-group img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-title,
.rank-title {
    display: block;
    color: #ffffff;
    font-weight: 800;
    font-size: 18px;
}

.small-hero {
    margin-top: 44px;
    padding: 50px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(15, 23, 42, 0.72)),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.small-hero h1 {
    max-width: 860px;
    font-size: clamp(34px, 5vw, 58px);
}

.small-hero p {
    max-width: 820px;
    font-size: 18px;
}

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

.category-card {
    overflow: hidden;
}

.category-cover-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 150px;
    background: #020617;
}

.category-card-body {
    padding: 22px;
}

.category-card-body h2 {
    margin: 12px 0 8px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    margin-bottom: 28px;
}

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

.filter-count {
    margin: 0;
    color: var(--muted-strong);
    font-weight: 700;
    white-space: nowrap;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 64px 128px minmax(0, 1fr) 110px;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.ranking-row.top-three {
    border-color: rgba(56, 189, 248, 0.55);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(30, 41, 59, 0.72));
}

.rank-number {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #020617;
}

.rank-info p {
    display: -webkit-box;
    margin: 6px 0 8px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 14px;
}

.rank-heat {
    text-align: center;
}

.rank-heat span {
    display: block;
    color: #67e8f9;
    font-size: 28px;
    font-weight: 900;
}

.rank-heat em {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.detail-page {
    width: 100%;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(120%);
    opacity: 0.42;
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 42px;
    align-items: center;
    padding: 50px 0;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

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

.breadcrumb a {
    color: #7dd3fc;
}

.detail-intro h1 {
    font-size: clamp(38px, 6vw, 68px);
}

.detail-intro p {
    max-width: 820px;
    font-size: 18px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 780px;
    margin: 24px 0;
}

.detail-meta-grid span {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.52);
}

.detail-meta-grid b {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.player-section {
    width: min(1180px, calc(100% - 32px));
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 26px;
    background: #000000;
    box-shadow: var(--shadow);
}

.main-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.big-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(34, 211, 238, 0.92));
    box-shadow: 0 22px 58px rgba(37, 99, 235, 0.46);
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.big-play-button span {
    display: inline-block;
    margin-left: 5px;
    font-size: 34px;
}

.big-play-button.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.player-status {
    position: absolute;
    left: 20px;
    bottom: 18px;
    border-radius: 999px;
    padding: 8px 12px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
    backdrop-filter: blur(12px);
}

.detail-copy {
    width: min(1180px, calc(100% - 32px));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.copy-card {
    padding: 26px;
}

.copy-card h2 {
    margin-top: 0;
}

.copy-card p {
    margin-bottom: 0;
    white-space: pre-line;
}

.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 80px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.98));
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding: 44px 0;
}

.footer-brand p {
    max-width: 520px;
    color: var(--muted-strong);
}

.footer-col {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-col h3 {
    margin: 0 0 8px;
}

.footer-col a {
    color: var(--muted-strong);
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 20px 0 28px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

[hidden],
.is-filtered-out {
    display: none !important;
}

@media (max-width: 1024px) {
    .featured-grid,
    .popular-grid,
    .catalog-grid,
    .small-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .detail-poster {
        width: min(320px, 100%);
    }

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

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

    .menu-button {
        display: block;
    }

    .hero-section {
        min-height: 560px;
        height: 76vh;
    }

    .hero-content {
        padding: 80px 0 60px;
    }

    .hero-control {
        display: none;
    }

    .search-entrance,
    .panel-section,
    .small-hero {
        padding: 22px;
        border-radius: 24px;
    }

    .home-search,
    .section-heading,
    .filter-selects {
        flex-direction: column;
        align-items: stretch;
    }

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

    .featured-grid,
    .popular-grid,
    .catalog-grid,
    .small-grid,
    .latest-grid,
    .category-overview-grid,
    .detail-copy {
        grid-template-columns: 1fr;
    }

    .latest-item,
    .ranking-row {
        grid-template-columns: 86px 1fr;
    }

    .rank-number,
    .rank-heat {
        grid-column: span 2;
    }

    .rank-heat {
        text-align: left;
    }

    .rank-cover,
    .latest-cover {
        width: 86px;
        height: 86px;
    }

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

    .detail-hero-inner {
        min-height: auto;
        padding-top: 34px;
    }

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

    .big-play-button {
        width: 72px;
        height: 72px;
    }
}
