:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --teal: #14b8a6;
    --emerald: #10b981;
    --orange: #f97316;
    --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
    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;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #07111f 44%, #020617 100%);
    color: var(--text);
}

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.02) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 72%);
    z-index: -1;
}

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: 60;
    background: rgba(2, 6, 23, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section-wrap,
.page-shell,
.breadcrumb,
.detail-page > .detail-hero,
.detail-content,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--emerald));
    box-shadow: 0 12px 40px rgba(20, 184, 166, 0.32);
}

.brand-name {
    font-size: 1.16rem;
}

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

.nav-link {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.header-search,
.mobile-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
}

.header-search input,
.mobile-search input,
.search-banner input,
.filter-panel input,
.filter-panel select {
    color: var(--text);
    background: rgba(2, 6, 23, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.22);
    outline: none;
}

.header-search input,
.mobile-search input {
    width: 220px;
    border: 0;
    background: transparent;
    padding: 7px 10px;
}

.header-search button,
.mobile-search button,
.search-banner button {
    color: #001018;
    border: 0;
    border-radius: 999px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

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

.hero-slides,
.hero-slide,
.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.84) 36%, rgba(2, 6, 23, 0.38) 68%, rgba(2, 6, 23, 0.72) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.06) 44%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 690px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 84px 0 132px;
}

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

.hero-content h1,
.page-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero-content h2 {
    max-width: 720px;
    margin: 22px 0 0;
    color: #ecfeff;
    font-size: clamp(1.5rem, 3vw, 3rem);
    line-height: 1.12;
}

.hero-content p:not(.eyebrow) {
    max-width: 700px;
    margin: 18px 0 0;
    color: var(--soft);
    font-size: 1.08rem;
    line-height: 1.86;
}

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

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

.hero-tags span,
.tag-row span {
    color: #cffafe;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(8, 145, 178, 0.14);
}

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

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

.primary-button {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--emerald));
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.22);
}

.ghost-button {
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-control-panel {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.72);
    color: white;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%;
}

.hero-dot.is-active {
    width: 34px;
    border-radius: 999px;
    background: var(--cyan);
}

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

.no-top-pad {
    padding-top: 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.8rem);
    letter-spacing: -0.045em;
}

.section-heading a {
    color: var(--cyan);
    font-weight: 800;
}

.compact-heading {
    align-items: center;
    margin-bottom: 18px;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 14px 46px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: var(--shadow);
}

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

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 900;
}

.type-badge {
    top: 12px;
    right: 12px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--emerald));
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    color: #fff7ed;
    background: linear-gradient(135deg, var(--orange), #ef4444);
}

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

.movie-meta {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-card h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

.movie-one-line {
    margin: 9px 0 14px;
    color: var(--soft);
    font-size: 0.9rem;
    line-height: 1.64;
}

.tag-row span {
    font-size: 0.74rem;
    padding: 5px 9px;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
}

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

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.48;
}

.category-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.36), rgba(2, 6, 23, 0.82));
    z-index: 1;
}

.category-card-content {
    position: relative;
    z-index: 2;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 22px;
}

.category-card strong {
    font-size: 1.35rem;
}

.category-card em {
    margin-top: 8px;
    color: var(--soft);
    font-style: normal;
    line-height: 1.6;
}

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

.ranking-panel,
.filter-panel,
.search-banner,
.page-hero,
.detail-hero,
.player-section,
.detail-content,
.related-wrap {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.rank-item a {
    display: grid;
    grid-template-columns: 42px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.34);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item a:hover {
    transform: translateX(3px);
    border-color: rgba(34, 211, 238, 0.36);
}

.rank-number {
    color: var(--cyan);
    font-weight: 950;
    font-size: 1.1rem;
}

.rank-item img {
    width: 54px;
    height: 72px;
    border-radius: 13px;
    object-fit: cover;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 0.82rem;
}

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

.search-banner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 26px;
    align-items: center;
    padding: 34px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 24rem),
        rgba(15, 23, 42, 0.76);
}

.search-banner h2,
.page-hero h1 {
    margin: 0;
}

