:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --pink: #ec4899;
    --orange: #f97316;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.16), transparent 36rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111a;
    font-size: 0.95rem;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
}

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

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

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero-slider {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

.hero-slide {
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 1s ease;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
        var(--hero-image);
    background-position: center;
    background-size: cover;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.24), transparent 20rem),
        linear-gradient(0deg, #020617 0%, transparent 35%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding-top: 32px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--cyan);
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.6rem, 7vw, 6.8rem);
    line-height: 0.92;
    letter-spacing: -0.08em;
    font-weight: 950;
}

.hero-content h2 {
    margin-top: 18px;
    font-size: clamp(2rem, 4vw, 4.4rem);
}

.hero-desc,
.page-hero p,
.detail-one {
    max-width: 700px;
    color: #dbeafe;
    font-size: clamp(1rem, 1.7vw, 1.25rem);
    line-height: 1.85;
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(15, 23, 42, 0.7);
    font-size: 0.82rem;
    font-weight: 700;
}

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

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

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

.btn-primary {
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
    color: white;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.62);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.52);
    color: white;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

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

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

.hero-dot.active {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

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

.section-wrap {
    padding: 72px 0 0;
}

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

.center-heading {
    display: block;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-heading h2,
.detail-text h2,
.site-footer h2 {
    margin: 0;
    color: white;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.section-heading p {
    color: var(--muted);
    line-height: 1.8;
}

.text-link {
    color: var(--cyan);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 180px));
    gap: 12px;
    margin: 0 0 28px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    outline: none;
    color: white;
    background: rgba(2, 6, 23, 0.78);
    padding: 0 14px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
    box-shadow: 0 20px 55px rgba(2, 6, 23, 0.32);
    transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(34, 211, 238, 0.46);
    box-shadow: 0 28px 80px rgba(8, 145, 178, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
}

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

.movie-card:hover .poster {
    transform: scale(1.06);
    filter: saturate(1.08) brightness(1.04);
}

.quality-badge,
.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: white;
    font-size: 0.76rem;
    font-weight: 900;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(10px);
}

.quality-badge {
    left: 12px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.94), rgba(59, 130, 246, 0.94));
    color: #00111a;
}

.year-badge {
    right: 12px;
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    top: auto;
    min-width: 38px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 8px;
}

.movie-title {
    display: -webkit-box;
    min-height: 1.35em;
    overflow: hidden;
    color: white;
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 900;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--cyan);
}

.movie-meta,
.movie-one {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.movie-one {
    display: -webkit-box;
    min-height: 3.2em;
    margin-top: 10px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-compact .movie-info {
    padding: 15px;
}

.movie-card-compact .tag-row {
    display: none;
}

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

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.category-card-main {
    position: relative;
    display: block;
    min-height: 220px;
    padding: 26px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent),
        rgba(15, 23, 42, 0.9);
}

.category-card-main h2 {
    position: relative;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 950;
}

.category-card-main p:not(.eyebrow) {
    position: relative;
    color: #cbd5e1;
    line-height: 1.75;
}

.category-glow {
    position: absolute;
    width: 170px;
    height: 170px;
    right: -50px;
    bottom: -40px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.42), transparent 66%);
}

.category-samples {
    display: grid;
    gap: 1px;
    background: rgba(148, 163, 184, 0.1);
}

.category-samples a {
    padding: 13px 18px;
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.32);
}

.category-samples a:hover {
    color: var(--cyan);
}

.page-shell {
    padding-top: 44px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    margin-top: 28px;
    padding: 60px;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 10px);
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58)),
        var(--page-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.soft-hero {
    background:
        radial-gradient(circle at 16% 18%, rgba(34, 211, 238, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
}

.page-hero-cover {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 15%, rgba(59, 130, 246, 0.24), transparent 24rem);
}

.page-hero > div:not(.page-hero-cover) {
    position: relative;
    z-index: 2;
}

.top-rank-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 22px;
}

.top-rank-card {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-image:
        linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.1)),
        var(--rank-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.top-rank-card span {
    color: var(--cyan);
    font-weight: 950;
}

.top-rank-card h2 {
    margin: 10px 0;
    font-size: 2rem;
    font-weight: 950;
}

.top-rank-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.7;
}

.detail-page {
    overflow: hidden;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.26)),
        var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, transparent 38%),
        radial-gradient(circle at 22% 18%, rgba(34, 211, 238, 0.24), transparent 24rem);
}

.detail-grid {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 48px;
    align-items: center;
}

.detail-poster-wrap {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: #cbd5e1;
    font-size: 0.92rem;
}

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

.detail-info h1 {
    max-width: 850px;
    font-size: clamp(2.2rem, 5.6vw, 5.4rem);
}

.detail-meta {
    margin-bottom: 4px;
}

.player-section {
    scroll-margin-top: 92px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.26);
    border-radius: calc(var(--radius) + 8px);
    background: black;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.2), rgba(2, 6, 23, 0.36));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 2.2rem;
    box-shadow: 0 0 60px rgba(34, 211, 238, 0.54);
}

.detail-text {
    max-width: 920px;
}

.detail-text h2 {
    margin: 0 0 18px;
    font-size: 2rem;
}

.detail-text p {
    margin: 0 0 34px;
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 2;
}

.empty-state {
    margin: 28px 0 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

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

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

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

.site-footer h2 {
    margin-bottom: 16px;
    font-size: 1.04rem;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: #cbd5e1;
}

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

.copyright {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 28px;
    color: #64748b;
}

[hidden] {
    display: none !important;
}

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

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

    .detail-grid {
        grid-template-columns: 240px 1fr;
    }
}

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

    .main-nav {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        display: grid;
        gap: 6px;
        padding: 18px 24px 28px;
        border-bottom: 1px solid var(--line);
        background: rgba(2, 6, 23, 0.96);
        transform: translateY(-120%);
        transition: transform 0.24s ease;
    }

    .nav-open .main-nav {
        transform: translateY(0);
    }

    .hero-slider {
        min-height: 640px;
        height: 78vh;
    }

    .hero-arrow {
        display: none;
    }

    .section-heading,
    .footer-grid,
    .detail-grid {
        display: block;
    }

    .detail-poster-wrap {
        max-width: 230px;
        margin-bottom: 28px;
    }

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

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

    .page-hero {
        padding: 38px 26px;
    }
}

@media (max-width: 540px) {
    .nav-wrap,
    .section-wrap,
    .page-shell,
    .detail-grid,
    .footer-grid,
    .copyright {
        width: min(100% - 22px, 1240px);
    }

    .brand {
        font-size: 1.25rem;
    }

    .brand-icon {
        width: 34px;
        height: 34px;
    }

    .hero-content h1,
    .hero-content h2,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.06em;
    }

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

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }

    .detail-hero {
        padding: 46px 0 30px;
    }
}
