/* ═══════════════════════════════════════════════════════════
   LAREK GAMES — стили экранов и игр
   ═══════════════════════════════════════════════════════════ */

/* ── Приветствие на главной ────────────────────────────────── */

.hello { margin-bottom: var(--sp-5); }
.hello h1 { font-size: var(--fs-h1); font-weight: 900; letter-spacing: -.02em; }
.hello p  { font-size: var(--fs-sm); color: var(--text-dim); margin-top: 2px; }

/* Баннер пополнения */
.promo {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--grad-deep);
  border: 1px solid var(--stroke-blue);
  margin-bottom: var(--sp-5);
}
.promo::after {
  content: ''; position: absolute; right: -34px; top: -34px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(53,210,245,.32) 0%, transparent 70%);
}
.promo__icon {
  width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto;
  background: var(--grad-gold); display: grid; place-items: center;
  box-shadow: var(--glow-gold);
}
.promo__icon svg { width: 22px; height: 22px; color: #241300; }
.promo__text { flex: 1; min-width: 0; }
.promo__text b { display: block; font-size: var(--fs-body); font-weight: 800; }
.promo__text span { font-size: var(--fs-xs); color: var(--text-dim); }
.promo__go { flex: 0 0 auto; color: var(--blue-400); }
.promo__go svg { width: 20px; height: 20px; }

/* ── Сетка игровых режимов ─────────────────────────────────── */

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

.mode {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 132px; padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--stroke);
  text-align: left;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-base) var(--ease);
}
.mode:active { transform: scale(.97); }
.mode::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, var(--accent, var(--blue-500)) 0%, transparent 62%);
  opacity: .18; transition: opacity var(--t-base) var(--ease);
}
.mode:active::before { opacity: .3; }
.mode > * { position: relative; }

.mode__icon {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, var(--blue-500)) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--blue-500)) 42%, transparent);
  color: var(--accent, var(--blue-500));
}
.mode__icon svg { width: 22px; height: 22px; }
.mode__name { font-size: var(--fs-h3); font-weight: 800; margin-top: auto; }
.mode__desc { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 2px; line-height: 1.3; }

.mode--wide { grid-column: 1 / -1; min-height: 96px; flex-direction: row; align-items: center; gap: var(--sp-4); }
.mode--wide .mode__name { margin-top: 0; }
.mode--wide .mode__body { flex: 1; min-width: 0; }

.mode.is-soon { opacity: .5; pointer-events: none; }
.mode__soon {
  position: absolute; top: var(--sp-3); right: var(--sp-3);
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--surface-3); border: 1px solid var(--stroke);
  font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-mute);
}

/* ── Лента «сейчас играют» ─────────────────────────────────── */

.live { display: flex; flex-direction: column; gap: var(--sp-2); }
.live__row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--stroke);
  animation: live-in var(--t-slow) var(--ease-out) both;
}
@keyframes live-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.live__name { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live__game { font-size: var(--fs-xs); color: var(--text-mute); }
.live__amt  { font-size: var(--fs-sm); }
.live__amt--win  { color: var(--ok); }
.live__amt--lose { color: var(--text-mute); }

/* ── Карточки подарков / NFT ───────────────────────────────── */

.gifts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.gifts--2 { grid-template-columns: repeat(2, 1fr); }

.gift {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: var(--sp-3) var(--sp-2) 10px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--stroke);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-base) var(--ease);
}
.gift:active { transform: scale(.96); }
.gift::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(85% 60% at 50% 0%, var(--c) 0%, transparent 70%);
  opacity: .16;
}
.gift > * { position: relative; }
.gift.is-selected { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 18px -4px var(--c); }
.gift.is-selected::before { opacity: .3; }

.gift__art {
  width: 100%; aspect-ratio: 1;
  display: grid; place-items: center;
  font-size: 34px; line-height: 1;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.55));
  overflow: hidden;
}

/* Настоящая картинка NFT вместо эмодзи-заглушки */
.gift-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.gift-img--lg { border-radius: var(--r-md); }

