:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-strong: #0891b2;
    --orange: #fb923c;
    --pink: #ec4899;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 30rem),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.14), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(22, 78, 99, 0.94), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 18px;
    letter-spacing: 0.03em;
}

.brand-text small {
    margin-top: 3px;
    color: #a5f3fc;
    font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.84);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #67e8f9;
}

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

.header-search input,
.mobile-search input,
.filter-input {
    width: 210px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.09);
    color: white;
    padding: 10px 14px;
    transition: border-color 0.2s ease, background 0.2s ease, width 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus {
    border-color: rgba(34, 211, 238, 0.8);
    background: rgba(255, 255, 255, 0.15);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-button {
    border: 0;
    border-radius: 14px;
    padding: 10px 16px;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.26);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.filter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(8, 145, 178, 0.34);
}

.secondary-button {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(2, 6, 23, 0.96);
}

.mobile-nav.open {
    display: block;
}

.mobile-nav-panel {
    padding: 16px 0;
}

.mobile-nav nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 20px;
}

.hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.12), transparent 72%);
    pointer-events: none;
}

.hero-shell {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: 28px;
    align-items: stretch;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.5s ease, transform 0.6s ease;
    pointer-events: none;
}

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

.hero-art {
    position: relative;
    min-height: 560px;
    overflow: hidden;
}

.hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-art::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.94)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px 54px 54px 8px;
}

.eyebrow {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

.hero-meta,
.movie-meta-line,
.detail-meta,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 28px;
}

.hero-meta span,
.movie-meta-line span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #cbd5e1;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span:first-child,
.movie-meta-line span:first-child {
    background: rgba(34, 211, 238, 0.15);
    color: #67e8f9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-dots {
    position: absolute;
    right: 32px;
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.active {
    width: 34px;
    background: #22d3ee;
}

.section {
    padding: 56px 0;
}

.section-soft {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.38), rgba(30, 41, 59, 0.42));
}

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

.section-title {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    font-weight: 900;
}

.section-lead {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card,
.category-card,
.info-card,
.detail-panel,
.filter-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.movie-card {
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(15, 23, 42, 0.94);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.2), rgba(15, 23, 42, 0.9));
}

.movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-thumb::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 56%);
    opacity: 0.88;
}

.movie-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.movie-year {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.64);
    padding: 6px 9px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

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

.movie-card-body h3 {
    margin: 0 0 10px;
    color: white;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 26px;
    margin-bottom: 12px;
}

.movie-tags span,
.tag-pill {
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.68);
    color: #cbd5e1;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 700;
}

.movie-card-compact .movie-card-body {
    padding: 12px;
}

.movie-card-compact .movie-card-body h3 {
    min-height: 42px;
    font-size: 14px;
}

.movie-card-compact .movie-card-body p,
.movie-card-compact .movie-tags {
    display: none;
}

.movie-card-list .movie-card-link {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 0;
}

.movie-thumb-list {
    aspect-ratio: auto;
    height: 118px;
}

.category-card,
.info-card,
.filter-panel,
.detail-panel {
    padding: 24px;
}

.category-card {
    position: relative;
    min-height: 190px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card::before {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    content: "";
    background: rgba(34, 211, 238, 0.12);
}

.category-card h2,
.category-card h3,
.info-card h3 {
    position: relative;
    margin: 0 0 12px;
    font-size: 23px;
    font-weight: 900;
}

.category-card p,
.info-card p {
    position: relative;
    margin: 0 0 18px;
    color: #a8b4c4;
    line-height: 1.75;
}

.category-card span {
    position: relative;
    display: inline-flex;
    color: #67e8f9;
    font-weight: 900;
}

.page-hero {
    padding: 46px 0 24px;
}

.page-hero-box {
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(15, 23, 42, 0.82)),
        radial-gradient(circle at right top, rgba(236, 72, 153, 0.14), transparent 30rem);
    padding: clamp(28px, 5vw, 52px);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
    font-size: 17px;
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-input {
    width: min(360px, 100%);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.player-card {
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 26px;
    background: rgba(2, 6, 23, 0.8);
    box-shadow: var(--shadow);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18)),
        radial-gradient(circle at center, rgba(34, 211, 238, 0.2), transparent 26rem);
    color: white;
    cursor: pointer;
}

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

.play-button-core {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    padding: 16px 24px;
    color: white;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 20px 50px rgba(8, 145, 178, 0.36);
}

.play-button-core b {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 26px;
}

.detail-content {
    padding: 24px;
}

.breadcrumbs {
    margin-bottom: 18px;
}

.breadcrumbs a:hover {
    color: #67e8f9;
}

.detail-title {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.detail-meta {
    margin-bottom: 20px;
}

.detail-panel {
    margin-top: 20px;
}

.detail-panel h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 23px;
    font-weight: 900;
}

.detail-panel p {
    margin: 0 0 14px;
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar {
    position: sticky;
    top: 92px;
}

.sidebar h2 {
    margin: 0 0 18px;
    font-size: 23px;
    font-weight: 900;
}

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

.search-results {
    min-height: 280px;
}

.empty-state {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    padding: 52px 24px;
    color: #94a3b8;
    text-align: center;
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 0;
}

.footer-inner p {
    margin: 6px 0 0;
    color: #94a3b8;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-inner a:hover {
    color: #67e8f9;
}

.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #64748b;
    padding: 16px;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .header-search {
        display: none;
    }

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

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

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

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

    .hero-content {
        min-height: 420px;
        padding: 40px;
        background: rgba(2, 6, 23, 0.74);
    }

    .hero-art {
        position: absolute;
        inset: 0;
        min-height: 100%;
    }

    .hero-shell,
    .hero-art {
        min-height: 620px;
    }

    .sidebar {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .header-inner {
        min-height: 64px;
    }

    .brand-text strong {
        font-size: 16px;
    }

    .hero {
        padding-top: 18px;
    }

    .hero-shell,
    .hero-art {
        min-height: 650px;
    }

    .hero-content {
        padding: 28px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-dots {
        right: 24px;
        bottom: 22px;
    }

    .section {
        padding: 38px 0;
    }

    .section-header,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .movie-card-list .movie-card-link {
        grid-template-columns: 126px 1fr;
    }

    .movie-thumb-list {
        height: 116px;
    }

    .movie-card-body h3 {
        font-size: 15px;
    }

    .movie-card-body p {
        min-height: auto;
    }

    .page-hero {
        padding-top: 28px;
    }

    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-panel button,
    .filter-panel input {
        width: 100%;
    }
}
