:root {
    color-scheme: dark;
    --bg: #070914;
    --panel: rgba(17, 24, 39, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #a5b4fc;
    --soft: #cbd5e1;
    --accent: #f97316;
    --accent-2: #ec4899;
    --accent-3: #8b5cf6;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(236, 72, 153, 0.18), transparent 32rem),
        radial-gradient(circle at 82% 12%, rgba(139, 92, 246, 0.2), transparent 34rem),
        linear-gradient(180deg, #080a17 0%, #0f1023 45%, #070914 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
    z-index: -1;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 10, 23, 0.76);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.32);
}

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

.logo::before {
    content: "";
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 0 28px rgba(236, 72, 153, 0.42);
}

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

.main-nav a,
.quick-links a,
.section-more,
.footer-links a {
    border: 1px solid transparent;
    color: var(--soft);
    transition: 0.2s ease;
}

.main-nav a {
    padding: 10px 16px;
    border-radius: 999px;
}

.main-nav a:hover,
.quick-links a:hover,
.section-more:hover,
.footer-links a:hover {
    border-color: rgba(249, 115, 22, 0.5);
    color: #ffffff;
    background: rgba(249, 115, 22, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
}

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    margin: 22px auto 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 36px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 48px;
    align-items: center;
    padding: 70px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 9, 20, 0.98), rgba(7, 9, 20, 0.72) 45%, rgba(7, 9, 20, 0.4)),
        linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.18)),
        var(--hero-bg) center / cover;
    filter: saturate(1.08);
}

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

.hero-backdrop {
    position: absolute;
    inset: auto -12% -22% 18%;
    height: 44%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.34), rgba(236, 72, 153, 0.22));
    filter: blur(60px);
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 16px;
    padding: 7px 12px;
    border: 1px solid rgba(249, 115, 22, 0.4);
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.13);
    color: #fed7aa;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    max-width: 850px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
    max-width: 720px;
    margin-top: 22px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.9;
}

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

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

.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 16px 40px rgba(236, 72, 153, 0.34);
}

.btn.ghost,
.btn.text {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

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

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 12px;
}

.hero-poster {
    display: block;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
    transform: rotate(2deg);
}

.hero-dots {
    position: absolute;
    left: 70px;
    bottom: 42px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 40px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.active {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.search-panel,
.content-section,
.page-hero,
.detail-hero,
.player-section,
.filter-bar {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    backdrop-filter: blur(18px);
}

.home-search,
.filter-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.home-search input,
.filter-bar input {
    padding: 0 18px;
}

.filter-bar select {
    padding: 0 38px 0 16px;
}

.home-search button {
    min-height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    font-weight: 900;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a,
.section-more {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
}

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

.section-head h2,
.detail-text h2 {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-head p,
.detail-text p,
.site-footer p,
.category-block p {
    margin-top: 8px;
    color: var(--soft);
    line-height: 1.8;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.55);
    background: rgba(30, 41, 59, 0.88);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #312e81);
}

.poster-wrap img {
    transition: transform 0.35s ease;
}

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    min-height: 30px;
    padding: 0 11px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(12px);
    font-size: 12px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.movie-card-body {
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    margin-top: 8px;
    color: #93c5fd;
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    min-height: 62px;
    margin-top: 10px;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.category-pill,
.category-block {
    display: block;
    min-height: 138px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(139, 92, 246, 0.12)),
        rgba(15, 23, 42, 0.74);
    transition: 0.2s ease;
}

.category-pill:hover,
.category-block:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.5);
}

.category-pill strong,
.category-block h2 {
    display: block;
    color: #fff;
    font-size: 20px;
    font-weight: 950;
}

.category-pill span,
.category-block p {
    display: block;
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
}

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

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

.movie-card.compact {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 148px;
}

.movie-card.compact .poster-wrap {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card.compact .movie-desc {
    min-height: auto;
    -webkit-line-clamp: 2;
}

.inner-page {
    padding-bottom: 60px;
}

.page-hero.small,
.detail-hero {
    padding: 48px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.22), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 27, 75, 0.84));
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 20px;
    color: #c4b5fd;
    font-size: 14px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 28px 76px rgba(0, 0, 0, 0.44);
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    padding-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 34px;
    box-shadow: 0 18px 54px rgba(236, 72, 153, 0.38);
}

.detail-text {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--panel);
}

.detail-text h2:not(:first-child) {
    margin-top: 24px;
}

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

.meta-table div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
}

.meta-table strong,
.meta-table span {
    display: block;
}

.meta-table strong {
    color: #fed7aa;
    font-size: 13px;
}

.meta-table span {
    margin-top: 6px;
    color: #fff;
    font-weight: 800;
}

.filter-bar {
    position: relative;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, auto));
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--panel);
}

.filter-empty {
    display: none;
    grid-column: 1 / -1;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-align: center;
}

.filter-empty.show {
    display: block;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 50px auto 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(8, 10, 23, 0.78);
}

.footer-brand {
    font-size: 24px;
    font-weight: 950;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.footer-links a {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
}

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

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

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

    .hero-slide {
        grid-template-columns: 1fr 280px;
        padding: 50px;
    }
}

@media (max-width: 760px) {
    .site-header {
        border-radius: 24px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: min(280px, calc(100vw - 32px));
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(8, 10, 23, 0.96);
    }

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

    .hero {
        min-height: 760px;
        border-radius: 28px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px 24px 76px;
    }

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

    .hero-poster {
        width: 210px;
        margin: 0 auto;
    }

    .hero-dots {
        left: 24px;
        bottom: 32px;
    }

    .search-panel,
    .home-search,
    .filter-bar,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .quick-links {
        justify-content: center;
    }

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

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

    .page-hero.small,
    .detail-hero {
        padding: 28px;
    }

    .detail-poster {
        width: 220px;
        margin: 0 auto;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .rank-list,
    .rank-list.full,
    .category-pill-grid,
    .category-list-grid,
    .meta-table {
        grid-template-columns: 1fr;
    }

    .movie-card.compact {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .logo {
        font-size: 17px;
    }
}