/* Атрибуты NFT: модель · фон · узор */
.gift__attrs {
  width: 100%;
  font-size: 9px; color: var(--text-mute);
  text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gift__name {
  width: 100%; text-align: center;
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gift__price { font-size: var(--fs-sm); }

/* Бейдж состояния NFT: в банке / у игрока */
.gift__badge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  padding: 2px 7px; border-radius: var(--r-pill);
  font-size: 9px; font-weight: 800; letter-spacing: .03em;
  background: rgba(0,0,0,.6);
  border: 1px solid var(--stroke-2);
  backdrop-filter: blur(4px);
}
.gift__badge--bank { color: var(--blue-300); border-color: var(--stroke-blue); }
.gift__badge--own  { color: var(--ok); border-color: rgba(36,201,138,.4); }

/* Множитель на карточке цели апгрейда */
.gift__mult {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  padding: 2px 7px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 800;
  background: rgba(47,123,255,.2);
  border: 1px solid var(--stroke-blue);
  color: var(--blue-300);
}

/* Поиск по коллекции */
.search {
  position: relative;
  display: flex; align-items: center;
  margin-bottom: var(--sp-3);
}
.search svg {
  position: absolute; left: 13px;
  width: 16px; height: 16px;
  color: var(--text-mute);
}
.search input { padding-left: 38px; }
.search__clear {
  position: absolute; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-4); color: var(--text-dim);
}
.search__clear svg { position: static; width: 12px; height: 12px; }
.search__clear[hidden] { display: none; }

/* Горизонтальная лента подарков */
.gift-row {
  display: flex; gap: var(--sp-3);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  margin: 0 calc(var(--sp-4) * -1); padding-inline: var(--sp-4);
}
.gift-row > * { flex: 0 0 96px; scroll-snap-align: start; }

/* ── Кейсы ─────────────────────────────────────────────────── */

.cases-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.case {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-3);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--stroke);
  transition: transform var(--t-fast) var(--ease);
}
.case:active { transform: scale(.97); }
.case::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(90% 65% at 50% 0%, var(--c) 0%, transparent 72%);
  opacity: .2;
}
.case > * { position: relative; }
.case__art { font-size: 52px; line-height: 1; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); }
.case__name { font-size: var(--fs-body); font-weight: 800; }
.case__price {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--grad-brand); color: #fff;
  font-size: var(--fs-sm); font-weight: 800;
  box-shadow: var(--glow-blue-sm);
}
.case__price svg { width: 13px; height: 13px; }

/* ── Лидеры: пьедестал ─────────────────────────────────────── */

.podium {
  display: grid;
  grid-template-columns: 1fr 1.14fr 1fr;
  align-items: end;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.pod { display: flex; flex-direction: column; align-items: center; }
.pod__ava {
  position: relative;
  width: 62px; height: 62px; border-radius: 18px;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 900;
  border: 2px solid var(--c);
  background: var(--surface-2);
  box-shadow: 0 0 22px -6px var(--c);
  margin-bottom: 8px;
}
.pod--1 .pod__ava { width: 74px; height: 74px; font-size: 30px; }
.pod__crown { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); color: var(--gold); }
.pod__crown svg { width: 22px; height: 22px; filter: drop-shadow(0 0 6px rgba(245,161,31,.7)); }
.pod__name {
  max-width: 100%; font-size: var(--fs-sm); font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pod__amt { font-size: var(--fs-xs); color: var(--c); font-weight: 800; margin-bottom: 8px; }
.pod__bar {
  width: 100%; border-radius: var(--r-md) var(--r-md) 0 0;
  display: grid; place-items: center;
  font-size: 34px; font-weight: 900; color: rgba(255,255,255,.28);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 55%, transparent) 0%,
                                      color-mix(in srgb, var(--c) 8%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  border-bottom: 0;
}
.pod--1 .pod__bar { height: 108px; }
.pod--2 .pod__bar { height: 82px; }
.pod--3 .pod__bar { height: 66px; }

/* Список лидеров */
.lead-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.lead {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 9px var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--stroke);
}
.lead--1 { background: linear-gradient(90deg, rgba(245,161,31,.16), var(--surface-1)); border-color: rgba(245,161,31,.34); }
.lead--2 { background: linear-gradient(90deg, rgba(147,189,255,.14), var(--surface-1)); border-color: rgba(147,189,255,.3); }
.lead--3 { background: linear-gradient(90deg, rgba(255,110,60,.14), var(--surface-1)); border-color: rgba(255,110,60,.3); }
.lead--you { background: linear-gradient(90deg, rgba(47,123,255,.2), var(--surface-1)); border-color: var(--stroke-blue); }
.lead__place { width: 30px; font-size: var(--fs-sm); font-weight: 800; color: var(--text-mute); }
.lead--1 .lead__place, .lead--2 .lead__place, .lead--3 .lead__place { color: var(--text); }
.lead__name { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead__amt { font-size: var(--fs-sm); }

.lead-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--sp-4); margin-bottom: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--surface-1); border: 1px solid var(--stroke);
  font-size: var(--fs-xs); color: var(--text-dim);
}

