/* /dist/styles.css */
:root{
  --c-bg:#06010c;
  --c1:#8A3FFC; /* purple */
  --c2:#FF00FF; /* neon magenta */
  --c3:#ffffff;
  --border: rgba(255,255,255,.12);
  --border-2: rgba(255,255,255,.15);
  --soft: rgba(255,255,255,.06);
  --soft-2: rgba(255,255,255,.08);
  --text-muted: rgba(255,255,255,.70);
  --text-dim: rgba(255,255,255,.60);
  --grad: linear-gradient(110deg,var(--c1),var(--c2));
}

* { box-sizing: border-box }
html, body { height:100% }
body{
  margin:0;
  color:#fff;
  background:var(--c-bg);
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container{ width:100%; max-width: 1120px; margin:0 auto; padding:0 24px }


/* Topbar */
.topbar{
  position: sticky; top:0; z-index:30;
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,.3);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.topbar__inner{ display:flex; align-items:center; justify-content:space-between; padding:12px 0 }
.brand{ font-family: Orbitron, Poppins, system-ui; font-weight:900; font-size:20px; color:#fff; text-decoration:none }
.nav{ display:flex; gap:16px; align-items:center }
.nav__link{ color: rgba(255,255,255,.85); text-decoration:none; font-size:14px }
.nav__link:hover{ color:#fff }
.nav__muted{ color: rgba(255,255,255,.6) }
.controls{ display:flex; gap:8px; align-items:center }
.select, .input, .textarea{
  background: transparent; color:#fff; border:1px solid var(--border-2);
  border-radius:12px; padding:8px 10px; font:inherit; outline:none
}
.input::placeholder, .textarea::placeholder{ color:rgba(255,255,255,.4) }
.textarea{ resize:vertical }

/* Chips / small pill buttons */
.chip{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:12px;
  background: rgba(255,255,255,.08);
  border:1px solid var(--border-2);
  color:#fff; font-size:12px; cursor:pointer
}
.chip .i{ font-size:12px }

 .controls .chip,
 .controls .select{
   height:34px;
   padding:6px 12px;
 }

 .cart-count{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   min-width:18px;
   height:18px;
   padding:0 6px;
   margin-left:2px;
   border-radius:999px;
   background: linear-gradient(110deg, var(--c1), var(--c2));
   color:#000;
   font-weight:800;
   font-size:11px;
   line-height:18px;
 }

 .cart-count.is-zero{ display:none; }

/* Cards */
.card{
  position:relative; border:1px solid var(--border); background:var(--soft);
  border-radius:24px; padding:20px; backdrop-filter: blur(6px);
  box-shadow: 0 0 30px rgba(255,0,255,.08);
}
.card--thin{ padding:16px }

/* Section */
.section{ padding: 64px 0 }
.section--tight{ padding: 32px 0 }
.kicker{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px; font-size:12px;
  background: rgba(255,255,255,.12);
  border:1px solid var(--border)
}
.h2{
  margin:16px 0 0; text-align:center;
  font-family: Orbitron, Poppins, system-ui; font-weight:900;
  font-size:clamp(28px, 3.8vw, 40px);
}
.sub{ margin:8px auto 0; text-align:center; color:var(--text-muted); max-width: 720px }

/* Buttons */
.btn{
  position:relative; display:inline-flex; align-items:center; justify-content:space-between; gap:8px;
  padding:12px 20px; border-radius:18px; font-weight:700; color:#fff; cursor:pointer;
  border:2px solid transparent; transition: transform .15s ease;
  background: var(--grad) padding-box, linear-gradient(110deg,transparent,transparent) border-box;
  box-shadow: 0 0 40px rgba(255,0,255,.25);
}
.btn:hover{ transform: scale(1.02) }
.btn:active{ transform: scale(.99) }
.btn__shine{
  position:absolute; inset:0; border-radius:18px; pointer-events:none; opacity:.8;
  -webkit-mask-image: linear-gradient(60deg,transparent,rgba(255,255,255,0.7),transparent);
  mask-image: linear-gradient(60deg,transparent,rgba(255,255,255,0.7),transparent);
  animation: shimmer 1.8s ease-in-out infinite alternate;
  background: linear-gradient(90deg,rgba(255,255,255,0.1),rgba(255,255,255,0.35),rgba(255,255,255,0.1));
}
.btn__glow{ position:absolute; inset:-4px; border-radius:24px; filter:blur(20px); opacity:.6; background:var(--grad); pointer-events:none }

/* Inputs Row */
.input-row{ display:flex; gap:8px; align-items:center }
.inline{ display:inline-flex; gap:8px; align-items:center }

/* Grid helpers */
.grid{ display:grid; gap:24px }
.grid-3{ grid-template-columns: repeat(3, minmax(0,1fr)) }
.grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)) }
.grid-4{ grid-template-columns: repeat(4, minmax(0,1fr)) }
@media (max-width: 960px){
  .grid-3{ grid-template-columns: 1fr }
  .grid-2{ grid-template-columns: 1fr }
  .grid-4{ grid-template-columns: repeat(2, minmax(0,1fr)) }
}
@media (min-width: 961px) and (max-width: 1200px){
  .grid-4{ grid-template-columns: repeat(3, minmax(0,1fr)) }
}

/* Hero */
.hero{
  min-height:84vh; display:grid; place-items:center; text-align:center; position:relative
}
.hero__aura{ position:absolute; inset:0; pointer-events:none; background:
  radial-gradient(ellipse at center, rgba(138,63,252,.25), rgba(0,0,0,0) 60%)}

/* Logo */
.logo-wrap{ position:relative; user-select:none; width:150px; margin:0 auto }
.logo-wrap .blur{ position:absolute; inset:-24px; z-index:-1; filter: blur(24px);
  background: radial-gradient(ellipse at center, rgba(255,0,255,.18), rgba(0,0,0,0)); }

/* Partners strip */
.strip{ padding:16px 0; border-top:1px solid rgba(255,255,255,.1); border-bottom:1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.35) }
.badge{ padding:6px 10px; border-radius:8px; background: var(--soft); margin:4px; display:inline-flex; align-items:center; gap:6px }
.badge .i{ font-size:14px }