.search-banner p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
    color: var(--soft);
    line-height: 1.8;
}

.search-banner form {
    display: flex;
    gap: 10px;
}

.search-banner input {
    min-width: 0;
    flex: 1;
    border-radius: 999px;
    padding: 14px 16px;
}

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

.page-hero {
    margin-bottom: 42px;
    padding: 46px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.24), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.86));
}

.small-hero h1 {
    font-size: clamp(2.2rem, 4vw, 4.2rem);
}

.category-hero {
    position: relative;
}

.hero-mini-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.hero-mini-grid .movie-card-body {
    display: none;
}

.hero-mini-grid .movie-card {
    border-radius: 18px;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    padding: 0 14px;
}

.filter-selects {
    display: flex;
    gap: 12px;
    align-items: end;
}

.filter-selects label {
    min-width: 142px;
}

.empty-state {
    padding: 28px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.26);
    border-radius: 22px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 30px 0 20px;
    color: var(--muted);
}

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

.detail-page > .detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    background:
        radial-gradient(circle at 26% 18%, rgba(34, 211, 238, 0.24), transparent 24rem),
        rgba(15, 23, 42, 0.76);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.detail-lead {
    color: var(--soft);
    font-size: 1.08rem;
    line-height: 1.88;
}

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

.detail-meta-grid span {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.36);
}

.detail-meta-grid strong {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.large-tags span {
    font-size: 0.84rem;
}

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

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 26px 86px rgba(0, 0, 0, 0.36);
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.72));
    z-index: 4;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--emerald));
    box-shadow: 0 22px 60px rgba(34, 211, 238, 0.38);
}

.detail-content {
    margin-top: 36px;
    padding: 32px;
    display: grid;
    gap: 24px;
}

.detail-block h2 {
    margin: 0 0 12px;
    font-size: 1.55rem;
}

.detail-block p {
    margin: 0;
    color: var(--soft);
    line-height: 2;
    font-size: 1.02rem;
}

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

.prev-next a {
    padding: 14px 16px;
    border-radius: 18px;
    color: var(--cyan);
    background: rgba(2, 6, 23, 0.34);
    border: 1px solid rgba(34, 211, 238, 0.16);
}

.related-wrap {
    margin-top: 36px;
    margin-bottom: 76px;
    padding: 32px;
}

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

.footer-inner {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 16px;
    color: var(--cyan);
}

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

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

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

    .ranking-panel {
        position: static;
    }
}

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

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

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

    .mobile-search {
        margin-left: 0;
        width: 100%;
    }

    .mobile-search input {
        width: 100%;
    }

    .home-hero,
    .hero-content {
        min-height: 640px;
    }

    .movie-grid,
    .feature-grid,
    .compact-grid,
    .catalog-grid,
    .rank-list-page,
    .category-grid,
    .hero-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-banner,
    .filter-panel,
    .detail-page > .detail-hero {
        grid-template-columns: 1fr;
    }

    .filter-selects {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-poster {
        max-width: 340px;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .footer-inner,
    .section-wrap,
    .page-shell,
    .breadcrumb,
    .detail-page > .detail-hero,
    .detail-content,
    .player-section {
        width: min(100% - 22px, 1180px);
    }

    .home-hero,
    .hero-content {
        min-height: 590px;
    }

    .hero-content {
        padding-bottom: 110px;
    }

    .hero-control-panel {
        width: calc(100% - 22px);
    }

    .movie-grid,
    .feature-grid,
    .compact-grid,
    .catalog-grid,
    .category-grid,
    .hero-mini-grid {
        grid-template-columns: 1fr;
    }

    .rank-item a {
        grid-template-columns: 34px 48px minmax(0, 1fr);
    }

    .rank-item img {
        width: 48px;
        height: 64px;
    }

    .page-hero,
    .detail-page > .detail-hero,
    .detail-content,
    .player-section,
    .related-wrap,
    .search-banner {
        padding: 22px;
        border-radius: 24px;
    }

    .detail-meta-grid,
    .prev-next > div,
    .filter-selects {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        padding: 24px 0;
        flex-direction: column;
        align-items: flex-start;
    }
}