/* ── Профиль ───────────────────────────────────────────────── */

.prof-head { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.prof-head__name { font-size: var(--fs-h2); font-weight: 900; }
.prof-head__tag  { font-size: var(--fs-sm); color: var(--text-mute); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: var(--sp-4) var(--sp-3);
  border-radius: var(--r-lg);
  background: var(--surface-1); border: 1px solid var(--stroke);
}
.stat__val { display: flex; align-items: center; gap: 6px; font-size: var(--fs-h2); font-weight: 900; font-variant-numeric: tabular-nums; }
.stat__val svg { width: 17px; height: 17px; color: var(--blue-400); }
.stat__lbl { font-size: var(--fs-xs); color: var(--text-mute); }

/* Строки статистики */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 12px var(--sp-4);
  border-bottom: 1px solid var(--stroke);
  font-size: var(--fs-sm);
}
.row:last-child { border-bottom: 0; }
.row__lbl { flex: 1; color: var(--text-dim); }
.row__val { font-weight: 700; font-variant-numeric: tabular-nums; }
.row__val--ok   { color: var(--ok); }
.row__val--bad  { color: var(--danger); }
.row svg { width: 18px; height: 18px; color: var(--text-mute); }

/* Кликабельная строка-пункт меню */
.item {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; padding: 14px var(--sp-4);
  border-bottom: 1px solid var(--stroke);
  font-size: var(--fs-body); text-align: left;
  transition: background var(--t-fast) var(--ease);
}
.item:last-child { border-bottom: 0; }
.item:active { background: var(--surface-2); }
.item__ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
             background: var(--surface-3); color: var(--blue-400); flex: 0 0 auto; }
.item__ico svg { width: 18px; height: 18px; }
.item__txt { flex: 1; min-width: 0; font-weight: 600; }
.item__sub { display: block; font-size: var(--fs-xs); color: var(--text-mute); font-weight: 400; }
.item__arrow { color: var(--text-mute); }
.item__arrow svg { width: 17px; height: 17px; }

/* Реферальная программа */
.ref-rules { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.ref-rules li { display: flex; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--gold-soft); list-style: none; }
.ref-rules li::before { content: '•'; color: var(--gold); }

.field {
  width: 100%; height: 46px; padding: 0 var(--sp-4);
  border-radius: var(--r-md);
  background: var(--surface-3);
  border: 1px solid var(--stroke);
  font-size: var(--fs-sm); color: var(--text);
  transition: border-color var(--t-fast) var(--ease);
}
.field::placeholder { color: var(--text-mute); }
.field:focus { border-color: var(--stroke-blue); }
.field-stack { display: flex; flex-direction: column; gap: var(--sp-3); }

/* Правила платформы */
.rules-body { font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.6; }
.rules-body h4 { color: var(--text); font-size: var(--fs-body); margin: var(--sp-4) 0 var(--sp-2); }
.rules-body p { margin-bottom: var(--sp-2); }

/* ═══════════════════════════════════════════════════════════
   ИГРЫ
   ═══════════════════════════════════════════════════════════ */

/* Общая шапка игрового экрана */
.game-head {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.game-head__back {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--stroke);
  color: var(--text-dim); flex: 0 0 auto;
}
.game-head__back svg { width: 18px; height: 18px; }
.game-head__title { flex: 1; font-size: var(--fs-h2); font-weight: 900; }
.game-head__aside { display: flex; gap: var(--sp-2); }

/* ── Колесо апгрейда ───────────────────────────────────────── */

