:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c31;
    --line: rgba(34, 211, 238, 0.22);
    --line-soft: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--text);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 10%, rgba(8, 145, 178, 0.18), transparent 36%),
        radial-gradient(circle at 88% 0%, rgba(34, 211, 238, 0.12), transparent 30%),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1240px, calc(100% - 32px));
    height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #031219;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.38);
}

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

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

.brand-text em {
    color: var(--cyan);
    font-size: 12px;
    font-style: normal;
    opacity: 0.86;
}

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

.nav-link,
.nav-more > span:first-child {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-more:hover > span:first-child {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.11);
}

.nav-more {
    position: relative;
}

.nav-drop {
    position: absolute;
    top: 46px;
    right: 0;
    width: 160px;
    padding: 10px;
    display: none;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
}

.nav-drop a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.nav-drop a:hover {
    background: rgba(34, 211, 238, 0.12);
    color: var(--cyan);
}

.nav-more:hover .nav-drop {
    display: block;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

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

main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 760px;
    padding-top: 118px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    inset: 92px -12vw auto auto;
    width: 42vw;
    height: 42vw;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    filter: blur(80px);
    pointer-events: none;
}

.hero-slides {
    position: relative;
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--shadow);
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.7) 52%, rgba(2, 6, 23, 0.25) 100%),
        var(--hero-image) center / cover no-repeat;
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.8) 100%);
}

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

.eyebrow,
.section-head span,
.rank-copy span {
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
    margin: 16px 0 8px;
    font-size: clamp(36px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-content h3 {
    margin: 10px 0 18px;
    color: #e0f2fe;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.1;
}

.hero-content p,
.page-hero p,
.rank-copy p,
.category-overview-head p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.82;
}

.hero-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: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
    color: #031219;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.22);
}

.btn.ghost,
.btn.line {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.66);
}

.btn.ghost:hover,
.btn.line:hover {
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.12);
}

.hero-poster {
    display: block;
    justify-self: end;
    width: min(360px, 100%);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.46);
    transform: rotate(2deg);
}

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

.hero-poster span {
    display: block;
    padding: 14px 18px;
    color: var(--cyan);
    font-weight: 800;
    background: rgba(15, 23, 42, 0.94);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    right: 34px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.48);
    cursor: pointer;
}

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

.home-search,
.search-panel,
.rank-strip,
.section-block,
.category-overview-card,
.prose-card,
.detail-card,
.player-shell {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
}

.home-search {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 460px);
    gap: 24px;
    align-items: center;
    margin: 36px 0 76px;
    padding: 28px;
}

.home-search h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3.5vw, 42px);
}

.home-search p {
    margin: 0;
    color: var(--muted);
}

.home-search-form,
.search-line {
    display: flex;
    gap: 10px;
}

.home-search-form input,
.search-line input,
.search-line select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(2, 6, 23, 0.6);
}

.search-line select {
    max-width: 170px;
}

.home-search-form input:focus,
.search-line input:focus,
.search-line select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.home-search-form button {
    min-width: 98px;
    border: 0;
    border-radius: 14px;
    color: #031219;
    background: var(--cyan);
    font-weight: 900;
    cursor: pointer;
}

.section-block {
    margin: 38px 0;
    padding: 28px;
}

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

.section-head h2,
.rank-copy h2,
.page-hero h1,
.category-overview-head h2,
.prose-card h2 {
    margin: 8px 0 0;
    font-size: clamp(25px, 3vw, 42px);
    line-height: 1.12;
}

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

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.9);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(34, 211, 238, 0.56);
    box-shadow: 0 18px 54px rgba(34, 211, 238, 0.12);
}

.large-card {
    grid-column: span 2;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.88) 100%);
}

.card-label,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 9px;
    color: #031219;
    background: rgba(34, 211, 238, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: auto;
    right: 12px;
    background: rgba(52, 211, 153, 0.94);
}

.play-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    color: #031219;
    background: var(--cyan);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 16px;
}

