        :root {
            --bg-color: #000000;
            --bg-elevated: #141414;
            --accent: #e50914;
            --accent-hover: #f40612;
            --text-main: #ffffff;
            --text-muted: #b3b3b3;
            --card-bg: #181818;
            --radius-lg: 12px;
            --radius-md: 8px;
            --transition-fast: 0.2s ease;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background: var(--bg-color);
            color: var(--text-main);
            min-height: 100vh;
        }

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

        header {
            position: sticky;
            top: 0;
            z-index: 10;
            background: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.4), transparent);
            padding: 16px 1.5vw 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 800;
            letter-spacing: 0.08em;
            font-size: 1.1rem;
            text-transform: uppercase;
        }

        .logo-mark {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }

        .logo-text {
            display: flex;
            align-items: baseline;
            gap: 4px;
            font-weight: 900;
            letter-spacing: 0.05em;
        }

        .logo-kino {
            color: #ffffff; /* KinoFox белым */
        }

        .logo-media {
            color: #ff6a00; /* Media оранжевым */
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        /* язык + аккаунт блок */
        .header-right-tools{
            display: flex;
            align-items: center;
            gap: 12px;
        }

        nav {
            display: flex;
            gap: 18px;
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        nav a.nav-link {
            position: relative;
            padding-bottom: 2px;
        }

        nav a.nav-link::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 0;
            height: 2px;
            background: var(--accent);
            transition: width var(--transition-fast);
        }

        nav a.nav-link:hover {
            color: var(--text-main);
        }

        nav a.nav-link:hover::after {
            width: 100%;
        }

        nav a.nav-link.active {
            color: var(--text-main);
        }

        nav a.nav-link.active::after {
            width: 100%;
        }

        .lang-toggle {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 0.85rem;
            color: var(--text-muted);
            padding: 4px 8px;
            border-radius: 999px;
            background: rgba(0,0,0,0.6);
            border: 1px solid rgba(255,255,255,0.12);
        }

        .lang-btn {
            border: none;
            background: transparent;
            color: inherit;
            font: inherit;
            cursor: pointer;
            opacity: 0.6;
            padding: 0;
        }

        .lang-btn.active {
            opacity: 1;
            color: #ffffff;
        }

        .lang-sep {
            opacity: 0.4;
        }

        /* Аккаунт / авторизация в шапке */

        .header-account{
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 4px 10px 4px 4px;
            border-radius: 999px;
            background: #0b0b11;
            border: 1px solid rgba(255,255,255,0.14);
            font-size: 0.85rem;
            text-decoration: none;
            color: #ffffff;
            max-width: 180px;
            white-space: nowrap;
        }

        .header-account:hover{
            background: rgba(255,255,255,0.06);
        }

        .header-avatar{
            width: 28px;
            height: 28px;
            border-radius: 999px;
            background: #1d1d25;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            overflow: hidden;
            flex-shrink: 0;
        }

        .header-avatar img{
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .header-account-name{
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .btn-auth {
            padding: 7px 14px;
            border-radius: 999px;
            background: linear-gradient(135deg,#ff4b3c,#ff7a00);
            color: #000;
            font-size: 0.85rem;
            font-weight: 600;
            text-decoration: none;
            box-shadow: 0 10px 26px rgba(0,0,0,0.85);
            white-space: nowrap;
        }

        .btn-auth:hover {
            filter: brightness(1.05);
        }

        .page {
            padding: 0 1.5vw 40px;
        }

        .hero {
            position: relative;
            margin-top: -16px;
            padding-top: 70px;
            padding-bottom: 30px;
            display: grid;
            grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr);
            gap: 24px;
            align-items: center;
        }

        .hero-bg {
            position: absolute;
            inset: 0;
            z-index: -2;
            background: radial-gradient(circle at 10% 0%, #200, #000);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        .hero-overlay {
            position: absolute;
            inset: 0;
            z-index: -1;
            background: linear-gradient(to right,
                rgba(0,0,0,0.9),
                rgba(0,0,0,0.4),
                rgba(0,0,0,0.95)
            );
        }

        .hero-title {
            font-size: clamp(2.1rem, 3.4vw, 3rem);
            font-weight: 800;
            margin-bottom: 10px;
        }

        .hero-subtitle {
            font-size: 1rem;
            color: var(--text-muted);
            max-width: 560px;
            margin-bottom: 18px;
        }

        .hero-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 20px;
            font-size: 0.8rem;
        }

        .hero-tag {
            padding: 4px 10px;
            border-radius: 999px;
            background: rgba(0, 0, 0, 0.75);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

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

        .btn {
            padding: 10px 18px;
            border-radius: 999px;
            border: none;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
        }

        .btn-primary {
            background: var(--accent);
            color: #fff;
            box-shadow: 0 12px 30px rgba(0,0,0,0.6);
        }

        .btn-primary:hover {
            background: var(--accent-hover);
            transform: translateY(-1px);
            box-shadow: 0 14px 35px rgba(0,0,0,0.8);
        }

        .btn-ghost {
            background: rgba(0,0,0,0.75);
            color: var(--text-main);
            border: 1px solid rgba(255,255,255,0.18);
        }

        .btn-ghost:hover {
            background: rgba(255,255,255,0.06);
            transform: translateY(-1px);
        }

        .btn-search {
            padding-inline: 14px;
        }

        .btn-reset {
            font-weight: 500;
            font-size: 0.85rem;
        }

        .btn-reset.hidden {
            display: none;
        }

        .hero-badge {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 10px;
        }

        .hero-poster {
            justify-self: end;
            max-width: 360px;
            width: 100%;
            aspect-ratio: 2/3;
            border-radius: 24px;
            background: #000;
            position: relative;
            overflow: hidden;
            box-shadow: 0 28px 80px rgba(0,0,0,0.9);
        }

        .hero-poster-inner {
            position: absolute;
            inset: 1px;
            border-radius: 22px;
            background: radial-gradient(circle at top, #ff6a00, #e50914, #050509);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            padding: 18px 18px 20px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .hero-poster-title {
            font-weight: 700;
            font-size: 1.1rem;
        }

        .hero-poster-meta {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 4px;
        }

        .hero-poster-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8rem;
        }

        .badge-hd {
            padding: 4px 10px;
            border-radius: 999px;
            background: rgba(0,0,0,0.7);
            border: 1px solid rgba(255,255,255,0.15);
        }

        .age {
            padding: 4px 8px;
            border-radius: 6px;
            background: rgba(238, 238, 238, 0.12);
        }

        .section {
            margin-top: 6px;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-bottom: 8px;
        }

        .section-title {
            font-size: 1.1rem;
            font-weight: 600;
        }

        .section-sub {
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .search-wrapper {
            margin-top: 8px;
            margin-bottom: 14px;
            position: relative;
        }

        .search-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }

        .search-input {
            flex: 1 1 220px;
            padding: 9px 12px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.16);
            background: rgba(0,0,0,0.8);
            color: var(--text-main);
            font-size: 0.9rem;
            outline: none;
        }

        .search-input::placeholder {
            color: var(--text-muted);
        }

        .search-suggestions {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 4px;
            background: rgba(0,0,0,0.95);
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.12);
            max-height: 280px;
            overflow-y: auto;
            box-shadow: 0 18px 40px rgba(0,0,0,0.9);
            padding: 6px 0;
            z-index: 5;
            font-size: 0.85rem;
        }

        .search-suggestions.hidden {
            display: none;
        }

        .suggest-header {
            padding: 4px 12px;
            color: var(--text-muted);
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .suggest-item {
            padding: 6px 12px 7px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .suggest-item:hover {
            background: rgba(255,255,255,0.06);
        }

        .suggest-title {
            font-weight: 500;
        }

        .suggest-meta {
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 18px;
        }

        .card {
            background: var(--card-bg);
            border-radius: var(--radius-lg);
            overflow: hidden;
            cursor: pointer;
            position: relative;
            transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
        }

        .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 16px 40px rgba(0,0,0,0.9);
            filter: brightness(1.05);
        }

        .card-poster {
            position: relative;
            width: 100%;
            aspect-ratio: 2/3;
            background: radial-gradient(circle at 20% 0%, #ff6a00, #e50914, #050509);
            background-size: cover;
            background-position: center;
        }

        .card-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.9) 0, rgba(0,0,0,0.1) 60%);
        }

        .card-play {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity var(--transition-fast);
            font-size: 32px;
        }

        .card:hover .card-play {
            opacity: 1;
        }

        .card-body {
            padding: 8px 10px 11px;
        }

        .card-title {
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .card-meta {
            font-size: 0.75rem;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
        }

        .loader {
            text-align: center;
            padding: 16px 0 8px;
            font-size: 0.85rem;
            color: var(--text-muted);
        }

        .loader.hidden {
            display: none;
        }

        footer {
            padding: 20px 1.5vw 10px;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        /* ========== БУРГЕР-КНОПКА ========== */

        .burger {
            display: none;
            position: relative;
            width: 32px;
            height: 32px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.25);
            background: rgba(0,0,0,0.7);
            cursor: pointer;
            flex-shrink: 0;
        }

        .burger span,
        .burger::before,
        .burger::after {
            content: "";
            position: absolute;
            left: 8px;
            right: 8px;
            height: 2px;
            background: #ffffff;
            border-radius: 999px;
            transition:
                transform .25s ease,
                opacity .25s ease,
                top .25s ease,
                bottom .25s ease;
        }

        .burger span {
            top: 50%;
            transform: translateY(-50%);
        }

        .burger::before {
            top: 10px;
        }

        .burger::after {
            bottom: 10px;
        }

        .burger.open span {
            opacity: 0;
            transform: translateY(-50%) scaleX(0.4);
        }

        .burger.open::before {
            top: 50%;
            transform: translateY(-50%) rotate(45deg);
        }

        .burger.open::after {
            bottom: auto;
            top: 50%;
            transform: translateY(-50%) rotate(-45deg);
        }

        body.menu-open {
            overflow: hidden;
        }

        /* ========== МОБИЛЬНАЯ ВЕРСТКА ========== */

        @media (max-width: 900px) {
            header {
                padding: 10px 12px 6px;
                justify-content: space-between;
                background: linear-gradient(
                    to bottom,
                    rgba(0,0,0,0.96),
                    rgba(0,0,0,0.78),
                    rgba(0,0,0,0.4)
                );
                backdrop-filter: blur(10px);
            }

            .logo {
                font-size: 0.95rem;
                gap: 4px;
            }

            .logo-mark {
                width: 24px;
                height: 24px;
                font-size: 18px;
            }

            .burger {
                display: flex;
                align-items: center;
                justify-content: center;
                margin-left: auto;
                margin-right: 2px;
                z-index: 1001;
            }

            /* полноэкранное меню */
            .header-right {
                position: fixed;
                inset: 0;
                background:
                    radial-gradient(circle at top, #1a0808 0, #050509 50%),
                    radial-gradient(circle at bottom, #14040a 0, #050509 60%);
                padding: 80px 20px 24px;
                display: flex;
                flex-direction: column;
                gap: 24px;
                align-items: flex-start;

                transform: translateY(-100%);
                opacity: 0;
                pointer-events: none;
                transition: transform .25s ease, opacity .25s ease;
                z-index: 1000;
            }

            .header-right.open {
                transform: translateY(0);
                opacity: 1;
                pointer-events: auto;
            }

            header nav {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
                font-size: 0.95rem;
                width: 100%;
            }

            header nav a.nav-link {
                padding: 6px 0;
            }

            header nav a.nav-link::after {
                height: 1px;
            }

            .header-right-tools {
                flex-direction: column;
                align-items: stretch;
                gap: 14px;
                width: 100%;
            }

            .lang-toggle {
                align-self: flex-start;
            }

            .header-account,
            .btn-auth {
                width: 100%;
                justify-content: center;
                text-align: center;
            }

            .page {
                padding: 0 12px 26px;
            }

            .hero {
                margin-top: 0;
                padding-top: 70px;
                padding-bottom: 18px;
                display: flex;
                flex-direction: column;
                gap: 16px;
            }

            .hero-poster {
                order: -1;
                max-width: 220px;
                margin: 0 auto 4px;
                border-radius: 18px;
            }

            .hero-poster-inner {
                border-radius: 16px;
                padding: 12px 12px 14px;
            }

            .hero-title {
                font-size: 1.6rem;
                margin-bottom: 6px;
            }

            .hero-subtitle {
                font-size: 0.9rem;
                line-height: 1.4;
                margin-bottom: 10px;
            }

            .hero-tags {
                font-size: 0.7rem;
                gap: 6px;
                margin-bottom: 12px;
            }

            .hero-tag {
                padding: 3px 8px;
            }

            .hero-actions {
                flex-wrap: nowrap;
                gap: 8px;
            }

            .btn {
                padding: 8px 10px;
                font-size: 0.8rem;
            }

            .btn-primary {
                flex: 1;
                justify-content: center;
            }

            .hero-badge {
                font-size: 0.72rem;
                margin-top: 6px;
            }

            .section {
                margin-top: 6px;
            }

            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 2px;
            }

            /* --- ПОИСК НА МОБИЛЬНОМ --- */
            .search-wrapper {
                margin-top: 6px;
                margin-bottom: 10px;
            }

            .search-bar {
                flex-direction: column;
                align-items: stretch;
                gap: 6px;
                flex-wrap: nowrap;
            }

            .search-input {
                flex: 0 0 auto;
                width: 100%;
                max-width: 100%;
                font-size: 0.85rem;
                padding: 8px 11px;
            }

            .btn-search,
            .btn-reset {
                width: 100%;
                justify-content: center;
            }

            .search-suggestions {
                left: 0;
                right: 0;
                margin-top: 2px;
                border-radius: 12px;
                max-height: 220px;
                font-size: 0.8rem;
            }

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

            .card {
                border-radius: 12px;
            }

            .card-body {
                padding: 6px 7px 7px;
            }

            .card-title {
                font-size: 0.8rem;
            }

            .card-meta {
                font-size: 0.7rem;
            }

            footer {
                padding: 14px 12px 10px;
                font-size: 0.7rem;
                text-align: center;
            }
        }

        @media (max-width: 480px) {
            header {
                padding-inline: 8px;
            }

            .hero-title {
                font-size: 1.45rem;
            }

            .hero-poster {
                max-width: 190px;
            }

            .grid {
                gap: 8px;
            }

            .card-title {
                font-size: 0.76rem;
            }

            .card-meta {
                font-size: 0.66rem;
            }
        }

        @media (max-width: 767px) {
            .burger {
                width: 42px;
                height: 42px;
                border-color: rgba(255,255,255,0.14);
                background: rgba(8,10,18,0.88);
                box-shadow:
                    0 12px 24px rgba(0,0,0,0.4),
                    inset 0 1px 0 rgba(255,255,255,0.04);
            }

            .burger span,
            .burger::before,
            .burger::after {
                left: 10px;
                right: 10px;
            }

            .burger.open {
                position: fixed;
                top: max(12px, env(safe-area-inset-top));
                right: 12px;
                border-color: rgba(255,140,90,0.55);
                background: rgba(11,13,22,0.96);
                box-shadow:
                    0 14px 34px rgba(0,0,0,0.55),
                    0 0 0 1px rgba(255,140,90,0.22);
            }

            .header-right {
                padding:
                    max(68px, calc(env(safe-area-inset-top) + 56px))
                    12px
                    max(16px, env(safe-area-inset-bottom))
                    12px;
                justify-content: flex-start;
                align-items: stretch;
                gap: 12px;
                background: rgba(4,5,10,0.44);
                transform: none;
                transition: opacity .25s ease;
            }

            .header-right::before {
                content: "";
                position: absolute;
                inset: 0;
                background:
                    radial-gradient(80% 60% at 100% 0%, rgba(255,122,0,0.22) 0, transparent 62%),
                    radial-gradient(64% 52% at 0% 100%, rgba(229,9,20,0.18) 0, transparent 74%),
                    linear-gradient(180deg, rgba(4,5,10,0.68), rgba(4,5,10,0.9));
                backdrop-filter: blur(18px);
            }

            .header-right nav,
            .header-right-tools {
                position: relative;
                z-index: 1;
                width: min(84vw, 320px);
                margin-left: auto;
                opacity: 0;
                transform: translateX(24px) scale(0.98);
                transition: transform .28s ease, opacity .28s ease;
            }

            .header-right.open nav,
            .header-right.open .header-right-tools {
                opacity: 1;
                transform: none;
            }

            .header-right.open .header-right-tools {
                transition-delay: .05s;
            }

            .header-right nav {
                gap: 8px;
                padding: 18px 14px 14px;
                border-radius: 28px;
                background:
                    linear-gradient(180deg, rgba(17,20,31,0.97), rgba(8,10,18,0.95));
                border: 1px solid rgba(255,255,255,0.08);
                box-shadow:
                    0 24px 60px rgba(0,0,0,0.6),
                    inset 0 1px 0 rgba(255,255,255,0.04);
            }

            html[lang="ru"] .header-right nav::before {
                content: "Навигация";
            }

            html[lang="en"] .header-right nav::before {
                content: "Browse";
            }

            .header-right nav::before {
                display: block;
                margin-bottom: 8px;
                padding: 0 4px;
                font-size: 0.74rem;
                font-weight: 700;
                letter-spacing: 0.14em;
                text-transform: uppercase;
                color: rgba(255,255,255,0.42);
            }

            header .header-right nav a.nav-link {
                display: flex;
                align-items: center;
                width: 100%;
                min-height: 52px;
                padding: 0 16px;
                border-radius: 18px;
                background: rgba(255,255,255,0.02);
                border: 1px solid transparent;
                font-size: 1rem;
                font-weight: 600;
                color: rgba(255,255,255,0.74);
            }

            header .header-right nav a.nav-link::after {
                display: none;
            }

            header .header-right nav a.nav-link:hover {
                background: rgba(255,255,255,0.05);
                color: #ffffff;
            }

            header .header-right nav a.nav-link.active {
                color: #ffffff;
                background:
                    linear-gradient(135deg, rgba(255,75,60,0.24), rgba(255,122,0,0.18));
                border-color: rgba(255,140,90,0.34);
                box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
            }

            .header-right-tools {
                margin-top: auto;
                padding: 14px;
                border-radius: 24px;
                background:
                    linear-gradient(180deg, rgba(14,17,28,0.95), rgba(8,10,18,0.97));
                border: 1px solid rgba(255,255,255,0.08);
                box-shadow:
                    0 18px 44px rgba(0,0,0,0.52),
                    inset 0 1px 0 rgba(255,255,255,0.04);
            }

            .lang-toggle {
                align-self: stretch;
                justify-content: center;
                padding: 8px 12px;
                border-color: rgba(255,255,255,0.08);
                background: rgba(255,255,255,0.04);
            }

            .header-account,
            .btn-auth {
                min-height: 50px;
                border-radius: 16px;
                font-size: 0.94rem;
                font-weight: 700;
            }

            .header-account {
                max-width: none;
                padding: 8px 12px 8px 8px;
                justify-content: flex-start;
                background: rgba(255,255,255,0.04);
                border-color: rgba(255,255,255,0.08);
            }

            .btn-auth {
                padding: 12px 16px;
                box-shadow:
                    0 14px 28px rgba(229,9,20,0.22),
                    inset 0 1px 0 rgba(255,255,255,0.16);
            }
        }
        
/* logo avatar (img) */
.logo-mark.brand-logo{
  width: 28px;
  height: 28px;
  border-radius: 11px;
  overflow: hidden;
  padding: 2px;
  background: radial-gradient(circle at 20% 0%, #ff7a00 0, #ff3b3b 40%, #221320 100%);
  box-shadow: 0 0 18px rgba(255,90,40,.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark.brand-logo .brand-img{
  width: 100%;
  height: 100%;
  border-radius: 9px;        /* чуть меньше из-за padding */
  object-fit: cover;
  display: block;
}


    /* ===== Snow: поверх всего, но видно только сверху ===== */
#snowCanvas{
  position: fixed;
  inset: 0;
  z-index: 99999;       /* выше всего */
  pointer-events: none; /* не мешает кликам */
  opacity: .9;
  mix-blend-mode: screen;

  /* снег виден сверху, ниже плавно исчезает (не "весь экран") */
  -webkit-mask-image: linear-gradient(to bottom,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 35%,
    rgba(0,0,0,0) 75%
  );
  mask-image: linear-gradient(to bottom,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 35%,
    rgba(0,0,0,0) 75%
  );
}