/* Little helpers */
.muted{ color: var(--text-muted) }
.dim{ color: var(--text-dim) }
.center{ text-align:center }
.mt-8{ margin-top:32px } .mt-6{ margin-top:24px } .mt-4{ margin-top:16px } .mt-2{ margin-top:8px }
.mb-8{ margin-bottom:32px }
.w-full{ width:100% }

/* Slider */
.range{ width:200px }

/* Footer */
.footer{ position:relative; margin-top:48px; border-top:1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.4) }
.footer__inner{ display:flex; flex-direction:column; gap:16px; padding:20px 0 }
@media (min-width: 640px){ .footer__inner{ flex-direction:row; justify-content:space-between; align-items:center } }
.footer__nav{ display:flex; gap:20px; flex-wrap:wrap }
.footer__link{ color:var(--text-muted); text-decoration:none }
.footer__link:hover{ color:#fff }
.glows{ position:fixed; inset:0; z-index:-1; opacity:.7; pointer-events:none }
.glow{ position:absolute; border-radius:9999px; filter: blur(48px) }
.glow--1{ top:-128px; left:-128px; width:320px; height:320px; background: radial-gradient(circle at center, var(--c2), transparent 60%) }
.glow--2{ bottom:-160px; right:-160px; width:380px; height:380px; background: radial-gradient(circle at center, var(--c1), transparent 60%) }

/* Accordion */
.ac-item{ border:1px solid var(--border); background: var(--soft); border-radius:18px; overflow:hidden }
.ac-head{ width:100%; text-align:left; padding:14px 16px; display:flex; justify-content:space-between; align-items:center; cursor:pointer; background:transparent; color:#fff; border:0 }
.ac-body{ padding:0 16px 16px 16px; color: var(--text-muted); font-size:14px; display:none }
.ac-item.open .ac-body{ display:block }

/* Reveal on view */
.reveal{ opacity:0; transform: translateY(10px) scale(.98); transition: opacity .5s ease, transform .5s ease }
.reveal.is-in{ opacity:1; transform:none }

/* Animations */
@keyframes shimmer{ 0%{ transform:translateX(-35%) } 100%{ transform:translateX(35%) } }

/* Utility labels & chips */
.tag{ font-size:12px; padding:4px 8px; border-radius:999px; background: var(--soft-2); border:1px solid var(--border-2) }

/* Modal */
.modal-mask{ position:fixed; inset:0; background: rgba(0,0,0,.6); z-index:50; display:grid; place-items:center; padding:24px }
.modal{ max-width:640px; width:100%; border-radius:24px; border:1px solid var(--border); background: var(--soft); padding:20px; position:relative }
.modal__close{ position:absolute; right:12px; top:12px; background:transparent; border:0; color:#fff; cursor:pointer }

 /* Toast (non-blocking notifications) */
 #toast-root{
   position: fixed;
   inset: 0;
   z-index: 2000;
   pointer-events: none;
   display: grid;
   place-items: center;
   padding: 24px;
 }
 .toast{
   pointer-events: none;
   max-width: min(520px, 92vw);
   padding: 12px 14px;
   border-radius: 14px;
   border: 1px solid rgba(255,255,255,.18);
   background: rgba(10,0,20,.80);
   backdrop-filter: blur(10px);
   box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 0 18px rgba(255,0,255,.18);
   color: #fff;
   font-size: 13px;
   line-height: 1.35;
   opacity: 0;
   transform: translateY(8px) scale(.98);
   animation: toastInOut 1.2s ease forwards;
 }
 .toast--error{
   border-color: rgba(255, 68, 68, 0.45);
   box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 0 18px rgba(255, 68, 68, .22);
 }
 .toast--success{
   border-color: rgba(80, 255, 170, 0.35);
 }
 @keyframes toastInOut{
   0%{ opacity:0; transform: translateY(10px) scale(.98); }
   12%{ opacity:1; transform: translateY(0) scale(1); }
   82%{ opacity:1; transform: translateY(0) scale(1); }
   100%{ opacity:0; transform: translateY(-6px) scale(.99); }
 }

 /* Inline field error + shake */
 .input.is-error{
   border-color: rgba(255, 68, 68, 0.65) !important;
   box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.15), 0 0 18px rgba(255, 68, 68, 0.18);
 }
 .label.is-error{ color: #ff6b6b !important; }
 .shake{ animation: shakeX .28s ease-in-out; }
 @keyframes shakeX{
   0%{ transform: translateX(0); }
   25%{ transform: translateX(-6px); }
   50%{ transform: translateX(6px); }
   75%{ transform: translateX(-4px); }
   100%{ transform: translateX(0); }
 }

 .cart-modal{
   max-width: 820px;
 }

 .cart-head{
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:12px;
   margin-bottom:12px;
 }

 .cart-title{
   font-weight: 900;
   font-family: Orbitron, Poppins, system-ui;
   font-size: 18px;
 }

 .cart-list{
   display:flex;
   flex-direction:column;
   gap:12px;
   margin-top:12px;
 }

 .cart-item{
   display:grid;
   grid-template-columns: 1.6fr 0.7fr auto;
   gap:12px;
   align-items:center;
   padding:12px;
   border-radius:16px;
   border:1px solid var(--border);
   background: rgba(255,255,255,.05);
 }

 .cart-item__title{ font-weight:800; }
 .cart-item__meta{ font-size:12px; color: var(--text-muted); margin-top:2px; }
 .cart-item__sum{ font-weight:900; text-align:right; }

 .qty{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   gap:8px;
   padding:6px;
   border-radius:14px;
   border:1px solid var(--border);
   background: rgba(0,0,0,.18);
 }

 .qty__btn{
   width:34px;
   height:34px;
   border-radius:12px;
   border:1px solid var(--border-2);
   background: rgba(255,255,255,.06);
   color:#fff;
   font-weight:900;
   cursor:pointer;
 }

 .qty__btn:disabled{
   opacity:.45;
   cursor:not-allowed;
 }

 .qty__input{
   width:64px;
   height:34px;
   border-radius:12px;
   border:1px solid var(--border-2);
   background: transparent;
   color:#fff;
   text-align:center;
   font:inherit;
   outline:none;
 }

 .qty.is-bump{
   animation: qtyBump .18s ease;
 }

 @keyframes qtyBump{
   from{ transform: scale(1); }
   50%{ transform: scale(1.04); }
   to{ transform: scale(1); }
 }

 .cart-foot{
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:12px;
   margin-top:14px;
   padding-top:12px;
   border-top:1px dashed var(--border);
 }

 .cart-total{
   display:flex;
   flex-direction:column;
   gap:4px;
 }

 .cart-total__label{ font-size:12px; color: var(--text-muted); }
 .cart-total__value{ font-size:18px; font-weight:900; }

 .cart-empty{
   padding:18px;
   border:1px dashed var(--border);
   border-radius:16px;
   text-align:center;
   color: var(--text-muted);
 }

 @media (max-width: 720px){
   .cart-item{
     grid-template-columns: 1fr;
     text-align:left;
   }
   .cart-item__price,
   .cart-item__sum{ text-align:left; }
   .cart-foot{ flex-direction:column; align-items:stretch; }
 }

/* Form blocks */
.label{ color: var(--text-muted); font-size: 13px }
.block{ margin-top:8px }
.checkbox-row{ margin-top:8px; display:flex; gap:8px; align-items:center; font-size:14px }

/* Small helpers */
.inline-b{ display:inline-block }
.nowrap{ white-space:nowrap }

/* --- Game card as link: keep neon look, no blue link --- */
a.card { color: inherit; text-decoration: none; display: block; }
a.card:focus { outline: none; }

/* Neon hover for cards */
.card-hoverable { transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hoverable:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 26px rgba(255,0,255,.28);
}

/* Image zoom on hover (used on game tiles) */
.card .thumb { transition: transform .2s ease; }
.card-hoverable:hover .thumb { transform: scale(1.04); }

/* чтобы карточки-ссылки не были синими */
a.card { color: inherit; text-decoration: none; display: block; }
a.card:focus { outline: none; }

/* неоновый ховер карточек */
.card-hoverable { transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hoverable:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 26px rgba(255,0,255,.28);
}

/* слайдеры цены рядом помещаются */
.range{ width:160px }
@media (max-width: 720px){ .range{ width:120px } }

.select {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 12px;

  padding: 6px 34px 6px 12px;
  transition: all .25s ease;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.75) 50%),
    linear-gradient(135deg, rgba(255,255,255,.75) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.select:hover, .select:focus {
  border-color: #ff00ff;
  box-shadow: 0 0 10px #ff00ff44;
}
.neon-select {
  position: relative;
  display: inline-block;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}
/* ===== NeonSelect styles ===== */
.neon-select__btn{
  display:flex; align-items:center; gap:8px;
  padding:6px 12px; border-radius:12px; cursor:pointer;
  background: rgba(255,255,255,.06);
  border:1px solid var(--border-2);
  color:#fff; transition: box-shadow .2s ease, border-color .2s ease, transform .1s ease;
}
.neon-select__btn:hover, .neon-select__btn:focus{
  border-color:#ff00ff; box-shadow:0 0 12px #ff00ff55, inset 0 0 10px #8A3FFC22;
}
.neon-select__caret{ opacity:.85; }
.neon-select.is-open .neon-select__btn{ border-color:#ff00ff; box-shadow:0 0 16px #ff00ff77; }

.neon-select__list{
  position:absolute; z-index:30; top:calc(100% + 6px); left:0; min-width: 180px; max-height: 260px; overflow:auto;
  padding:6px; margin:0; list-style:none;
  background: rgba(10,0,20,.85);
  border:1px solid var(--border); border-radius:14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 18px #ff00ff33;
  backdrop-filter: blur(6px);
  display:none;
}
.neon-select.is-open .neon-select__list{ display:block; }

.neon-select__option{
  padding:8px 10px; border-radius:10px; cursor:pointer; color:#fff; white-space:nowrap;
  transition: background .15s ease, box-shadow .15s ease;
}
.neon-select__option.is-active,
.neon-select__option:hover{
  background: linear-gradient(110deg, var(--c1), var(--c2));
  color:#000; box-shadow: inset 0 0 0 1px #ffffffaa;
}
.neon-select__option.is-selected{
  outline:1px solid #ffffff66;
}

 .controls .neon-select__btn{ height:34px; }
/* Базовые токены, если их нет */
:root{
  --border: rgba(255,255,255,.15);
  --soft: rgba(255,255,255,.06);
  --text-dim: #bdbbd4;
  --grad: linear-gradient(110deg, #8A3FFC, #FF00FF);
}

/* Кнопка из твоего набора, если вдруг "нет стиля" — подстрахуемся */
.btn{
  position:relative; display:inline-flex; align-items:center; gap:8px;
  padding:10px 14px; border-radius:14px; border:1px solid var(--border);
  background: rgba(255,255,255,.08); color:#fff; cursor:pointer;
  transition: box-shadow .2s, border-color .2s, transform .08s;
}
.btn:hover{ border-color:#ff00ff; box-shadow:0 0 12px #ff00ff55, inset 0 0 10px #8A3FFC22; }
.btn:active{ transform: translateY(1px); }

.dim{ color: var(--text-dim); }

/* Закреплённая карточка справа */
#sticky-host{
  position: fixed;
  right: 24px;
  top: 96px;
  width: min(320px, 40vw);
  z-index: 50;
}
.sticky-card{
  background: rgba(10,0,20,.85);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 18px #ff00ff33;
  padding: 14px;
  backdrop-filter: blur(6px);
}
.sticky-title{
  font-weight: 800; margin-bottom: 8px;
}
.sticky-line{
  display:flex; align-items:center; justify-content:space-between;
  padding: 6px 0; border-top: 1px dashed var(--border);
}
.sticky-line:first-of-type{ border-top: 0; }
.sticky-key{ color: var(--text-dim); font-size: 12px; }
.sticky-val{ font-weight: 700; }
.sticky-hint{
  margin-top: 8px; font-size: 11px; color: var(--text-dim);
}

/* На узких экранах убираем фикс, чтобы не перекрывать контент */
@media (max-width: 980px){
  #sticky-host{
    position: static; width:auto; right:auto; top:auto; margin-top:12px;
  }
}
/* ===================== MOBILE ADAPTATION for SPA ===================== */
:root{
  --touch-pad: 12px;
}

img, video { max-width: 100%; height: auto; }

/* Базовые сетки — не ломают существующее */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

.card { border-radius: 16px; }

/* -------- Планшеты -------- */
@media (max-width: 1024px){
  .grid-4 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero .h2 { font-size: clamp(28px, 4.5vw, 42px); }
  .container { padding-left: 16px; padding-right: 16px; }
}

/* -------- Телефоны -------- */
@media (max-width: 720px){
  /* Сетки */
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid { gap: 12px; }

  /* Заголовки */
  .h2 { font-size: clamp(24px, 7vw, 32px); line-height: 1.15; }
  .sub { font-size: 14px; }

  /* Герой */
  .hero { padding-top: 24px; padding-bottom: 12px; }
  .hero .container { text-align: center; }
  .logo-wrap { transform: scale(.9); }

  /* Карточки */
  .card { padding: 14px; }
  .card .thumb { width: 48px; height: 48px; border-radius: 12px; }

  /* Формы */
  .input, .select, .textarea {
    font-size: 16px; /* без авто-зума на iOS */
    min-height: 44px;
  }
  .input-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .input-row.block { flex-direction: column; align-items: stretch; }
  .checkbox-row { gap: 10px; }

  /* Кнопки/бейджи */
  .btn, .chip { min-height: 44px; padding: 10px 14px; border-radius: 12px; }
  .badge, .tag, .chip { font-size: 12px; }

  /* Плитки пакетов (страница #game) */
  #packs.grid { grid-template-columns: 1fr; }
  .pack { padding: 12px; border-radius: 14px; }
  .pack__name { font-size: 14px; }
  .pack__price { font-weight: 800; }

  /* Лейауты блока данных (страница #game/#checkout) */
  .label { font-size: 12px; }
  .inline { flex-wrap: wrap; gap: 10px !important; }
  .w-full { width: 100%; }

  /* ---------- Модалка (та, что создаётся в /dist/app.js) ---------- */
  .modal-mask{
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
    display: flex; align-items: flex-end; justify-content: center;
    z-index: 1000;
  }
  .modal{
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    background: rgba(20, 10, 30, .98);
    border: 1px solid var(--border, rgba(255,255,255,.12));
    padding: 16px;
    box-shadow: 0 -6px 30px rgba(0,0,0,.35);
  }
  .modal__close{
    border: 0; width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,.06); color: #fff; font-size: 20px; cursor: pointer;
  }
  .modal .dim{ font-size: 12px; }
  .modal .inline{ display:grid; grid-template-columns: 1fr; gap: 10px; }
  .modal .btn, .modal .chip { width: 100%; justify-content: center; }

  .kaspi-badge{ background: #ee2e2f; color:#fff; padding: 2px 6px; border-radius: 8px; }

  /* Футер */
  .foot-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer .copy{ font-size: 12px; text-align: center; margin-top: 12px; }

  /* Кастомный селект NeonSelect */
  .neon-select{ width: 100%; }
  .neon-select__btn{ width: 100%; justify-content: space-between; }
  .neon-select__list{ max-height: 220px; min-width: 100%; }
}

/* Очень маленькие устройства */
@media (max-width: 360px){
  .h2 { font-size: 22px; }
  .card { padding: 12px; }
  .btn, .chip { padding: 10px 12px; }
}

/* Блокировка скролла, когда модалка открыта */
html.has-modal, html.has-modal body { overflow: hidden !important; }
/* ==== #game: на телефоне блок "Данные/Оплата" наверх ==== */
@media (max-width: 720px){
  /* Находим именно тот двухколоночный .grid, внутри которого есть #packs (список пакетов) */
  #view .section .container > .grid:has(#packs){
    display: flex;              /* вместо grid */
    flex-direction: column;     /* в колонку */
    gap: 12px;
  }
  /* Второй дочерний (правая колонка с карточкой данных) — ставим первым */
  #view .section .container > .grid:has(#packs) > :nth-child(2){
    order: -1;
  }
  /* Убираем липкость, чтобы карточка встала ровно вверху */
  #view .section .container > .grid:has(#packs) > :nth-child(2) .card{
    position: static !important;
    top: auto !important;
  }
}
/* === Cosmic Pay Modal (scoped) === */
.modal-mask.cosmic{
  position: fixed; inset:0; z-index: 80;
  display:grid; place-items:center;
  background: radial-gradient(50% 80% at 20% 20%, rgba(255,0,204,.10), transparent 70%),
              radial-gradient(40% 60% at 80% 70%, rgba(42,130,255,.12), transparent 60%),
              rgba(0,0,0,.55);
  backdrop-filter: blur(2px) saturate(120%);
}
.modal-mask.cosmic .pay-tab{
  width:min(720px,92vw); position:relative; overflow:hidden;
  border-radius:24px; border:1px solid rgba(255,255,255,.22);
  background: radial-gradient(120% 120% at 10% 10%, rgba(255,255,255,.14), rgba(255,255,255,.06) 40%, rgba(255,255,255,.04) 70%);
  box-shadow: 0 10px 30px rgba(123,0,255,.35), 0 10px 40px rgba(255,60,205,.25);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
}
.modal-mask.cosmic .pay-tab::before{
  content:""; position:absolute; inset:-2px; border-radius:26px; z-index:-1;
  background: conic-gradient(from 180deg at 50% 50%,
    rgba(106,0,255,.50), rgba(27,182,255,.35), rgba(255,58,205,.55), rgba(154,77,255,.45), rgba(106,0,255,.50));
  filter: blur(18px) saturate(130%); opacity:.7; animation: rotateGlow 18s linear infinite;
}
@keyframes rotateGlow { to { transform: rotate(360deg); } }