.card-body h2 {
    min-height: 48px;
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.36;
}

.card-body h2 a:hover {
    color: var(--cyan);
}

.card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.card-meta,
.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-meta span,
.detail-meta span,
.tag-row span {
    padding: 5px 8px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 12px;
    background: rgba(2, 6, 23, 0.42);
}

.rank-strip {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 28px;
    align-items: center;
    margin: 54px 0;
    padding: 32px;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px 15px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
}

.rank-row:hover {
    border-color: rgba(34, 211, 238, 0.55);
    color: var(--cyan);
}

.rank-row span {
    color: var(--cyan);
    font-weight: 900;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    padding: 56px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28)),
        var(--hero-image) center / cover no-repeat;
    opacity: 0.78;
}

.simple-hero::before {
    background:
        radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.88));
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.search-panel {
    margin: 28px 0;
    padding: 20px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.filter-tags button {
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.48);
    padding: 8px 12px;
    cursor: pointer;
}

.filter-tags button.active,
.filter-tags button:hover {
    color: #031219;
    border-color: var(--cyan);
    background: var(--cyan);
}

.movie-card.is-hidden {
    display: none;
}

.category-overview-list {
    display: grid;
    gap: 28px;
    margin: 36px 0;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 0.55fr 1fr;
    gap: 24px;
    padding: 26px;
}

.category-overview-head {
    align-self: center;
}

.detail-shell {
    padding-top: 100px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 18px 0 22px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 24px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--text);
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.24), transparent 30%),
        rgba(2, 6, 23, 0.34);
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 999px;
    color: #031219;
    background: var(--cyan);
    font-size: 34px;
    box-shadow: 0 0 48px rgba(34, 211, 238, 0.42);
}

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

.detail-card {
    overflow: hidden;
}

.detail-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.detail-card > div {
    padding: 22px;
}

.detail-card h1 {
    margin: 10px 0 12px;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.15;
}

.detail-card p {
    color: #cbd5e1;
    line-height: 1.75;
}

.detail-meta {
    margin: 18px 0 12px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 28px 0;
}

.prose-card {
    padding: 26px;
}

.prose-card p {
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.9;
}

.related-block {
    margin-bottom: 56px;
}

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

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 0.7fr;
    gap: 36px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

.footer-grid p,
.footer-links a {
    color: var(--muted);
    line-height: 1.8;
}

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

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid var(--line-soft);
    color: #64748b;
    font-size: 13px;
}

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

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

    .player-shell {
        min-height: 56vw;
    }
}

@media (max-width: 860px) {
    .nav-wrap {
        height: 66px;
    }

    .menu-toggle {
        display: block;
    }

    .site-menu {
        position: absolute;
        top: 66px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.97);
    }

    .site-menu.is-open {
        display: flex;
    }

    .nav-link,
    .nav-more > span:first-child {
        justify-content: center;
    }

    .nav-more {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-top: 92px;
    }

    .hero-slides {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 34px 24px 80px;
    }

    .hero-poster {
        justify-self: start;
        width: 230px;
        transform: none;
    }

    .home-search,
    .rank-strip,
    .category-overview-card,
    .footer-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .search-line,
    .home-search-form {
        flex-direction: column;
    }

    .search-line select {
        max-width: none;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .large-card {
        grid-column: span 2;
    }

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

    .page-hero {
        padding: 34px 24px;
    }
}

@media (max-width: 560px) {
    main,
    .footer-grid,
    .footer-bottom,
    .nav-wrap {
        width: min(100% - 22px, 1240px);
    }

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

    .brand-text em {
        display: none;
    }

    .hero-slides {
        min-height: 650px;
        border-radius: 22px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 36px;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .large-card {
        grid-column: auto;
    }

    .section-block,
    .search-panel,
    .rank-strip,
    .home-search {
        padding: 18px;
    }

    .page-shell,
    .detail-shell {
        padding-top: 86px;
    }

    .player-shell {
        min-height: 58vw;
        border-radius: 18px;
    }
}
