:root {
    color-scheme: dark;
    --bg: #090b16;
    --bg-soft: #101421;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-card-strong: rgba(18, 22, 38, 0.88);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f8fafc;
    --muted: #a7b0c3;
    --muted-strong: #cbd5e1;
    --primary: #7c3aed;
    --primary-strong: #a855f7;
    --accent: #06b6d4;
    --gold: #fbbf24;
    --danger: #fb7185;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --container: 1180px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.32), transparent 34rem),
        radial-gradient(circle at 85% 4%, rgba(6, 182, 212, 0.22), transparent 32rem),
        linear-gradient(180deg, #070914 0%, #0e1426 48%, #090b16 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 76%);
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 9, 20, 0.82);
    backdrop-filter: blur(22px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 20px;
}

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

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 34px rgba(124, 58, 237, 0.36);
}

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

.nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: 0.22s ease;
}

.nav a:hover,
.nav a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    padding: 74px 0 52px;
}

.hero::before,
.hero::after {
    position: absolute;
    z-index: -1;
    content: "";
    border-radius: 999px;
    filter: blur(8px);
}

.hero::before {
    width: 520px;
    height: 520px;
    top: -160px;
    right: -90px;
    background: rgba(124, 58, 237, 0.24);
}

.hero::after {
    width: 340px;
    height: 340px;
    left: 6%;
    bottom: 4%;
    background: rgba(6, 182, 212, 0.16);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
    gap: 34px;
    align-items: center;
}

.hero-copy {
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(168, 85, 247, 0.34);
    border-radius: 999px;
    color: #e9d5ff;
    background: rgba(124, 58, 237, 0.16);
    font-size: 13px;
    font-weight: 800;
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h1 span {
    color: transparent;
    background: linear-gradient(135deg, #ffffff, #a78bfa 44%, #22d3ee);
    background-clip: text;
    -webkit-background-clip: text;
}

.hero-desc {
    max-width: 680px;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 800;
    transition: 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 16px 36px rgba(124, 58, 237, 0.28);
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 28px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
}

.hero-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 16px;
    color: #ffffff;
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.56);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 28px;
}

.stat-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
}

.stat-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 24px;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
}

.hero-panel {
    position: relative;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.hero-slide {
    display: none;
    min-height: 560px;
}

.hero-slide.active {
    display: block;
    animation: fadeIn 0.55s ease both;
}

.hero-poster {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(6, 182, 212, 0.18));
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.86;
}

.hero-poster::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 20%, rgba(7, 9, 20, 0.92) 94%);
}

.hero-slide-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    padding: 26px;
}

.hero-slide-content h2 {
    margin: 10px 0;
    font-size: clamp(26px, 5vw, 42px);
    line-height: 1.12;
}

.hero-slide-content p {
    color: var(--muted-strong);
    line-height: 1.75;
}

.badge-row,
.tag-list,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.badge,
.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.09);
    font-size: 12px;
    font-weight: 700;
}

.badge.hot {
    color: #fff7ed;
    border-color: rgba(251, 191, 36, 0.32);
    background: rgba(251, 191, 36, 0.16);
}

.slider-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
}

.slider-dot.active {
    width: 26px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.section {
    padding: 54px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: -0.04em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
    transition: 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(255, 255, 255, 0.11);
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background:
        radial-gradient(circle at top, rgba(124, 58, 237, 0.34), transparent 58%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.28s ease;
}

.movie-card:hover .poster-frame img {
    transform: scale(1.05);
}

.poster-frame .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    color: #ffffff;
    background: rgba(7, 9, 20, 0.68);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 40px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.category-card {
    min-height: 190px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.2), transparent 48%),
        rgba(255, 255, 255, 0.075);
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.38);
    background-color: rgba(255, 255, 255, 0.11);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.category-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.category-count {
    color: #bae6fd;
    font-weight: 900;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr auto;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.07);
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    padding: 0 14px;
    color: #ffffff;
    background: rgba(7, 9, 20, 0.62);
}

.filter-bar button {
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    cursor: pointer;
    font-weight: 900;
}

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

.breadcrumb a {
    color: #d8b4fe;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.26), rgba(6, 182, 212, 0.16));
}

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

.detail-title {
    margin: 4px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-lead {
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.85;
}

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

.info-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.info-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.info-value {
    font-weight: 900;
}

.player-section {
    margin-top: 28px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(124, 58, 237, 0.26), rgba(2, 6, 23, 0.74)),
        linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(124, 58, 237, 0.16));
    cursor: pointer;
    font-size: clamp(24px, 5vw, 44px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.play-trigger span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    margin-right: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 20px 44px rgba(124, 58, 237, 0.32);
}

.video-shell.is-playing .play-trigger {
    display: none;
}

.video-status {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(2, 6, 23, 0.72);
    font-size: 12px;
    backdrop-filter: blur(12px);
}

.content-panel {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.07);
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-panel p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 2;
}

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

.side-list {
    display: grid;
    gap: 12px;
}

.side-link {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    transition: 0.22s ease;
}

.side-link:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.11);
}

.side-link img {
    width: 70px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.side-link strong {
    display: block;
    margin-bottom: 6px;
    line-height: 1.42;
}

.side-link span {
    color: var(--muted);
    font-size: 12px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 92px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.075);
}

.rank-number {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-size: 20px;
    font-weight: 950;
}

.rank-cover img {
    width: 92px;
    height: 124px;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

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

.rank-score {
    min-width: 74px;
    text-align: right;
    color: var(--gold);
    font-size: 22px;
    font-weight: 950;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.search-empty {
    padding: 26px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    color: var(--muted);
    text-align: center;
}

.pagination-note {
    margin-top: 20px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.site-footer {
    margin-top: 64px;
    padding: 36px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: rgba(2, 6, 23, 0.34);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 24px;
}

.footer-grid h3,
.footer-grid h4 {
    margin: 0 0 12px;
    color: #ffffff;
}

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

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

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

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

@media (max-width: 860px) {
    .mobile-toggle {
        display: inline-flex;
    }

    .nav {
        position: absolute;
        top: 72px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(7, 9, 20, 0.96);
    }

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

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

    .hero-copy {
        padding: 24px;
    }

    .hero-slide,
    .hero-poster {
        min-height: 460px;
        height: 460px;
    }

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

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

    .rank-item {
        grid-template-columns: 54px 76px 1fr;
    }

    .rank-score {
        grid-column: 3 / 4;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, var(--container));
    }

    .hero {
        min-height: auto;
        padding: 34px 0;
    }

    .hero-stats,
    .info-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-search {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

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

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

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

    .detail-hero {
        padding: 16px;
    }

    .content-panel {
        padding: 18px;
    }

    .play-trigger {
        font-size: 22px;
    }

    .play-trigger span {
        width: 70px;
        height: 70px;
    }
}