.up-wheel {
  position: relative;
  width: min(70vw, 260px); aspect-ratio: 1;
  margin: var(--sp-2) auto var(--sp-5);
  display: grid; place-items: center;
}
.up-wheel__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.up-wheel__track { stroke: var(--surface-3); }
.up-wheel__arc {
  stroke: url(#upGrad);
  /* Ровный срез, а не скруглённый: закругление вылезало за границу
     сектора на пару градусов, и стрелка могла встать на синей дуге,
     хотя выигрышной зоны там уже нет. */
  stroke-linecap: butt;
  filter: drop-shadow(0 0 8px rgba(53,210,245,.55));
  transition: stroke-dashoffset var(--t-slow) var(--ease-out);
}
/* Стрелка-указатель, вращается вокруг центра */
.up-wheel__ptr {
  position: absolute; inset: 0;
  transform: rotate(0deg);
  will-change: transform;
}
.up-wheel__ptr i {
  position: absolute; top: -3px; left: 50%;
  width: 0; height: 0; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-top: 15px solid var(--text);
  filter: drop-shadow(0 0 6px rgba(255,255,255,.6));
}
.up-wheel.is-spinning .up-wheel__ptr { transition: transform 4.2s var(--ease-spin); }

.up-wheel__core {
  position: relative;
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(circle at 50% 30%, var(--surface-2), var(--bg-deep));
  border: 1px solid var(--stroke);
  text-align: center; padding: var(--sp-3);
}
.up-wheel__hint { font-size: var(--fs-sm); color: var(--text-mute); font-weight: 600; }
.up-wheel__chance { font-size: 30px; font-weight: 900; letter-spacing: -.02em; }
.up-wheel__mult { font-size: var(--fs-sm); font-weight: 700; color: var(--cyan-400); }
.up-wheel__art { font-size: 42px; line-height: 1; }

.up-wheel.is-win  .up-wheel__core { border-color: var(--ok); box-shadow: 0 0 34px -6px var(--ok); }
.up-wheel.is-lose .up-wheel__core { border-color: var(--danger); box-shadow: 0 0 34px -8px var(--danger); }

/* Пара «ставка → цель» */
.up-slots { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.up-slot {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--stroke);
  min-height: 96px; justify-content: center;
}
.up-slot__lbl { font-size: var(--fs-xs); color: var(--text-mute); }
.up-slot__art {
  font-size: 30px; line-height: 1;
  width: 38px; height: 38px;
  display: grid; place-items: center;
}
.up-slot__art .gift-img { width: 100%; height: 100%; object-fit: contain; }
.up-wheel__art .gift-img { width: 44px; height: 44px; object-fit: contain; }
.up-slot__val { font-size: var(--fs-sm); }
.up-slot.is-set { border-color: var(--stroke-blue); }

/* Панель ставки */
.bet-panel { display: flex; flex-direction: column; gap: var(--sp-3); }
.bet-input {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--stroke);
}
.bet-input input {
  width: 100%; text-align: center;
  font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums;
  background: transparent;
}
.bet-input svg { width: 20px; height: 20px; color: var(--gold); flex: 0 0 auto; }
.bet-usd { text-align: center; font-size: var(--fs-xs); color: var(--text-mute); }
.bet-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.bet-quick button {
  height: 38px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--stroke);
  font-size: var(--fs-sm); font-weight: 700; color: var(--text-dim);
  transition: all var(--t-fast) var(--ease);
}
.bet-quick button:active { background: var(--surface-4); color: var(--blue-300); }

/* ── PvP колесо ────────────────────────────────────────────── */

.pvp-wheel {
  position: relative;
  width: min(74vw, 280px); aspect-ratio: 1;
  margin: var(--sp-2) auto var(--sp-4);
  display: grid; place-items: center;
}
.pvp-wheel__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); will-change: transform; }
.pvp-wheel.is-spinning .pvp-wheel__svg { transition: transform 6s var(--ease-spin); }
.pvp-wheel__seg { transition: stroke-dasharray var(--t-slow) var(--ease-out); }

.pvp-wheel__ptr {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  z-index: 3;
  width: 26px; height: 30px;
  display: grid; place-items: center;
}
.pvp-wheel__ptr::after {
  content: ''; width: 0; height: 0;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-top: 16px solid var(--cyan-400);
  filter: drop-shadow(0 0 8px rgba(53,210,245,.85));
}

