:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-strong: #030712;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --primary: #10b981;
    --primary-light: #34d399;
    --primary-dark: #047857;
    --accent: #22d3ee;
    --danger: #fb7185;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 18% 8%, rgba(16, 185, 129, 0.18), transparent 30%),
        radial-gradient(circle at 86% 6%, rgba(34, 211, 238, 0.12), transparent 28%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

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

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

.nav-wrap {
    max-width: 1440px;
    margin: 0 auto;
    height: 72px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--primary-light);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #001510;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--soft);
    font-size: 14px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--primary-light);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    color: var(--soft);
}

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

.hero {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    display: none;
    position: relative;
    min-height: 76vh;
    align-items: center;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.45fr);
    gap: 48px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 96px 28px 82px;
}

.hero-slide.active {
    display: grid;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.28;
    filter: blur(6px) saturate(1.15);
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 50%, rgba(2, 6, 23, 0.9)),
        radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.24), transparent 40%);
}

.hero-content {
    max-width: 820px;
}

.hero-kicker,
.section-kicker {
    color: var(--primary-light);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 18px 0;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p {
    margin: 0;
    max-width: 760px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.9;
}

.hero-tags,
.detail-tags,
.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.detail-meta span,
.movie-meta span {
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #001510;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    box-shadow: 0 18px 45px rgba(16, 185, 129, 0.28);
}

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

.btn.soft {
    color: var(--primary-light);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.26);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.14);
    aspect-ratio: 3 / 4;
    align-self: center;
}

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

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 16px;
    border-radius: 999px;
    text-align: center;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.76);
    backdrop-filter: blur(12px);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dots button.active {
    width: 36px;
    background: var(--primary-light);
}

.search-panel,
.section-block,
.page-main,
.site-footer {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
}

.search-panel {
    margin-top: 34px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 24px;
    padding-top: 28px;
    padding-bottom: 28px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.story-block h2,
.side-rank h2 {
    margin: 8px 0 0;
}

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

.search-box input,
.local-filter input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    outline: none;
}

.search-box button {
    min-width: 96px;
    border: 0;
    border-radius: 999px;
    color: #001510;
    font-weight: 800;
    background: var(--primary-light);
    cursor: pointer;
}

.global-search-results {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.global-search-results.open {
    display: grid;
}

.search-result-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.72);
}

.search-result-card strong {
    display: block;
    margin-bottom: 6px;
}

.search-result-card small {
    color: var(--muted);
}

.section-block {
    padding-top: 54px;
    padding-bottom: 18px;
}

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

.section-head h2 {
    font-size: clamp(26px, 3vw, 42px);
    letter-spacing: -0.04em;
}

.section-head a {
    color: var(--primary-light);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.48);
    background: rgba(17, 24, 39, 0.95);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

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

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

.movie-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #001510;
    font-size: 12px;
    font-weight: 800;
    background: rgba(52, 211, 153, 0.94);
}

.movie-card-body {
    padding: 15px;
}

.movie-card h3 {
    margin: 0 0 10px;
    min-height: 44px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card p {
    margin: 12px 0 0;
    min-height: 64px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.movie-meta {
    gap: 6px;
}

.movie-meta span {
    padding: 4px 7px;
    font-size: 11px;
}

.split-block {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
}

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

.rank-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 50px;
}

.rank-item {
    display: grid;
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.rank-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #001510;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
}

.rank-item img {
    width: 72px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

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

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

.rank-text small {
    margin-top: 8px;
    color: var(--muted);
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
}

.category-tile span,
.category-tile small {
    position: relative;
    display: block;
    padding: 18px 18px 0;
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    color: var(--soft);
    line-height: 1.7;
}

.page-main {
    padding-top: 42px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 50px;
    margin-bottom: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.18), transparent 32%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.92));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 780px;
    color: var(--soft);
    font-size: 17px;
    line-height: 1.9;
}

.local-filter {
    margin-top: 24px;
    max-width: 560px;
}

.category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: 50px;
}

.category-overview-card {
    min-height: 0;
    padding: 18px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.48);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.category-thumbs img {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 0 0 10px;
}

.category-overview-card p {
    min-height: 72px;
    color: var(--muted);
    line-height: 1.7;
}

.category-overview-card span {
    color: var(--primary-light);
    font-weight: 800;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-bottom: 24px;
}

.breadcrumbs a {
    color: var(--primary-light);
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-poster {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-info h1 {
    font-size: clamp(36px, 5vw, 64px);
    letter-spacing: -0.06em;
}

.detail-one-line {
    color: var(--soft);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta,
.detail-tags {
    margin: 22px 0;
}

.player-section {
    padding: 34px 0;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--text);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.78));
    cursor: pointer;
}

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

.play-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #001510;
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    box-shadow: 0 18px 45px rgba(16, 185, 129, 0.34);
}

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

.story-block,
.side-rank {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
}

.story-block h2 {
    font-size: 26px;
}

.story-block p {
    color: var(--soft);
    line-height: 2;
    font-size: 16px;
}

.related-section {
    padding-left: 0;
    padding-right: 0;
}

.site-footer {
    margin-top: 60px;
    padding-top: 42px;
    padding-bottom: 34px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 32px;
}

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

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

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    color: var(--soft);
}

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.hidden-by-filter {
    display: none !important;
}

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

    .desktop-nav {
        gap: 12px;
        font-size: 13px;
    }
}

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

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-slide,
    .search-panel,
    .split-block,
    .detail-hero,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 360px;
        width: 100%;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .category-overview-grid,
    .rank-page-grid,
    .global-search-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 560px) {
    .nav-wrap,
    .search-panel,
    .section-block,
    .page-main,
    .site-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-slide {
        padding: 76px 16px 70px;
    }

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

    .hero-content p,
    .detail-one-line,
    .page-hero p {
        font-size: 15px;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .category-mini-grid,
    .category-overview-grid,
    .rank-page-grid,
    .global-search-results {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-hero,
    .story-block,
    .side-rank {
        padding: 22px;
        border-radius: 22px;
    }

    .search-box {
        flex-direction: column;
    }

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

    .rank-item img {
        width: 62px;
        height: 84px;
    }
}
