:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #22d3ee;
    --accent-strong: #06b6d4;
    --violet: #8b5cf6;
    --rose: #f43f5e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.is-menu-open {
    overflow: hidden;
}

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--violet));
    color: #020617;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.logo-text {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.13);
}

.header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 16px;
    color: #020617;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--line);
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
}

.hero-stage,
.hero-slide {
    min-height: 78vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.35), #020617 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1180px;
    padding: 92px 0 156px;
}

.hero-kicker,
.detail-kicker,
.section-heading span,
.ranking-head span,
.story-card span,
.page-hero span,
.category-showcase-head span {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.18);
    font-size: 13px;
    font-weight: 900;
}

.hero h1 {
    max-width: 760px;
    margin-top: 18px;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 0.96;
    font-weight: 950;
    letter-spacing: -0.08em;
}

.hero p {
    max-width: 700px;
    margin-top: 24px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 12px;
}

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

.primary-button,
.ghost-button,
.home-search button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search button {
    color: #020617;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.23);
}

.ghost-button,
.section-more {
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

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

.hero-rail {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
}

.hero-dot {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-align: left;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
}

.hero-dot img {
    width: 54px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-dot span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 850;
}

.hero-dot.is-active {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.6);
    background: rgba(34, 211, 238, 0.14);
}

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

.search-band {
    margin-top: -46px;
    position: relative;
    z-index: 8;
}

.home-search,
.filter-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.home-search label,
.filter-search label {
    display: block;
    margin-bottom: 10px;
    color: #e2e8f0;
    font-weight: 900;
}

.home-search div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    color: #f8fafc;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.78);
    padding: 0 16px;
    outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.content-section,
.category-showcase,
.player-section {
    margin-top: 64px;
}

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

.section-heading h2,
.ranking-head h2,
.category-showcase-head h2,
.story-card h2,
.page-hero h1,
.detail-info h1 {
    margin-top: 10px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading h2,
.ranking-head h2,
.category-showcase-head h2 {
    font-size: clamp(28px, 4vw, 44px);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.46);
    background: rgba(15, 23, 42, 0.94);
}

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

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #020617;
    font-weight: 950;
    background: linear-gradient(135deg, #facc15, var(--accent));
}

.movie-body {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-body h2 {
    margin-top: 9px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-body h2 a:hover,
.text-link:hover,
.footer-links a:hover {
    color: var(--accent);
}

.movie-body p {
    min-height: 46px;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.7;
}

.text-link {
    display: inline-flex;
    margin-top: 14px;
    color: #67e8f9;
    font-weight: 900;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: rgba(15, 23, 42, 0.78);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 22px;
    font-weight: 950;
}

.category-tile p {
    margin-top: 8px;
    color: #cbd5e1;
    line-height: 1.65;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.48;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 96px;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 18px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.compact-item {
    display: grid;
    grid-template-columns: 30px 56px 1fr;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.compact-item img {
    width: 56px;
    height: 74px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-rank {
    color: var(--accent);
    font-weight: 950;
}

.compact-item strong,
.compact-item em {
    display: block;
}

.compact-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.compact-item em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-wrap,
.detail-wrap {
    padding-top: 38px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 32px;
    padding: clamp(28px, 5vw, 56px);
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.88));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 780px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.04;
}

.page-hero p {
    max-width: 760px;
    margin-top: 16px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1.4fr;
    gap: 16px;
    margin-top: 28px;
}

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

.empty-state {
    display: none;
    margin-top: 28px;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
}

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

.category-showcase {
    padding: 26px;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.54);
    border: 1px solid rgba(148, 163, 184, 0.13);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 30px;
    border-radius: 34px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.18), transparent 22rem),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

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

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

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

.detail-info h1 {
    margin-top: 14px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
}

.detail-lead {
    margin-top: 18px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.detail-meta-grid div {
    border-radius: 18px;
    padding: 14px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.13);
}

.detail-meta-grid strong,
.detail-meta-grid span {
    display: block;
}

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

.detail-meta-grid span {
    margin-top: 5px;
    font-weight: 900;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: #000;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.76));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
    width: 74px;
    height: 74px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #020617;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.32);
    font-size: 26px;
    padding-left: 4px;
}

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

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

.story-card {
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    padding: 26px;
    background: rgba(15, 23, 42, 0.72);
}

.story-card h2 {
    font-size: 28px;
}

.story-card p {
    margin-top: 16px;
    color: #cbd5e1;
    line-height: 1.9;
}

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

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

.footer-logo {
    font-size: 22px;
}

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

.site-footer h2 {
    font-size: 16px;
    font-weight: 950;
}

.footer-links {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    color: #cbd5e1;
}

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

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

    .split-section,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }

    .detail-poster {
        max-width: 360px;
    }
}

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

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

    .hero,
    .hero-stage,
    .hero-slide,
    .hero-content {
        min-height: 760px;
    }

    .hero-content {
        padding: 78px 0 250px;
    }

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

    .hero-dot {
        grid-template-columns: 44px 1fr;
    }

    .hero-dot img {
        width: 44px;
        height: 54px;
    }

    .home-search div,
    .filter-panel,
    .filter-selects,
    .detail-content,
    .detail-meta-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .section-heading,
    .category-showcase-head {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .header-inner,
    main,
    .page-wrap,
    .detail-wrap,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 20px, 1180px);
    }

    .logo-text {
        font-size: 17px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p,
    .detail-lead {
        font-size: 16px;
    }

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

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .hero-rail,
    .movie-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero,
    .page-hero,
    .story-card,
    .category-showcase {
        padding: 20px;
        border-radius: 24px;
    }

    .player-shell {
        border-radius: 20px;
    }
}
