:root {
    color-scheme: dark;
    --bg: #08111f;
    --bg-soft: #0f1b2e;
    --panel: rgba(15, 27, 46, 0.84);
    --panel-strong: rgba(10, 20, 36, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #a7b4c8;
    --blue: #38bdf8;
    --violet: #8b5cf6;
    --pink: #f472b6;
    --green: #34d399;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.18), transparent 28rem),
        radial-gradient(circle at 85% 0%, rgba(139, 92, 246, 0.18), transparent 32rem),
        linear-gradient(180deg, #06101e 0%, #0a1324 48%, #060b14 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 14, 27, 0.78);
    backdrop-filter: blur(22px);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--violet), var(--pink));
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.26);
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.nav-sub-link {
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.active,
.nav-sub-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.nav-group {
    position: relative;
}

.nav-more {
    border: 0;
    cursor: pointer;
    background: transparent;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 180px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(10, 20, 36, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-sub-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

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

.hero-carousel {
    position: relative;
    min-height: 720px;
    overflow: hidden;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    align-items: center;
    gap: 48px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg,
.detail-bg img {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.24;
    filter: blur(2px) saturate(1.15);
}

.hero-shade,
.detail-bg::after {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    background:
        linear-gradient(90deg, rgba(6, 14, 27, 0.96), rgba(6, 14, 27, 0.62), rgba(6, 14, 27, 0.98)),
        radial-gradient(circle at 72% 34%, rgba(56, 189, 248, 0.22), transparent 22rem);
}

.hero-content {
    max-width: 760px;
    padding-top: 54px;
}

.kicker,
.section-title span,
.section-heading span {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-main h1 {
    margin: 0;
    line-height: 1.05;
    font-size: clamp(40px, 6vw, 76px);
    letter-spacing: -0.05em;
}

.hero-lead,
.detail-lead,
.page-hero p,
.section-title p {
    max-width: 760px;
    margin: 22px 0 0;
    color: #d2d9e8;
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #dbe7ff;
    background: rgba(255, 255, 255, 0.07);
}

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

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

.primary-btn {
    color: #06101e;
    background: linear-gradient(135deg, var(--blue), var(--green));
    box-shadow: 0 16px 42px rgba(56, 189, 248, 0.28);
}

.ghost-btn {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    box-shadow: var(--shadow);
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-tools {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 12;
    width: min(1240px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 28px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 7px;
    border-radius: 999px;
    opacity: 0.55;
}

.hero-dot.is-active {
    width: 48px;
    opacity: 1;
    background: linear-gradient(135deg, var(--blue), var(--violet));
}

.section-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.section-title {
    text-align: center;
}

.section-title h2,
.section-heading h2,
.movie-article h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

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

.section-heading > a {
    color: var(--blue);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 220px;
    gap: 14px;
    padding: 18px;
    margin: 28px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    padding: 0 14px;
}

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.46);
    background: rgba(255, 255, 255, 0.085);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.cover-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(6, 14, 27, 0.92), transparent);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #06101e;
    background: linear-gradient(135deg, var(--blue), var(--green));
    box-shadow: 0 10px 24px rgba(56, 189, 248, 0.25);
}

.movie-info {
    padding: 14px;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-info h3 {
    min-height: 46px;
    margin: 10px 0 8px;
    font-size: 16px;
    line-height: 1.42;
}

.movie-info h3 a:hover {
    color: var(--blue);
}

.movie-info p {
    min-height: 62px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

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

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    color: #cfe6ff;
    font-size: 12px;
}

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

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

.category-tile {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(139, 92, 246, 0.08)),
        rgba(255, 255, 255, 0.055);
}

.category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-head span {
    font-size: 22px;
    font-weight: 900;
}

.category-head strong {
    color: var(--blue);
    font-size: 13px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.mini-list {
    display: grid;
    gap: 8px;
    margin-top: auto;
}

.mini-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #dbe7ff;
}

.mini-list em {
    color: var(--muted);
    font-style: normal;
}

.inner-page {
    min-height: 60vh;
}

.page-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 20px;
}

.small-hero {
    padding-top: 92px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
}

.detail-content {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 70px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    margin-top: 42px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    aspect-ratio: 2 / 3;
    box-shadow: var(--shadow);
    background: rgba(255, 255, 255, 0.08);
}

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

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

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

.player-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    width: 100%;
    border: 0;
    color: var(--text);
    cursor: pointer;
    background:
        radial-gradient(circle at center, rgba(56, 189, 248, 0.22), transparent 20rem),
        rgba(0, 0, 0, 0.5);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #06101e;
    font-size: 34px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    box-shadow: 0 16px 45px rgba(56, 189, 248, 0.35);
}

.movie-article {
    max-width: 920px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
}

.movie-article h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 28px;
}

.movie-article p {
    margin: 0 0 24px;
    color: #d2d9e8;
    line-height: 1.95;
    font-size: 17px;
}

.movie-article p:last-child {
    margin-bottom: 0;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(4, 10, 20, 0.78);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: 32px;
}

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

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: flex-end;
}

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

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

.footer-copy {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 34px;
    color: rgba(167, 180, 200, 0.72);
    font-size: 13px;
}

.movie-card.is-hidden {
    display: none;
}

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

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

@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 82px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(6, 14, 27, 0.96);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-dropdown {
        position: static;
        display: grid;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        margin-top: 8px;
        box-shadow: none;
    }

    .hero-carousel {
        min-height: 760px;
    }

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

    .hero-poster {
        width: min(260px, 72vw);
        margin: 0 auto;
    }

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

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

    .detail-poster {
        width: min(300px, 72vw);
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .section-wrap,
    .page-hero,
    .detail-content,
    .footer-inner,
    .footer-copy {
        width: min(100% - 24px, 1240px);
    }

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

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

    .movie-info {
        padding: 11px;
    }

    .movie-info h3 {
        font-size: 14px;
    }

    .movie-info p {
        display: none;
    }

    .hero-content h1,
    .hero-content h2,
    .page-hero h1,
    .detail-main h1 {
        font-size: 36px;
    }

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