:root {
    --cyan-50: #ecfeff;
    --cyan-100: #cffafe;
    --cyan-200: #a5f3fc;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --cyan-700: #0e7490;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 30px rgba(8, 145, 178, 0.14);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--slate-900);
    background: linear-gradient(180deg, var(--cyan-50) 0%, var(--white) 320px, var(--slate-50) 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(165, 243, 252, 0.7);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-500), var(--cyan-700));
    border-radius: 14px;
    box-shadow: var(--soft-shadow);
}

.brand-text,
.footer-brand {
    font-size: 1.35rem;
    color: var(--cyan-700);
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--cyan-700);
    background: var(--cyan-100);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 2px solid var(--cyan-100);
    border-radius: 999px;
    background: var(--white);
}

.header-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 10px 14px;
}

.header-search button {
    border: 0;
    padding: 10px 16px;
    color: var(--white);
    background: var(--cyan-600);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: var(--cyan-100);
    color: var(--cyan-700);
    border-radius: 12px;
    padding: 8px 12px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.03);
}

.hero-bg::after,
.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 76% 48%, rgba(34, 211, 238, 0.25), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.28) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: center;
    gap: 54px;
    height: 100%;
    color: var(--white);
}

.hero-copy {
    max-width: 720px;
}

.hero-label,
.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan-200);
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.hero-summary {
    max-width: 760px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
    line-height: 1.9;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--cyan-700);
    background: var(--cyan-100);
}

.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-500), var(--cyan-700));
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(8, 145, 178, 0.24);
}

.btn.ghost,
.btn.ghost-light {
    color: var(--cyan-700);
    background: var(--white);
}

.btn.ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.btn.small {
    min-height: 38px;
    padding-inline: 16px;
    font-size: 0.92rem;
}

.btn.full {
    width: 100%;
    margin-top: 12px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius-xl);
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.34);
    transform: rotate(2deg);
}

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

.hero-poster span,
.play-chip,
.detail-cover span {
    position: absolute;
    right: 14px;
    bottom: 14px;
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--white);
    background: rgba(6, 182, 212, 0.9);
    font-weight: 900;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    font-size: 2rem;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 28px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
    background: var(--white);
}

.stats-band {
    padding: 28px 0;
    background: var(--white);
    box-shadow: inset 0 -1px 0 var(--slate-200);
}

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

.stats-grid div {
    padding: 20px;
    border: 1px solid var(--cyan-100);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--white), var(--cyan-50));
}

.stats-grid strong {
    display: block;
    color: var(--cyan-700);
    font-size: 2rem;
    line-height: 1;
}

.stats-grid span {
    display: block;
    margin-top: 8px;
    color: var(--slate-500);
    font-weight: 700;
}

.section {
    padding: 64px 0;
}

.section-soft {
    background: linear-gradient(180deg, var(--white), var(--cyan-50));
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.section-link {
    color: var(--cyan-700);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    border-color: var(--cyan-200);
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--cyan-50);
}

.poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-chip {
    font-size: 0.82rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 9px;
    color: var(--slate-500);
    font-size: 0.78rem;
    font-weight: 800;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 0.9rem;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    font-size: 0.74rem;
}

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

.category-tile,
.category-panel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--slate-900);
    box-shadow: var(--shadow);
}

.category-tile img,
.category-panel img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img,
.category-panel:hover img {
    opacity: 0.76;
    transform: scale(1.06);
}

.category-tile span,
.panel-content {
    position: absolute;
    inset: auto 18px 18px 18px;
    z-index: 2;
    color: var(--white);
}

.category-tile strong,
.panel-content strong {
    display: block;
    font-size: 1.35rem;
}

.category-tile em,
.panel-content em,
.compact-card em {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
    font-size: 0.9rem;
}

.category-tile small,
.panel-content small {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.6;
}

.panel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(15, 23, 42, 0.94));
}

.ranking-strip,
.side-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.compact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: var(--white);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
    border-color: var(--cyan-200);
    transform: translateY(-2px);
}

.compact-card img {
    width: 58px;
    height: 78px;
    flex: 0 0 auto;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card strong {
    display: block;
    line-height: 1.35;
}

.compact-card em {
    margin-top: 5px;
    color: var(--slate-500);
}

.page-hero {
    position: relative;
    padding: 88px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 30%, rgba(34, 211, 238, 0.38), transparent 34%),
        linear-gradient(135deg, var(--slate-900), var(--cyan-700));
}

.page-hero.compact {
    padding: 72px 0;
}

.page-hero p:last-child {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
}

.filter-bar,
.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar input,
.search-box input {
    width: 100%;
    border: 2px solid var(--cyan-100);
    border-radius: 999px;
    padding: 14px 18px;
    outline: 0;
    background: var(--white);
}

.filter-bar input:focus,
.search-box input:focus {
    border-color: var(--cyan-400);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}

.search-meta {
    margin-bottom: 18px;
    color: var(--slate-500);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 540px;
    color: var(--white);
    background: var(--slate-900);
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px 1fr;
    align-items: center;
    gap: 44px;
    min-height: 540px;
    padding: 52px 0;
}

.detail-cover {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

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

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

.crumbs a:hover {
    color: var(--cyan-100);
}

.crumbs em {
    color: var(--white);
    font-style: normal;
}

.detail-one-line {
    max-width: 820px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
    line-height: 1.8;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.detail-meta-grid li {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.detail-meta-grid span {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
}

.detail-meta-grid strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.player-card,
.detail-block,
.side-card {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.72));
}

.player-overlay.is-hidden {
    display: none;
}

.play-icon {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 50%;
    background: var(--cyan-500);
    box-shadow: 0 18px 38px rgba(6, 182, 212, 0.34);
    font-size: 1.8rem;
}

.detail-block {
    margin-top: 22px;
    padding: 28px;
}

.detail-block h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

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

.detail-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.side-card {
    padding: 18px;
}

.side-list {
    grid-template-columns: 1fr;
}

.site-footer {
    margin-top: 40px;
    padding: 48px 0;
    color: var(--slate-500);
    background: var(--white);
    border-top: 1px solid var(--slate-200);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 28px;
}

.site-footer p {
    max-width: 560px;
    line-height: 1.8;
}

.site-footer strong,
.site-footer a {
    display: block;
}

.site-footer strong {
    margin-bottom: 12px;
    color: var(--slate-900);
}

.site-footer a {
    margin-top: 8px;
}

.site-footer a:hover {
    color: var(--cyan-700);
}

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--cyan-100);
        border-radius: 18px;
        background: var(--white);
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        border-radius: 12px;
    }

    .hero {
        height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding: 44px 0;
    }

    .hero-poster {
        width: min(230px, 72vw);
        margin: 0 auto;
    }

    .hero-control {
        display: none;
    }

    .stats-grid,
    .movie-grid,
    .catalog-grid,
    .category-grid,
    .category-panel-grid,
    .ranking-strip,
    .footer-grid,
    .detail-meta-grid,
    .detail-side {
        grid-template-columns: 1fr 1fr;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .detail-cover {
        width: min(260px, 78vw);
    }

    .filter-bar,
    .search-box,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }
}

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

    .stats-grid,
    .movie-grid,
    .catalog-grid,
    .category-grid,
    .category-panel-grid,
    .ranking-strip,
    .footer-grid,
    .detail-meta-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 42px 0;
    }

    .hero-copy h1,
    .detail-copy h1,
    .page-hero h1 {
        letter-spacing: -0.05em;
    }
}