.pvp-wheel__core {
  position: relative; z-index: 2;
  width: 58%; aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: radial-gradient(circle at 50% 28%, var(--surface-2), #000);
  border: 1px solid var(--stroke);
  text-align: center; padding: var(--sp-3);
}
.pvp-wheel__timer { font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.pvp-wheel__state { font-size: var(--fs-xs); color: var(--text-mute); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.pvp-wheel__star { width: 54px; height: 54px; border-radius: 50%; background: var(--grad-gold);
                   display: grid; place-items: center; box-shadow: var(--glow-gold); }
.pvp-wheel__star svg { width: 28px; height: 28px; color: #241300; }

/* Плашки «До старта» и «Банк» вокруг колеса */
.pvp-tags { display: flex; justify-content: space-between; gap: var(--sp-3); margin: calc(var(--sp-6) * -1) 0 var(--sp-5); }
.pvp-tag {
  flex: 1; max-width: 46%;
  padding: 10px var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-1); border: 1px solid var(--stroke);
  text-align: center;
}
.pvp-tag__lbl { font-size: var(--fs-xs); color: var(--text-mute); margin-bottom: 2px; }
.pvp-tag__val { font-size: var(--fs-body); font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 5px; }
.pvp-tag__val svg { width: 13px; height: 13px; }
.pvp-tag--live .pvp-tag__val { color: var(--ok); }
.pvp-tag--live .pvp-tag__val::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 8px var(--ok);
  animation: blink 1.4s var(--ease) infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* Участники PvP */
.pvp-players { display: flex; flex-direction: column; gap: var(--sp-2); }
.pvp-player {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--c, var(--blue-500));
  animation: live-in var(--t-base) var(--ease-out) both;
}
.pvp-player--you { background: linear-gradient(90deg, rgba(47,123,255,.16), var(--surface-1)); }
.pvp-player__name { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600;
                    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvp-player__amt  { font-size: var(--fs-sm); }
.pvp-player__pct  {
  min-width: 52px; text-align: right;
  font-size: var(--fs-xs); font-weight: 800; color: var(--c, var(--blue-400));
  font-variant-numeric: tabular-nums;
}

/* Победный экран */
.winner {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
}
.winner__ava { width: 78px; height: 78px; border-radius: 24px; display: grid; place-items: center;
               font-size: 32px; font-weight: 900; background: var(--surface-2);
               border: 2px solid var(--gold); box-shadow: var(--glow-gold); }
.winner__name { font-size: var(--fs-h2); font-weight: 900; }
.winner__amt  { font-size: 28px; font-weight: 900; color: var(--gold); }

/* ── Мины ──────────────────────────────────────────────────── */

.mines-hud {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.mines-hud__item {
  padding: 10px var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-1); border: 1px solid var(--stroke);
  text-align: center;
}
.mines-hud__item b {
  display: block; font-size: 9px; letter-spacing: .09em;
  color: var(--text-mute); text-transform: uppercase; margin-bottom: 2px;
}
.mines-hud__item span {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-body); font-weight: 900; font-variant-numeric: tabular-nums;
}
.mines-hud__item span svg { width: 13px; height: 13px; color: var(--gold); }

.mines-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.mines-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--stroke-2);
  display: grid; place-items: center;
  font-size: 24px; line-height: 1;
  transition: transform .12s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.mines-cell:active:not(.is-done) { transform: scale(.94); }
.mines-cell__face { opacity: 0; transform: scale(.5); transition: all .22s var(--ease-out); }

.mines-cell.is-safe {
  background: rgba(47,123,255,.16);
  border-color: var(--stroke-blue);
  box-shadow: inset 0 0 14px rgba(47,123,255,.25);
}
.mines-cell.is-safe .mines-cell__face { opacity: 1; transform: scale(1); }

.mines-cell.is-mine {
  background: rgba(255,77,94,.18);
  border-color: rgba(255,77,94,.55);
  box-shadow: 0 0 18px -4px var(--danger);
}
.mines-cell.is-mine .mines-cell__face { opacity: 1; transform: scale(1); }
.mines-cell.is-revealed { opacity: .55; box-shadow: none; }
.mines-cell.is-done { pointer-events: none; }
.mines-cell.is-loading { opacity: .5; }

/* Подсветка выбранного пресета мин */
.bet-quick button.is-on {
  background: var(--surface-4);
  border-color: var(--stroke-blue);
  color: var(--blue-300);
}

/* Честность раунда */
.fair {
  margin-top: var(--sp-4); padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--stroke);
  font-size: var(--fs-xs); color: var(--text-mute);
  word-break: break-all; line-height: 1.5;
}
.fair b { color: var(--text-dim); display: block; margin-bottom: 4px; font-size: var(--fs-xs); }

/* ── Ракетка ───────────────────────────────────────────────── */

