:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #e2e8f0;
    --white: #ffffff;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --orange: #f97316;
    --green: #22c55e;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 15% 0%, rgba(8, 145, 178, 0.28), transparent 32%), radial-gradient(circle at 85% 10%, rgba(249, 115, 22, 0.14), transparent 26%), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img,
video {
    max-width: 100%;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.nav-shell,
.footer-shell,
.section-shell,
.hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-shell {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--white);
}

.brand-text {
    font-size: 25px;
    background: linear-gradient(90deg, #22d3ee, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: white;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.nav-links a,
.mobile-nav a {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.mobile-nav a:hover {
    color: var(--cyan);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input {
    width: 210px;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--white);
}

.top-search button,
.mobile-search button,
.btn,
.rank-action,
.category-link {
    border: 0;
    border-radius: 999px;
    background: var(--cyan-strong);
    color: white;
    font-weight: 800;
    padding: 10px 18px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.btn:hover,
.rank-action:hover,
.category-link:hover {
    background: #0891b2;
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(8, 145, 178, 0.22);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.8);
    color: var(--white);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    gap: 10px;
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.65);
}

.hero-carousel {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    background: #020617;
}

.hero-track {
    position: relative;
    min-height: 610px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transition: opacity 0.8s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 45%, rgba(34, 211, 238, 0.18), transparent 28%), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.28));
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 96px 0 86px;
}

.hero-kicker,
.kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 14px;
    background: rgba(6, 182, 212, 0.18);
    color: #67e8f9;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid rgba(34, 211, 238, 0.26);
}

.hero-inner h1,
.hero-inner h2 {
    max-width: 760px;
    margin: 18px 0 0;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    color: white;
}

.hero-inner h2 {
    font-size: clamp(34px, 5.6vw, 58px);
}

.hero-inner p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.8;
    margin: 20px 0 0;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

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

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

.hero-tags a,
.meta-pills span,
.tag-row span,
.rank-meta span {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: #cbd5e1;
    padding: 7px 12px;
    font-size: 13px;
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: white;
    font-size: 28px;
    cursor: pointer;
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

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

.hero-dots button.is-active {
    width: 64px;
    background: var(--cyan);
}

.section-shell {
    padding: 58px 0 0;
}

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

.section-head h1,
.section-head h2,
.page-intro h1,
.detail-text h2,
.player-section h2 {
    margin: 0;
    color: white;
    letter-spacing: -0.04em;
}

.section-head h2,
.section-head h1,
.page-intro h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-head p,
.page-intro p,
.detail-text p {
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card,
.category-card,
.rank-row,
.detail-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
}

.movie-card {
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 30px 70px rgba(6, 182, 212, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #083344);
}

.poster-bg,
.rank-cover,
.detail-cover {
    display: block;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-bg {
    transform: scale(1.07);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.9);
    color: white;
    box-shadow: 0 14px 30px rgba(6, 182, 212, 0.28);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    gap: 8px;
    color: #67e8f9;
    font-size: 13px;
    font-weight: 800;
}

.card-body h2 {
    margin: 10px 0 8px;
    color: white;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h2 a:hover,
.rank-info h2 a:hover,
.text-link:hover {
    color: var(--cyan);
}

.card-body p {
    min-height: 64px;
    margin: 0 0 14px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    padding: 26px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.64));
}

.category-card h2 {
    margin: 0 0 10px;
    color: white;
    font-size: 25px;
}

.category-card p {
    color: var(--muted);
    line-height: 1.75;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 22px;
}

.category-samples a {
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 13px;
}

.page-intro {
    padding: 58px 0 0;
}

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

.breadcrumb a {
    color: #67e8f9;
}

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 90px 64px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    background-color: #0f172a;
}

.rank-num {
    color: var(--cyan);
    font-size: 28px;
    font-weight: 900;
}

.rank-info h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.6;
}

.detail-hero {
    min-height: 560px;
    display: grid;
    align-items: center;
    background-position: center;
    background-size: cover;
    border-bottom: 1px solid var(--line);
}

.detail-hero .hero-inner {
    padding-top: 82px;
}

.detail-hero h1 {
    max-width: 880px;
    margin: 16px 0 0;
    color: white;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.detail-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 24px;
}

.player-section {
    margin-top: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: black;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: white;
    cursor: pointer;
    background-position: center;
    background-size: cover;
}

.player-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.28), transparent 24%), linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.55));
}

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

.player-start {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    text-align: center;
}

.player-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.95);
    color: white;
    font-size: 36px;
    box-shadow: 0 18px 54px rgba(6, 182, 212, 0.35);
}

.player-start strong {
    font-size: 22px;
}

.detail-panel {
    padding: 24px;
}

.detail-text h2 {
    margin-top: 0;
    font-size: 26px;
}

.detail-text p {
    font-size: 16px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.info-list dt {
    color: #67e8f9;
    font-weight: 800;
}

.info-list dd {
    margin: 0;
    color: #cbd5e1;
}

.next-prev {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.next-prev a {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
}

.next-prev strong {
    display: block;
    color: white;
    margin-top: 6px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin: 24px 0;
}

.search-panel input {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.82);
    color: white;
    padding: 15px 16px;
    outline: none;
}

.search-panel button {
    border: 0;
    border-radius: 18px;
    background: var(--cyan-strong);
    color: white;
    font-weight: 800;
    padding: 0 24px;
    cursor: pointer;
}

.empty-state {
    display: none;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.7);
}

.empty-state.is-visible {
    display: block;
}

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

.footer-shell {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding: 42px 0;
}

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

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

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

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

.footer-links a {
    color: #94a3b8;
}

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

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

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

@media (max-width: 860px) {
    .nav-links,
    .top-search {
        display: none;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-control {
        display: none;
    }

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

    .rank-row {
        grid-template-columns: 72px 48px 1fr;
    }

    .rank-action {
        grid-column: 3;
        width: fit-content;
    }
}

@media (max-width: 620px) {
    .nav-shell,
    .footer-shell,
    .section-shell,
    .hero-inner {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-carousel,
    .hero-track {
        min-height: 560px;
    }

    .hero-inner {
        padding: 72px 0 68px;
    }

    .movie-grid,
    .category-grid,
    .footer-shell,
    .next-prev,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 64px 42px 1fr;
        gap: 12px;
    }

    .rank-info p {
        display: none;
    }

    .section-head {
        display: grid;
    }

    .player-icon {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
