:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(16, 185, 129, 0.42);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #10b981;
    --accent-light: #34d399;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --danger: #fb7185;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.20), transparent 32rem),
        radial-gradient(circle at 78% 12%, rgba(34, 211, 238, 0.14), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.navbar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #022c22;
    background: linear-gradient(135deg, var(--accent-light), var(--cyan));
    box-shadow: 0 0 34px rgba(16, 185, 129, 0.36);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: var(--soft);
    font-weight: 600;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent-light);
}

.nav-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
    transform: scale(1.02);
}

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

.hero-image {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(19rem, 0.8fr);
    align-items: center;
    gap: 3rem;
    padding: 7rem 0 5rem;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.34);
    border-radius: 999px;
    color: var(--accent-light);
    background: rgba(16, 185, 129, 0.12);
    font-size: 0.85rem;
    font-weight: 700;
}

.hero-title {
    max-width: 820px;
    margin: 1.15rem 0 1rem;
    font-size: clamp(2.6rem, 7vw, 5.6rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff, #34d399 48%, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    max-width: 720px;
    color: var(--soft);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.72rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

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

.btn-secondary {
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.74);
}

.hero-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1.4rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-card img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.hero-card-body {
    padding: 1.25rem;
}

.hero-card-title {
    margin: 0.65rem 0 0.45rem;
    font-size: 1.35rem;
    font-weight: 900;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 1.75rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.55rem;
}

.hero-dot {
    width: 0.7rem;
    height: 0.7rem;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.46);
}

.hero-dot.is-active {
    width: 2.2rem;
    background: var(--accent-light);
}

.search-panel {
    margin: -2.4rem auto 2.5rem;
    position: relative;
    z-index: 8;
    max-width: 1040px;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 1.4rem;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.8rem;
}

.search-input,
.filter-select {
    width: 100%;
    min-height: 3rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    outline: none;
    padding: 0 1.05rem;
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

section {
    padding: 3.5rem 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-desc,
.muted {
    color: var(--muted);
    line-height: 1.75;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.15rem;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.50);
    box-shadow: 0 22px 48px rgba(16, 185, 129, 0.12);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

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

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

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    color: #d1fae5;
    border: 1px solid rgba(16, 185, 129, 0.26);
    background: rgba(16, 185, 129, 0.14);
    font-size: 0.75rem;
    font-weight: 800;
}

.poster-badge {
    position: absolute;
    left: 0.7rem;
    top: 0.7rem;
}

.rank-badge {
    position: absolute;
    right: 0.7rem;
    top: 0.7rem;
    color: #020617;
    background: linear-gradient(135deg, #fbbf24, #34d399);
}

.card-body {
    padding: 0.9rem;
}

.card-title {
    display: -webkit-box;
    min-height: 2.8rem;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0.55rem 0 0.4rem;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 900;
}

.card-title:hover {
    color: var(--accent-light);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.card-desc {
    display: -webkit-box;
    min-height: 3.2rem;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 0.65rem;
    color: var(--soft);
    font-size: 0.88rem;
    line-height: 1.65;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.tag {
    border-radius: 999px;
    padding: 0.18rem 0.5rem;
    color: var(--muted);
    background: rgba(148, 163, 184, 0.12);
    font-size: 0.74rem;
}

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

.category-card,
.info-panel,
.rank-row {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.15rem;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.category-card {
    min-height: 10rem;
    padding: 1.1rem;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 0.65rem;
    font-size: 1.25rem;
    font-weight: 900;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.rank-row {
    display: grid;
    grid-template-columns: 4.4rem minmax(0, 1fr);
    gap: 0.9rem;
    padding: 0.65rem;
    align-items: center;
}

.rank-row img {
    aspect-ratio: 1 / 1.25;
    object-fit: cover;
    border-radius: 0.8rem;
}

.rank-index {
    color: var(--amber);
    font-size: 1rem;
    font-weight: 900;
}

.page-hero {
    padding: 4.5rem 0 2rem;
}

.page-title {
    max-width: 920px;
    margin: 1rem 0;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.6fr);
    gap: 1.3rem;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 1.2rem;
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell video {
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--text);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.68));
}

.player-overlay.is-hidden {
    display: none;
}

.play-circle {
    width: 5.2rem;
    height: 5.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #022c22;
    background: linear-gradient(135deg, var(--accent-light), var(--cyan));
    box-shadow: 0 18px 48px rgba(16, 185, 129, 0.36);
    font-size: 2rem;
    font-weight: 900;
}

.info-panel {
    padding: 1.2rem;
}

.info-panel h2,
.info-panel h3 {
    margin: 0 0 0.8rem;
    font-size: 1.35rem;
    font-weight: 900;
}

.detail-cover {
    border-radius: 1.15rem;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.prose {
    color: var(--soft);
    line-height: 1.9;
    font-size: 1rem;
}

.prose p + p {
    margin-top: 1rem;
}

.meta-list {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0;
    color: var(--soft);
}

.meta-list strong {
    color: var(--text);
}

.site-footer {
    margin-top: 3rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--muted);
    background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hide-by-search {
    display: none !important;
}

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

@media (max-width: 900px) {
    .hero-content,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-card {
        max-width: 25rem;
    }

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

    .search-form {
        grid-template-columns: 1fr;
    }

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

    .nav-links {
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: 4.8rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 1rem;
        background: rgba(2, 6, 23, 0.96);
    }

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

@media (max-width: 560px) {
    .navbar,
    .container,
    .footer-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero,
    .hero-content {
        min-height: 82vh;
    }

    .hero-title,
    .page-title {
        letter-spacing: -0.04em;
    }

    .movie-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 4rem minmax(0, 1fr);
    }

    .section-head,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