.rk {
  position: relative;
  height: 268px;
  margin-bottom: var(--sp-4);
  border-radius: var(--r-lg);
  background: radial-gradient(120% 90% at 15% 100%, #12203F 0%, #070B16 70%);
  border: 1px solid var(--stroke);
  overflow: hidden;
}
.rk.is-crashed { animation: rk-shake .5s var(--ease); }
@keyframes rk-shake {
  0%,100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  35% { transform: translateX(6px); }
  55% { transform: translateX(-4px); }
  75% { transform: translateX(3px); }
}

/* Полоса прошлых раундов — как на нормальных краш-играх */
.rk__history {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  display: flex; gap: 4px;
  padding: 7px 8px;
  overflow-x: auto;
  background: linear-gradient(180deg, rgba(5,7,14,.92), rgba(5,7,14,0));
  scrollbar-width: none;
}
.rk__hist-item {
  flex: 0 0 auto;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.07);
  font-size: 10px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}
.rk__hist-item.is-high { color: var(--ok); background: rgba(36,201,138,.16); }
.rk__hist-item.is-low  { color: var(--danger); background: rgba(255,77,94,.16); }

.rk__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rk__grid line { stroke: rgba(255,255,255,.05); stroke-width: 1; }

/* Ракета позиционируется в процентах — SVG растянут по контейнеру */
.rk__ship {
  position: absolute; z-index: 3;
  width: 34px; height: 52px;
  transform-origin: 50% 50%;
  transition: opacity .25s linear;
}
.rk__ship svg { width: 100%; height: 100%; display: block; }
.rk__ship.is-gone { opacity: 0; }
.rk.is-flying .rk__flame { animation: rk-flame .18s steps(2) infinite; }
@keyframes rk-flame { 0% { opacity: 1; } 100% { opacity: .45; } }

/* Взрыв на месте ракеты */
.rk__boom {
  position: absolute; z-index: 4;
  left: 50%; top: 34%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 54px; line-height: 1;
  opacity: 0; pointer-events: none;
}
.rk__boom.is-on { animation: rk-boom .6s var(--ease-out) forwards; }
@keyframes rk-boom {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(.3); }
  35%  { opacity: 1; transform: translate(-50%,-50%) scale(1.25); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.6); }
}

/* Центральные показания */
.rk__center {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.rk__mult {
  font-size: 48px; font-weight: 900;
  font-variant-numeric: tabular-nums; letter-spacing: -.03em;
  color: #fff; text-shadow: 0 4px 28px rgba(0,0,0,.8);
  transition: color .2s linear;
}
.rk__mult.is-flying  { color: #7BE4FF; text-shadow: 0 0 32px rgba(53,210,245,.75); }
.rk__mult.is-crashed { color: var(--danger); text-shadow: 0 0 32px rgba(255,77,94,.75); }
.rk__state {
  margin-top: 4px;
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-dim);
}

/* Понятный итог раунда поверх сцены */
.rk__result {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  background: rgba(5,7,14,.82);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: rk-res-in .28s var(--ease-out) both;
}
.rk__result[hidden] { display: none; }
@keyframes rk-res-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

.rk__result-icon { font-size: 42px; line-height: 1; margin-bottom: 4px; }
.rk__result-title { font-size: var(--fs-h2); font-weight: 900; }
.rk__result-sub { font-size: var(--fs-sm); color: var(--text-dim); }
.rk__result-sum {
  font-size: 30px; font-weight: 900;
  font-variant-numeric: tabular-nums;
  margin: 2px 0;
}
.rk__result-sum.is-win  { color: var(--ok); }
.rk__result-sum.is-lose { color: var(--danger); }

.rk__result--lose .rk__result-title { color: var(--danger); }
.rk__result--win  .rk__result-title { color: var(--ok); }
.rk__result--lose { box-shadow: inset 0 0 90px rgba(255,77,94,.28); }
.rk__result--win  { box-shadow: inset 0 0 90px rgba(36,201,138,.25); }

.rk__tags { display: flex; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.rk__tags .pvp-tag { flex: 1; max-width: none; }

/* Кнопка «Забрать» просит внимания, пока ракета летит */
.rk__cashout { animation: rk-pulse 1s var(--ease) infinite; }
@keyframes rk-pulse {
  0%,100% { transform: scale(1); box-shadow: var(--glow-gold); }
  50%     { transform: scale(1.02); box-shadow: 0 0 30px rgba(245,161,31,.7); }
}

/* Автовывод */
.rk__auto {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--stroke);
}
.rk__auto-lbl {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-dim);
}
.rk__auto-lbl input { width: 18px; height: 18px; accent-color: var(--blue-500); }
.rk__auto-val { display: flex; align-items: center; gap: 4px; font-weight: 800; }
.rk__auto-val input {
  width: 62px; text-align: center;
  background: var(--surface-3);
  border: 1px solid var(--stroke);
  border-radius: var(--r-xs);
  padding: 5px 6px;
  font-weight: 800; font-variant-numeric: tabular-nums;
}
.rk__auto-val input:disabled { opacity: .4; }
.rk__auto-mark {
  display: inline-block; margin-left: 6px;
  font-size: 9px; font-weight: 800; color: var(--blue-300);
}