.modal-mask.cosmic #payStars,
.modal-mask.cosmic #payNebula{
  position:absolute; inset:0; z-index:0;
}
.modal-mask.cosmic #payNebula::before,
.modal-mask.cosmic #payNebula::after{
  content:""; position:absolute; inset:-10%; pointer-events:none; z-index:0;
  background: radial-gradient(45vw 35vh at 20% 30%, rgba(255,80,220,.12), transparent 70%),
              radial-gradient(40vw 30vh at 70% 65%, rgba(108,0,255,.18), transparent 75%),
              radial-gradient(35vw 25vh at 85% 20%, rgba(0,180,255,.10), transparent 70%);
  filter: blur(40px) saturate(120%); animation: slowDrift 38s linear infinite alternate;
}
.modal-mask.cosmic #payNebula::after{ filter: blur(60px) saturate(120%); opacity:.7; animation-duration:56s; }
@keyframes slowDrift { to { transform: translate3d(2%, -1%, 0) scale(1.05); } }

.modal-mask.cosmic .header{
  position:relative; z-index:2; padding:28px 28px 8px;
}
.modal-mask.cosmic .title{
  font-weight:800; letter-spacing:.3px; font-size: clamp(24px, 4vw, 34px);
  color:#dff5ff; text-shadow:
    0 0 10px rgba(154,77,255,.75),
    0 0 26px rgba(255,58,205,.75),
    0 0 48px rgba(27,182,255,.35);
}
.modal-mask.cosmic .subtitle{ opacity:.9; margin-top:8px; color:#d7eaff; }
.modal-mask.cosmic .order{ display:flex; gap:10px; align-items:center; margin-top:12px; font-size:14px; color:#bfe8ff; }
.modal-mask.cosmic .close-x{
  position:absolute; top:12px; right:12px; border:0; background:rgba(255,255,255,.08);
  color:#fff; width:36px; height:36px; border-radius:12px; cursor:pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.20);
}
.modal-mask.cosmic .close-x:hover{ box-shadow: 0 0 16px rgba(255,58,205,.45); }

.modal-mask.cosmic .chips{ display:flex; gap:10px; padding:0 24px 8px; flex-wrap:wrap; position:relative; z-index:2; }
.modal-mask.cosmic .chip{
  border-radius:999px; padding:6px 10px; font-size:12px; color:#d8e6ff;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px);
}

.modal-mask.cosmic .actions{
  position:relative; z-index:2; display:grid; grid-template-columns: 1fr 1fr; gap:14px; padding:22px 24px 28px;
}
.modal-mask.cosmic .btn{
  position:relative; border:0; outline:none; cursor:pointer; border-radius:16px;
  padding:18px 20px; font-weight:700; font-size:clamp(14px,2.4vw,18px); color:white; letter-spacing:.2px;
  background: linear-gradient(135deg, rgba(106,0,255,.95), rgba(255,58,205,.95));
  box-shadow: 0 8px 24px rgba(106,0,255,.40), 0 16px 36px rgba(255,58,205,.35), inset 0 0 0 1px rgba(255,255,255,.15);
  transition: transform .12s ease, box-shadow .15s ease, filter .2s ease; filter: saturate(110%);
  text-shadow: 0 0 8px rgba(255,255,255,.6), 0 0 18px rgba(255,58,205,.6);
}
.modal-mask.cosmic .btn::after{
  content:""; position:absolute; inset:-2px; border-radius:18px; z-index:-1;
  background: radial-gradient(120% 120% at 10% 10%, rgba(255,255,255,.35), rgba(255,255,255,0) 50%);
  filter: blur(12px); opacity:.55;
}
.modal-mask.cosmic .btn:hover{ transform: translateY(-2px); box-shadow: 0 0 24px rgba(255,60,205,.56), 0 0 48px rgba(106,0,255,.45); }
.modal-mask.cosmic .btn:active{ transform: translateY(1px) scale(.995); box-shadow: 0 6px 16px rgba(106,0,255,.35), 0 10px 20px rgba(255,58,205,.28); }
.modal-mask.cosmic .btn:focus-visible{ box-shadow: 0 0 0 3px rgba(27,182,255,.7), 0 0 24px rgba(255,60,205,.56); }
.modal-mask.cosmic .btn.kaspi{ background: linear-gradient(135deg, rgba(102,0,255,.95), rgba(255,48,200,.95)); }
.modal-mask.cosmic .btn.telegram{ background: linear-gradient(135deg, rgba(55,120,255,.95), rgba(185,96,255,.95)); }

.modal-mask.cosmic .foot{
  position:relative; z-index:2; padding:0 24px 24px; color:#a8dcff; opacity:.85; font-size:12px;
}
.modal-mask.cosmic .sparkle{
  position:absolute; width:6px; height:6px; border-radius:50%;
  background: radial-gradient(circle, #fff, rgba(255,255,255,0) 70%);
  filter: drop-shadow(0 0 6px rgba(255,255,255,.9));
  animation: twinkle 3.4s ease-in-out infinite; pointer-events:none; z-index:2;
}
@keyframes twinkle { 0%,100%{transform:scale(.6);opacity:.35} 50%{transform:scale(1.1);opacity:1} }

@media (max-width:560px){
  .modal-mask.cosmic .actions{ grid-template-columns:1fr; }
}
 :root{
      /* ПАЛИТРА В СТИЛЕ СКРИНА */
      --bg-1:#2a0b3b;           /* фоновый тёмно-пурпурный */
      --bg-2:#3a0f53;           /* средний */
      --violet-1:#6A0DAD;       /* основной неон */
      --violet-2:#9b34ef;       /* дополнительный неон/ховер */
      --pink:#b73cff;           /* акцент как на кнопках */
      --text:#ffffff;
      --muted:#d8c9f2;
      --glass: rgba(255,255,255,.06);
      --glass-border: rgba(255,255,255,.12);
      --kaspi:#E41E26;          /* фирменный красный */
      --radius:16px;
      --gap:28px;
    }

    *{box-sizing:border-box}
    html,body{height:100%}
    body{
      margin:0;
      font-family:"Montserrat",system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
      color:var(--text);
      background: radial-gradient(1200px 700px at 20% -10%, #7b1fa84d 0%, transparent 60%),
                  radial-gradient(1200px 700px at 120% 10%, #6a0dad3d 0%, transparent 60%),
                  linear-gradient(180deg, var(--bg-2), var(--bg-1));
    }

    @keyframes drift{from{background-position:0 0}to{background-position:-600px 600px}}

    /* ===== FOOTER ===== */
    .site-footer{
      position:relative;
      overflow:hidden;
      border-top:1px solid rgba(255,255,255,.09);
      margin-top:40px;
      background:
        radial-gradient(1000px 600px at 50% -10%, #b73cff30 0%, transparent 65%),
        linear-gradient(180deg, #2b0a3d 0%, #220833 100%);
    }
    .site-footer::before{
      /* мягкая неоновая полоска сверху */
      content:""; position:absolute; left:0; right:0; top:0; height:2px;
      background:linear-gradient(90deg, transparent, var(--violet-2), transparent);
      filter:drop-shadow(0 0 10px var(--violet-2));
      opacity:.7;
    }

    .footer-inner{
      position:relative;
      max-width:1200px; margin:0 auto;
      padding:56px 20px 22px;
      display:grid; gap:var(--gap);
      grid-template-columns:repeat(4,minmax(0,1fr));
    }

    .card{
      background:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
      border:1px solid var(--glass-border);
      border-radius:var(--radius);
      padding:22px;
      backdrop-filter:blur(6px);
      box-shadow:0 10px 30px rgba(0,0,0,.25);
    }
    .title{
      margin:0 0 14px; font-weight:700; font-size:1rem; letter-spacing:.4px; text-transform:uppercase;
    }

    .list{list-style:none; margin:0; padding:0; display:grid; gap:10px}
    .link{
      color:var(--muted); text-decoration:none; font-weight:600;
      display:inline-flex; align-items:center; gap:10px; padding:8px 0; border-radius:10px;
      transition:color .2s, transform .2s, text-shadow .2s, box-shadow .2s, background .2s;
    }
    .link:hover, .link:focus-visible{
      color:#fff; transform:translateY(-1px);
      text-shadow:0 0 10px var(--violet-2), 0 0 18px #6a0dad88;
      box-shadow:0 0 0 3px #9b34ef33 inset;
      outline:none;
      background:linear-gradient(90deg, #ffffff09, transparent);
    }

    /* ПИЛЮЛИ и ИКОНКИ (оплата/соцсети) */
    .row{display:flex; flex-wrap:wrap; gap:12px 14px; align-items:center}
    .pill{
      display:inline-flex; align-items:center; gap:8px;
      padding:8px 12px; border-radius:999px; font-weight:700; font-size:.92rem;
      color:#fff; background:var(--glass); border:1px solid var(--glass-border);
      transition:transform .2s, box-shadow .2s, border-color .2s, background .2s;
      backdrop-filter:blur(6px);
    }
    .pill:hover{ transform:translateY(-2px); box-shadow:0 10px 30px #6a0dad55; border-color:#b73cff66 }

    /* Kaspi Pay специальная пилюля */
    .pill-kaspi{
      background:linear-gradient(180deg, #e41e26, #b90f18);
      border:1px solid #ff6b76aa;
      box-shadow:0 0 14px #ff4e5f66 inset, 0 6px 26px #e41e2644;
    }
    .pill-kaspi:hover{ box-shadow:0 0 18px #ff6b76aa inset, 0 10px 34px #e41e2670 }

    .pill svg{width:18px;height:18px;display:block}

    /* Платёжные «карточки»-логотипы */
    .paycard{
      display:inline-flex; align-items:center; justify-content:center;
      height:32px; min-width:64px; padding:0 10px; gap:8px;
      border-radius:12px; background:var(--glass); border:1px solid var(--glass-border);
      transition:transform .2s, box-shadow .2s, border-color .2s;
    }
    .paycard:hover{ transform:translateY(-2px); box-shadow:0 0 0 2px #b73cff44, 0 8px 24px #6a0dad55; border-color:#b73cff77 }
    .paycard svg{height:18px}

    /* НИЖНЯЯ СТРОКА */
    .footer-bottom{
      position:relative;
      margin-top:22px; padding:16px 20px 26px;
      border-top:1px solid rgba(255,255,255,.1);
      color:var(--muted); font-size:.92rem; text-align:center;
    }

    /* АДАПТИВ */
    @media (max-width:1000px){ .footer-inner{grid-template-columns:repeat(2,minmax(0,1fr))} }
    @media (max-width:560px){ .footer-inner{grid-template-columns:1fr} .paycard{min-width:56px} }

    /* reduce-motion */
    @media (prefers-reduced-motion:reduce){
      .link,.pill,.paycard{transition:none!important}
      .starfield,.starfield::before,.starfield::after{animation:none!important}
    }
    /* ========== Burger button ========== */
:root{
  --burger-size: 44px;
  --burger-bar-w: 26px;
  --burger-bar-h: 3px;
  --burger-offset: 8px;
  --burger-radius: 2px;
}

/* по умолчанию на десктопе бургер прячем */
.burger{ display:none; }

/* иконка */
.burger{
  width:var(--burger-size); height:var(--burger-size);
  display:grid; place-items:center;
  padding:0; border:0; background:transparent; cursor:pointer;
  position:relative; -webkit-tap-highlight-color:transparent;
  z-index: 1200; /* выше навигации */
}
.burger span{
  position:absolute; left:50%;
  width:var(--burger-bar-w); height:var(--burger-bar-h);
  border-radius:var(--burger-radius);
  transform:translateX(-50%);
  background: linear-gradient(90deg,#ff3df5,#8a2be2,#5f00ff);
  box-shadow: 0 0 8px #bb6bd9, 0 0 14px #a855f7, 0 0 22px #9333ea;
  transition: transform .28s ease, opacity .2s ease, width .2s ease, top .28s ease;
}
.burger span:nth-child(1){ top: calc(50% - var(--burger-offset)); }
.burger span:nth-child(2){ top: 50%; transform: translate(-50%,-50%); }
.burger span:nth-child(3){ top: calc(50% + var(--burger-offset)); }

.burger.active span:nth-child(1){ top:50%; transform:translate(-50%,-50%) rotate(45deg); }
.burger.active span:nth-child(2){ opacity:0; width: 14px; }
.burger.active span:nth-child(3){ top:50%; transform:translate(-50%,-50%) rotate(-45deg); }

/* ========== Мобильное меню ========== */
@media (max-width: 960px){
  /* показываем бургер только на мобиле */
  .burger{ display:block; }

  /* переносим блоки в топбар: слева бренд, справа контролы и бургер */
  .topbar .container.topbar__inner{
    display:flex; align-items:center; gap:12px;
  }
  .topbar .brand{ margin-right:auto; }

  /* сама навигация становится выпадающей панелью */
  .topbar .nav{
    position: fixed;
    top: 64px; /* высота шапки, подгони если другая */
    left: 12px; right: 12px;
    background: rgba(20,0,35,.92);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 18px #9b34ef33;
    padding: 14px;
    display: grid;
    gap: 8px;
    z-index: 1100;

    /* скрыто по умолчанию */
    opacity: 0;
    transform: translateY(-10px) scale(.98);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
  }
  /* когда открыто */
  .has-menu .topbar .nav{
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  /* ссылки крупнее под палец */
  .topbar .nav__link{
    display:block; padding:10px 12px; border-radius:10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
  }

  /* необязательный тёмный фон под меню */
  .mobile-dim{
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  .has-menu .mobile-dim{ opacity: 1; pointer-events: auto; }
}
@media (max-width: 960px){
  /* ...твой код... */

  /* меню и его содержимое точно кликабельны при открытии */
  .has-menu .topbar .nav,
  .has-menu .topbar .nav *{
    pointer-events: auto;
  }
}
@media (max-width: 960px) {
  .topbar .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10,0,20,0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,.1);
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    transform: translateY(-100%);
    transition: transform .3s ease;
  }
  html.has-menu .topbar .nav {
    transform: translateY(0);
  }

 .mobile-dim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35); /* было .6 — стало легче */
  backdrop-filter: blur(2px);  /* чуть меньше размытие */
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 30;
}

  html.has-menu .mobile-dim {
    opacity: 1;
    pointer-events: auto;
  }

  .burger {
    display: inline-grid;
  }
  .controls {
    display: none;
  }
}
@media (max-width: 960px) {
  .topbar .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10,0,20,0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    transform: translateY(-100%);
    transition: transform .3s ease;
    z-index: 40;
  }
  html.has-menu .topbar .nav { transform: translateY(0); }

  .mobile-dim {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 30;
  }
  html.has-menu .mobile-dim { opacity: 1; pointer-events: auto; }

  .burger { display: inline-grid; }
  .controls { display: none; }
}
@media (max-width:960px){
  .controls{ display:flex !important; gap:8px; align-items:center; }
}
@media (max-width:960px){
  .controls{ display:flex !important; gap:8px; align-items:center; }
}
/* === OVERRIDES: мобильный топбар === */
@media (max-width: 960px){
  /* НЕ скрываем блок с селекторами языка/валюты */
  .controls{
    display:flex !important;
    gap:8px;
    align-items:center;
  }
}
/* ========== BURGER + MOBILE NAV CLEAN VERSION ========== */
:root {
  --burger-size: 44px;
  --burger-bar-w: 26px;
  --burger-bar-h: 3px;
  --burger-offset: 8px;
  --burger-radius: 2px;
}

/* Кнопка-бургер */
.burger {
  width: var(--burger-size);
  height: var(--burger-size);
  display: none;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  z-index: 1200;
}

.burger span {
  position: absolute;
  left: 50%;
  width: var(--burger-bar-w);
  height: var(--burger-bar-h);
  border-radius: var(--burger-radius);
  transform: translateX(-50%);
  background: linear-gradient(90deg, #ff3df5, #8a2be2, #5f00ff);
  box-shadow: 0 0 8px #bb6bd9, 0 0 14px #a855f7, 0 0 22px #9333ea;
  transition: transform 0.28s ease, opacity 0.2s ease, width 0.2s ease, top 0.28s ease;
}

.burger span:nth-child(1) { top: calc(50% - var(--burger-offset)); }
.burger span:nth-child(2) { top: 50%; transform: translate(-50%, -50%); }
.burger span:nth-child(3) { top: calc(50% + var(--burger-offset)); }

.burger.active span:nth-child(1) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.burger.active span:nth-child(2) {
  opacity: 0;
  width: 14px;
}
.burger.active span:nth-child(3) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ========== MOBILE MENU ========== */
@media (max-width: 960px) {
  /* Показываем бургер */
  .burger {
    display: grid;
  }

  /* Выстраиваем топбар */
  .topbar .container.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  /* Слева бренд, справа контролы и бургер */
  .topbar .brand {
    margin-right: auto;
  }

  /* Контролы (язык + валюта) показываем! */
  .controls {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  /* Меню выпадает вниз */
  .topbar .nav {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    background: rgba(20, 0, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45),
                0 0 18px #9b34ef33;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1000;
  }

  html.has-menu .topbar .nav {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .topbar .nav__link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
  }

  /* Фон-подложка за меню */
  .mobile-dim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25); /* мягкое затемнение */
    backdrop-filter: blur(1.5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 900;
  }

  html.has-menu .mobile-dim {
    opacity: 1;
    pointer-events: auto;
  }
}
/* === MOBILE NAV: no overlay + clickable === */
:root{
  --burger-size:44px;
  --burger-bar-w:26px;
  --burger-bar-h:3px;
  --burger-offset:8px;
  --burger-radius:2px;
}

/* burger */
.burger{
  width:var(--burger-size); height:var(--burger-size);
  display:none; place-items:center;
  border:0; background:transparent; cursor:pointer; position:relative;
  -webkit-tap-highlight-color:transparent; z-index:1200;
}
.burger span{
  position:absolute; left:50%;
  width:var(--burger-bar-w); height:var(--burger-bar-h);
  transform:translateX(-50%); border-radius:var(--burger-radius);
  background:linear-gradient(90deg,#ff3df5,#8a2be2,#5f00ff);
  box-shadow:0 0 8px #bb6bd9,0 0 14px #a855f7,0 0 22px #9333ea;
  transition:transform .28s ease,opacity .2s ease,width .2s ease,top .28s ease;
}
.burger span:nth-child(1){ top:calc(50% - var(--burger-offset)); }
.burger span:nth-child(2){ top:50%; transform:translate(-50%,-50%); }
.burger span:nth-child(3){ top:calc(50% + var(--burger-offset)); }
.burger.active span:nth-child(1){ top:50%; transform:translate(-50%,-50%) rotate(45deg); }
.burger.active span:nth-child(2){ opacity:0; width:14px; }
.burger.active span:nth-child(3){ top:50%; transform:translate(-50%,-50%) rotate(-45deg); }

/* отключаем затемнение полностью, если где-то осталось */
.mobile-dim{ display:none !important; opacity:0 !important; pointer-events:none !important; }

@media (max-width:960px){
  .burger{ display:grid; }

  /* НЕ скрывать селекторы языка/валюты */
  .controls{ display:flex !important; align-items:center; gap:8px; }

  /* выпадающее меню */
  .topbar .nav{
    position:fixed; top:64px; left:12px; right:12px;
    background:rgba(20,0,35,.92);
    border:1px solid rgba(255,255,255,.15);
    border-radius:16px; backdrop-filter:blur(8px);
    box-shadow:0 10px 30px rgba(0,0,0,.45), 0 0 18px #9b34ef33;
    display:flex; flex-direction:column; gap:12px; padding:14px;

    /* закрыто по умолчанию */
    opacity:0; transform:translateY(-10px) scale(.98);
    visibility:hidden;
    pointer-events:none;

    transition:opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
    z-index:1200; /* поверх всего, но без затемнения */
  }
  html.has-menu .topbar .nav{
    opacity:1; transform:none; visibility:visible; pointer-events:auto;
    transition:opacity .25s ease, transform .25s ease;
  }

  .topbar .nav__link{
    display:block; width:100%;
    padding:10px 12px; text-align:center; border-radius:10px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
  }
}
/* === ФИОЛЕТОВЫЙ НЕОНОВЫЙ СТИЛЬ МЕНЮ === */
@media (max-width:960px){
  .topbar .nav{
    position:fixed; top:64px; left:12px; right:12px;
    background: radial-gradient(120% 180% at 50% 0%, rgba(90,0,140,0.95), rgba(20,0,40,0.92));
    border:1px solid rgba(180,80,255,0.35);
    border-radius:16px;
    backdrop-filter:blur(10px);
    box-shadow:
      0 0 25px rgba(160,0,255,0.4),
      0 0 60px rgba(255,0,255,0.2);
    display:flex; flex-direction:column; gap:12px;
    padding:16px 18px;
    opacity:0; transform:translateY(-10px) scale(.98);
    visibility:hidden; pointer-events:none;
    transition:opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
    z-index:1200;
  }
  html.has-menu .topbar .nav{
    opacity:1; transform:translateY(0) scale(1);
    visibility:visible; pointer-events:auto;
    transition:opacity .25s ease, transform .25s ease;
  }

  .topbar .nav__link{
    display:block; width:100%;
    padding:10px 12px;
    text-align:center;
    border-radius:10px;
    color:#e6d6ff;
    background:rgba(255,255,255,0.04);
    border:1px solid rgba(255,255,255,0.08);
    text-decoration:none;
    font-weight:600;
    letter-spacing:.3px;
    transition: all .25s ease;
    text-shadow: 0 0 6px rgba(255,180,255,.3);
  }
  .topbar .nav__link:hover{
    background: linear-gradient(90deg,#8A3FFC,#FF00FF);
    color:#fff;
    box-shadow: 0 0 16px rgba(255,0,255,.4);
    text-shadow: 0 0 10px rgba(255,255,255,.6),0 0 20px rgba(255,0,255,.6);
  }

  .burger span{
    background: linear-gradient(90deg,#ff00ff,#8A3FFC);
    box-shadow: 0 0 8px #ff8cff, 0 0 16px #a855f7;
  }

  .controls{
    display:flex !important;
    align-items:center; gap:8px;
  }
}
/* ===== STARFIELD (как «пыль») — ТОЛЬКО для футера ===== */
.footer-stars,
.footer-stars::before,
.footer-stars::after{
  position:absolute; inset:0; pointer-events:none; content:"";
  background-repeat:repeat; animation: drift 70s linear infinite;
  opacity:.4;
}
.footer-stars{
  background-image:
    radial-gradient(2px 2px at 30px 50px,#ffffffb0 45%,transparent 46%),
    radial-gradient(2px 2px at 140px 80px,#ffffff95 45%,transparent 46%),
    radial-gradient(1px 1px at 220px 10px,#ffffff80 45%,transparent 46%);
  background-size: 200px 200px;
}
.footer-stars::before{
  background-image:
    radial-gradient(1.5px 1.5px at 60px 120px,#fff9 45%,transparent 46%),
    radial-gradient(1px 1px at 160px 30px,#fff7 45%,transparent 46%);
  background-size: 260px 220px;
  animation-duration:95s; opacity:.35;
}
.footer-stars::after{
  background-image:
    radial-gradient(2px 2px at 100px 160px,#fff 45%,transparent 46%),
    radial-gradient(1px 1px at 10px 90px,#fff8 45%,transparent 46%);
  background-size: 300px 260px;
  animation-duration:120s; opacity:.25;
}
@keyframes drift{from{background-position:0 0}to{background-position:-600px 600px}}
.site-footer{ position:relative; }
.footer-stars{ position:absolute; inset:0; z-index:0; }
.footer-inner, .footer-bottom{ position:relative; z-index:1; }
/* Фоновые канвасы на всю страницу и ниже контента */
.starfield,
.snow-canvas {
  position: fixed;
  inset: 0;             /* top:0; right:0; bottom:0; left:0 */
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none; /* чтобы не ловил клики */
  z-index: -1;          /* отправляем под всё */
}

/* Шелл приложения поверх фона (на всякий случай) */
.app {
  position: relative;
  z-index: 1;
}
/* Фоновые канвасы на всю страницу и ниже контента */
.starfield,
.snow-canvas {
  position: fixed;
  inset: 0;             /* top:0; right:0; bottom:0; left:0 */
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none; /* чтобы не ловил клики */
  z-index: -1;          /* отправляем под всё */
}

/* Шелл приложения поверх фона (на всякий случай) */
.app {
  position: relative;
  z-index: 1;
}
/* Фоновые канвасы на всю страницу и ниже контента */
.starfield,
.snow-canvas {
  position: fixed;
  inset: 0;                 /* top:0; right:0; bottom:0; left:0 */
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;     /* не перехватывает клики */
  z-index: 0;               /* слой 0 */
  background: transparent;  /* на всякий случай */
}

/* Весь контент выше фона */
.app {
  position: relative;
  z-index: 1;
}
canvas.starfield,
canvas.snow-canvas { height: 100vh !important; max-width: none !important; }
