:root {
    color-scheme: dark;
    --bg: #141618;
    --bg-2: #24272c;
    --bg-3: #353940;
    --line: #3a4048;
    --text: #ffffff;
    --muted: #9ca3af;
    --muted-2: #6b7280;
    --primary: #1890ff;
    --primary-2: #096dd9;
    --primary-soft: rgba(24, 144, 255, 0.16);
    --secondary: #13c2c2;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 10% 0%, rgba(24, 144, 255, 0.22), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(19, 194, 194, 0.18), transparent 32%),
        linear-gradient(180deg, #171a1f 0%, #141618 44%, #101113 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(36, 39, 44, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 12px 28px rgba(24, 144, 255, 0.35);
}

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

.nav-link,
.mobile-link {
    color: #d1d5db;
    font-weight: 700;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #fff;
    background: var(--primary-soft);
}

.header-search {
    width: 260px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    color: var(--text);
    background: rgba(20, 22, 24, 0.88);
    border: 1px solid var(--line);
    outline: none;
    border-radius: 13px;
    padding: 12px 14px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(24, 144, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.12);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--bg-3);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 16px;
}

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

.mobile-link {
    padding: 12px 14px;
}

.hero-carousel {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #000;
}

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

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

.hero-image,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 22, 24, 0.96) 0%, rgba(20, 22, 24, 0.78) 45%, rgba(20, 22, 24, 0.2) 100%),
        linear-gradient(0deg, #141618 0%, rgba(20, 22, 24, 0.3) 46%, rgba(20, 22, 24, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 78vh;
    margin: 0 auto;
    padding: 90px 24px 80px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 54px;
    align-items: center;
}

.hero-copy,
.page-hero > div,
.detail-copy {
    animation: slideUp 0.65s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #69c0ff;
    background: rgba(24, 144, 255, 0.16);
    border: 1px solid rgba(24, 144, 255, 0.38);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
    max-width: 720px;
    margin: 0 0 22px;
    color: #d1d5db;
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
    color: #dff3ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

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

.btn.primary {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 16px 36px rgba(24, 144, 255, 0.24);
}

.btn.primary:hover {
    background: var(--primary-2);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn.text {
    color: #69c0ff;
    padding-inline: 4px;
}

.btn.small {
    padding: 9px 13px;
    border-radius: 11px;
    font-size: 14px;
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 26px;
    box-shadow: var(--shadow);
    transform: perspective(900px) rotateY(-7deg);
}

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

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--primary);
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px;
}

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

.section-head.compact {
    margin-bottom: 18px;
}

.section-head h2,
.panel-head h2,
.text-card h2,
.category-overview-body h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.12;
}

.section-head > a,
.panel-head a {
    color: #69c0ff;
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    background: rgba(36, 39, 44, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: rgba(24, 144, 255, 0.42);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0b0c0f;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: #fff;
    background: rgba(24, 144, 255, 0.9);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card-link:hover .poster-shade,
.movie-card-link:hover .play-badge {
    opacity: 1;
}

.movie-card-link:hover .play-badge {
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.movie-info strong {
    font-size: 18px;
    line-height: 1.35;
}

.movie-meta,
.rank-body .movie-meta {
    color: var(--muted);
    font-size: 13px;
}

.movie-desc {
    color: #d1d5db;
    font-size: 14px;
}

.movie-card.compact .movie-info strong {
    font-size: 16px;
}

.movie-card.compact .movie-desc {
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--bg-2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.category-tile:hover img,
.category-cover:hover img {
    transform: scale(1.08);
}

.category-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.12));
}

.category-tile strong,
.category-tile small {
    position: absolute;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.category-tile strong {
    bottom: 66px;
    font-size: 24px;
}

.category-tile small {
    bottom: 20px;
    color: #d1d5db;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.ranking-panel,
.text-card,
.player-card,
.category-overview-card {
    background: rgba(36, 39, 44, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.ranking-list,
.ranking-page-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ranking-list li:last-child {
    border-bottom: 0;
}

.ranking-list li > span,
.rank-number {
    color: #69c0ff;
    font-weight: 900;
}

.mini-card {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 12px;
    align-items: center;
}

.mini-card img {
    width: 66px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.mini-card strong,
.mini-card small {
    display: block;
}

.mini-card small {
    color: var(--muted);
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(36, 39, 44, 0.96), rgba(20, 22, 24, 1));
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -10%;
    top: -35%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(24, 144, 255, 0.22), transparent 66%);
}

.page-hero > div {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 82px 24px 48px;
}

.page-hero.slim > div {
    padding-top: 78px;
}

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

.breadcrumb a {
    color: #69c0ff;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(36, 39, 44, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
}

.no-results {
    display: none;
    margin: 28px 0 0;
    color: var(--muted);
    text-align: center;
}

.no-results.is-active {
    display: block;
}

.is-hidden {
    display: none !important;
}

.category-overview {
    display: grid;
    gap: 26px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    overflow: hidden;
}

.category-cover {
    position: relative;
    min-height: 250px;
    overflow: hidden;
}

.category-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent);
}

.category-cover span {
    position: absolute;
    left: 22px;
    bottom: 18px;
    z-index: 2;
    font-size: 26px;
    font-weight: 900;
}

.category-overview-body {
    display: grid;
    gap: 16px;
    padding: 24px;
}

.category-overview-body p {
    margin: 0;
    color: #d1d5db;
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 56px 128px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: rgba(36, 39, 44, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
}

.rank-number {
    font-size: 22px;
    text-align: center;
}

.rank-poster img {
    width: 128px;
    height: 78px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-body h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-body p {
    margin: 0 0 8px;
    color: #d1d5db;
}

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

.detail-bg-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 22, 24, 0.96) 0%, rgba(20, 22, 24, 0.82) 56%, rgba(20, 22, 24, 0.5) 100%),
        linear-gradient(0deg, #141618 0%, rgba(20, 22, 24, 0.2) 60%, rgba(20, 22, 24, 0.7) 100%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px 60px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 8px 12px;
}

.detail-content {
    padding-top: 28px;
}

.player-card {
    overflow: hidden;
    margin-bottom: 28px;
    padding: 0;
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 18px 42px rgba(24, 144, 255, 0.35);
    font-size: 32px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover span {
    background: var(--primary-2);
    transform: scale(1.06);
}

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

.text-card {
    padding: 24px;
}

.text-card p {
    margin: 14px 0 0;
    color: #d1d5db;
    white-space: pre-line;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(14, 15, 17, 0.96);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.footer-inner p {
    max-width: 620px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: flex-end;
    align-content: start;
}

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

.footer-links a:hover {
    color: #69c0ff;
}

.footer-copy {
    grid-column: 1 / -1;
    color: var(--muted-2);
    font-size: 14px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .two-column {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 76px;
    }

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

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

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

    .category-overview-card,
    .detail-layout,
    .detail-text-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-row {
        grid-template-columns: 42px 92px 1fr;
    }

    .ranking-row .btn {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .rank-poster img {
        width: 92px;
        height: 68px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .header-inner {
        padding-inline: 16px;
    }

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

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

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .content-section {
        padding: 42px 16px;
    }

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

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

    .detail-inner,
    .page-hero > div {
        padding-inline: 16px;
    }

    .detail-cover {
        max-width: 220px;
    }

    .ranking-row {
        grid-template-columns: 34px 1fr;
    }

    .rank-poster {
        display: none;
    }
}
