:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.86);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --primary: #06b6d4;
    --primary-strong: #0891b2;
    --secondary: #a855f7;
    --accent: #f97316;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(6, 182, 212, 0.16), transparent 28rem),
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.14), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0));
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 900;
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.28);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 22px;
    line-height: 1;
    letter-spacing: 0.02em;
}

.brand-copy em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #cbd5e1;
    font-weight: 700;
}

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

.desktop-nav a:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.82);
    color: white;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

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

.mobile-nav a {
    display: block;
    padding: 13px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    font-weight: 700;
}

.mobile-nav a:hover {
    background: rgba(148, 163, 184, 0.12);
    color: white;
}

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

.hero {
    position: relative;
    height: 82vh;
    min-height: 620px;
    overflow: hidden;
    isolation: isolate;
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) saturate(1.12);
    transform: scale(1.08);
    opacity: 0.36;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.92) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 23, 0.08) 48%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-content {
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    padding-top: 96px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    align-items: center;
    gap: 52px;
}

.hero-text h1 {
    margin: 14px 0 18px;
    max-width: 820px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.hero-text p {
    max-width: 720px;
    margin: 0;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.9;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(6, 182, 212, 0.26);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(6, 182, 212, 0.1);
    font-size: 12px;
    font-weight: 800;
}

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

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

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 18px 44px rgba(6, 182, 212, 0.22);
}

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

.ghost-button {
    border: 1px solid var(--line);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.7);
}

.ghost-button.small {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.primary-button.full {
    width: 100%;
}

.hero-poster {
    position: relative;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 32px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-7deg) rotateX(3deg);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.62);
    color: white;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: max(18px, calc((100vw - 1180px) / 2 - 72px));
}

.hero-next {
    right: max(18px, calc((100vw - 1180px) / 2 - 72px));
}

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

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

.hero-dots button.is-active {
    background: white;
}

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

.section {
    padding: 64px 0;
}

.section-alt {
    position: relative;
}

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

.section-heading.wide,
.section-heading.text-left {
    display: block;
}

.section-heading h2,
.page-hero h1 {
    margin: 8px 0 0;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.category-block p {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.9;
}

.section-heading a {
    color: var(--primary);
    font-weight: 900;
}

.intro-search {
    padding-top: 72px;
}

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

.search-box {
    position: relative;
    display: block;
}

.search-box span {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.search-box input,
.filter-select {
    width: 100%;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    font: inherit;
    outline: none;
}

.search-box input {
    padding: 0 18px 0 74px;
}

.filter-select {
    padding: 0 14px;
}

.search-box input:focus,
.filter-select:focus {
    border-color: rgba(6, 182, 212, 0.56);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.42);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.card-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.card-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: white;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    min-height: 60px;
    margin: 10px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 11px;
}

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

.category-tile {
    position: relative;
    min-height: 270px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

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

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

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 2;
    display: block;
    padding: 0 18px;
}

.category-tile span {
    margin-top: 170px;
    color: white;
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

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

.page-hero {
    margin-bottom: 42px;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(168, 85, 247, 0.12)),
        rgba(15, 23, 42, 0.7);
    box-shadow: var(--shadow);
}

.slim-hero {
    padding-bottom: 42px;
}

.category-block {
    margin-bottom: 56px;
}

.category-block-head {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 26px;
    align-items: center;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.64);
}

.category-cover {
    overflow: hidden;
    border-radius: 22px;
}

.category-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-main {
    padding-top: 112px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: black;
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.82));
    color: white;
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
    width: 76px;
    height: 76px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 18px 52px rgba(6, 182, 212, 0.36);
    font-size: 30px;
    text-indent: 4px;
}

.detail-text {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.66);
}

.detail-text h1 {
    margin: 10px 0 14px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.lead {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

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

.detail-side {
    position: sticky;
    top: 96px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.74);
}

.detail-side img {
    border-radius: 22px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.fact-list {
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.fact-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.fact-list span {
    color: var(--muted);
}

.fact-list strong {
    text-align: right;
}

.detail-section {
    width: 100%;
    padding-top: 58px;
}

.article-text {
    margin: 0;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.62);
    color: #dbeafe;
    font-size: 17px;
    line-height: 2;
}

.site-footer {
    margin-top: 74px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

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

.footer-inner strong {
    font-size: 20px;
}

.footer-inner p {
    max-width: 680px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: 10px 16px;
    color: #cbd5e1;
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--primary);
}

[data-card].is-filtered {
    display: none;
}

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

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

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

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

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: 720px;
        height: auto;
    }

    .hero-slide {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 120px 0 90px;
        gap: 28px;
    }

    .hero-poster {
        max-width: 300px;
        transform: none;
    }

    .hero-control {
        display: none;
    }

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

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

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

    .detail-layout,
    .footer-inner,
    .category-block-head {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }

    .category-cover {
        max-width: 240px;
    }
}

@media (max-width: 560px) {
    .header-inner {
        width: min(100% - 22px, 1180px);
        height: 68px;
    }

    .brand-copy em {
        display: none;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .section,
    .page-main,
    .detail-main {
        width: min(100% - 22px, 1180px);
    }

    .page-hero {
        padding: 32px 20px;
        border-radius: 24px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid {
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body p {
        min-height: auto;
    }

    .category-tile {
        min-height: 220px;
    }

    .category-tile span {
        margin-top: 130px;
    }

    .detail-text,
    .article-text {
        padding: 20px;
    }
}