.pvp-player.is-cashed .pvp-player__pct { color: var(--ok); }
.pvp-player.is-lost { opacity: .55; }
.pvp-player.is-lost .pvp-player__pct { color: var(--danger); }

/* ── Розыгрыши ─────────────────────────────────────────────── */

.gw { display: flex; flex-direction: column; gap: var(--sp-3); }
.gw__card {
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--stroke);
}
.gw__card.is-mine { border-color: var(--stroke-blue); }
/* Карточка кликабельна целиком: тап открывает колесо розыгрыша */
.gw__card[data-open] { cursor: pointer; transition: border-color .18s var(--ease), transform .12s var(--ease); }
.gw__card[data-open]:active { transform: scale(.99); }
.gw__card[data-open]:hover { border-color: var(--stroke-2); }
.gw__card.is-done { opacity: .6; }
.gw__top { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.gw__art {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 24px;
  background: var(--surface-3);
  overflow: hidden;
}
.gw__art img { width: 100%; height: 100%; object-fit: contain; }
.gw__info { flex: 1; min-width: 0; }
.gw__title {
  font-size: var(--fs-body); font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gw__by { font-size: var(--fs-xs); color: var(--text-mute); }
.gw__prize { text-align: right; }
.gw__meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--text-dim);
  margin-bottom: var(--sp-3);
}
.gw__winner {
  padding: 8px var(--sp-3);
  border-radius: var(--r-sm);
  background: rgba(245,161,31,.14);
  border: 1px solid rgba(245,161,31,.3);
  font-size: var(--fs-sm); font-weight: 700; color: var(--gold-soft);
  text-align: center;
}

.rk__result-next {
  margin-top: 8px;
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-mute);
}


/* ── Экран одного розыгрыша: колесо и участники ─────────────── */

.gw-view { display: flex; flex-direction: column; gap: var(--sp-4); }

.gw-view__prize {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--stroke);
}
.gw-view__art {
  width: 52px; height: 52px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 30px;
}
.gw-view__art .gift-img { width: 100%; height: 100%; object-fit: contain; }
.gw-view__name { font-weight: 800; margin-bottom: 2px; }

/* Колесо поменьше, чем в PvP: здесь оно живёт внутри шторки */
.gw-wheel { width: min(240px, 62vw); margin: 0 auto; }
.gw-wheel__core { text-align: center; }
.gw-wheel__lbl {
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-mute);
}
.gw-wheel__val { font-size: var(--fs-h2); font-weight: 900; }

.gw-view__meta {
  display: flex; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--text-dim);
}
.gw-view__meta svg { width: 13px; height: 13px; vertical-align: -2px; }

.gw-view__list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }
.gw-row {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 7px var(--sp-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
}
.gw-row.is-you { background: var(--surface-2); }
.gw-row.is-winner { background: rgba(52, 211, 153, .12); }
.gw-row__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.gw-row__name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-row__share { font-weight: 800; color: var(--text-dim); }


/* Первое место в таблице лидеров — голубым, как акцент приложения */
.lead--1 {
  border-color: var(--blue-500);
  background: linear-gradient(90deg, rgba(47,123,255,.22), rgba(47,123,255,.06));
  box-shadow: inset 0 0 0 1px rgba(53,210,245,.35);
}
.lead--1 .lead__name { color: var(--blue-300, #7FC4F0); font-weight: 800; }

/* Подпись «ты» на своём секторе колеса PvP */
.pvp-wheel__you {
  font-size: 5px;
  font-weight: 900;
  fill: #fff;
  letter-spacing: .04em;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, .55);
  stroke-width: 1.4px;
  pointer-events: none;
}
