/* АНАРХИЯ · казино. Берёт общие стили магазина (shop-v2.css: кошелёк, кнопка,
   подписи) и добавляет рулетку и слоты. Свои классы cx-*. */
.cx { --cx-cell: 76px; }
.cx .sx-svg { width: 18px; height: 18px; }
.cx [hidden] { display: none !important; }

/* Переключатель игр */
.cx-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px;
  background: rgba(18, 16, 30, .78); border: 1px solid rgba(255, 255, 255, .08); }
.cx-switch button { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border-radius: 12px; cursor: pointer; font: 650 15px var(--nx-font, system-ui); color: var(--nx-muted, #8c86ad); }
.cx-switch button[aria-selected=true] { color: #fff; background: rgba(255, 255, 255, .09); }
.cx-switch button:focus-visible { outline: 2px solid var(--nx-cyan, #2fe6ff); }
.cx-game { display: grid; gap: 12px; }

/* Колесо */
.cx-wheel-wrap { position: relative; width: min(78vw, 320px); aspect-ratio: 1; justify-self: center; margin-top: 10px; }
.cx-wheel { width: 100%; height: 100%; display: block; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55)); }
#cx-wheel-g { will-change: transform; }
.cx-wheel-num { fill: #fff; font: 700 11px var(--nx-font, system-ui); text-anchor: middle; dominant-baseline: central; }
.cx-pointer { position: absolute; z-index: 2; top: -8px; left: 50%; width: 22px; height: 26px; transform: translateX(-50%);
  background: linear-gradient(#fff, #ffd166); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); }
.cx-wheel-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cx-wheel-center span { font: 600 14px var(--nx-font, system-ui); color: var(--nx-muted, #8c86ad); }

/* Шары с числами */
.cx-ball { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; box-sizing: border-box; border-radius: 999px;
  font: 700 13px var(--nx-font, system-ui); color: #fff; flex: none; }
.cx-ball.is-red { background: #d42645; } .cx-ball.is-black { background: #2a2635; } .cx-ball.is-green { background: #13a35e; }
.cx-ball.is-big { min-width: 64px; height: 64px; font: 800 26px var(--nx-display, system-ui); box-shadow: 0 0 0 4px rgba(255, 255, 255, .1); }
.cx-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-height: 30px; justify-content: flex-start; }
.cx-strip::-webkit-scrollbar { display: none; }
.cx-strip .cx-ball { min-width: 28px; height: 28px; font-size: 12px; }
.cx-strip .cx-ball:first-child { box-shadow: 0 0 0 2px #fff; }

/* Результат */
.cx-result { min-height: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  text-align: center; font-size: 15px; line-height: 1.4; color: var(--nx-ink-2, #c9c4e3); }
.cx-result.is-win { color: #35e0a1; } .cx-result.is-win b { color: #fff; }
.cx-result.is-lose { color: #ff8a96; }

/* Выбор ставки рулетки */
.cx-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cx-pick { all: unset; box-sizing: border-box; display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px;
  cursor: pointer; text-align: center; background: rgba(18, 16, 30, .78); border: 2px solid rgba(255, 255, 255, .08); }
.cx-pick b { font: 700 15px var(--nx-font, system-ui); color: #fff; }
.cx-pick span { font-size: 13px; font-weight: 700; color: var(--nx-gold, #ffd166); }
.cx-pick.is-red { background: linear-gradient(160deg, rgba(212, 38, 69, .35), rgba(18, 16, 30, .8)); }
.cx-pick.is-black { background: linear-gradient(160deg, rgba(70, 64, 90, .45), rgba(18, 16, 30, .8)); }
.cx-pick.is-num { background: linear-gradient(160deg, rgba(19, 163, 94, .3), rgba(18, 16, 30, .8)); }
.cx-pick[aria-checked=true] { border-color: #fff; }
.cx-pick:focus-visible { outline: 2px solid var(--nx-cyan, #2fe6ff); outline-offset: 2px; }
.cx-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.cx-cell { all: unset; box-sizing: border-box; display: grid; place-items: center; height: 40px; border-radius: 10px; cursor: pointer;
  font: 700 14px var(--nx-font, system-ui); color: #fff; border: 2px solid transparent; }
.cx-cell.is-red { background: #b51f3b; } .cx-cell.is-black { background: #2a2635; } .cx-cell.is-green { background: #13a35e; }
.cx-cell.is-zero { grid-column: 1 / -1; }
.cx-cell[aria-pressed=true] { border-color: #fff; box-shadow: 0 0 0 2px #120f1e inset, 0 0 14px rgba(255, 255, 255, .35); }
.cx-cell:focus-visible { outline: 2px solid var(--nx-cyan, #2fe6ff); }

/* Слот-машина */
.cx-machine { position: relative; padding: 12px; border-radius: 24px; margin-top: 6px;
  background: linear-gradient(160deg, #241a38, #120f1e 70%); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 20px 40px rgba(0, 0, 0, .45); }
.cx-reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cx-reel { position: relative; height: calc(var(--cx-cell) * 3); overflow: hidden; border-radius: 16px; background: #0b0913;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.cx-reel::before, .cx-reel::after { content: ""; position: absolute; left: 0; right: 0; height: var(--cx-cell); z-index: 1; pointer-events: none; }
.cx-reel::before { top: 0; background: linear-gradient(#0b0913, rgba(11, 9, 19, .35)); }
.cx-reel::after { bottom: 0; background: linear-gradient(rgba(11, 9, 19, .35), #0b0913); }
.cx-reel-strip { will-change: transform; }
.cx-cellsym { display: grid; place-items: center; height: var(--cx-cell); }
.cx-sym { width: 50px; height: 50px; }
.cx-payline { position: absolute; left: 6px; right: 6px; top: calc(12px + var(--cx-cell)); height: var(--cx-cell); border-radius: 14px; pointer-events: none;
  border: 2px solid rgba(255, 209, 102, .35); transition: border-color .2s, box-shadow .2s; }
.cx-payline.is-win { border-color: #ffd166; box-shadow: 0 0 22px rgba(255, 209, 102, .55); }
.cx-sym-sm { width: 26px; height: 26px; }
.cx-paytable { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cx-pay { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 12px;
  background: rgba(18, 16, 30, .78); border: 1px solid rgba(255, 255, 255, .07); }
.cx-pay-syms { display: flex; align-items: center; gap: 1px; }
.cx-pay-syms .cx-sym { width: 22px; height: 22px; }
.cx-pay-syms i { font-style: normal; font-size: 11px; color: var(--nx-muted, #8c86ad); margin-left: 3px; }
.cx-pay b { font-size: 14px; color: var(--nx-gold, #ffd166); }

/* Ставка */
.cx-bet { display: grid; gap: 10px; }
.cx-amount { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; }
.cx-step { all: unset; box-sizing: border-box; display: grid; place-items: center; height: 52px; border-radius: 14px; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .07); }
.cx-step:active { background: rgba(255, 255, 255, .12); }
.cx-step:focus-visible { outline: 2px solid var(--nx-cyan, #2fe6ff); }
#cx-amount { box-sizing: border-box; width: 100%; height: 52px; padding: 0 12px; border-radius: 14px; text-align: center;
  font: 700 20px var(--nx-display, system-ui); color: #fff; background: rgba(18, 16, 30, .78); border: 1px solid rgba(255, 255, 255, .12);
  outline: none; -moz-appearance: textfield; }
#cx-amount::-webkit-outer-spin-button, #cx-amount::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#cx-amount:focus { border-color: var(--nx-cyan, #2fe6ff); }
.cx-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cx-quick button { all: unset; box-sizing: border-box; text-align: center; padding: 9px 0; border-radius: 12px; cursor: pointer;
  font: 600 14px var(--nx-font, system-ui); color: var(--nx-ink-2, #c9c4e3); background: rgba(255, 255, 255, .05); }
.cx-quick button:active { background: rgba(255, 255, 255, .1); }
.cx-quick button:focus-visible { outline: 2px solid var(--nx-cyan, #2fe6ff); }
.cx-hint { margin: 0; font-size: 14px; line-height: 1.45; color: var(--nx-ink-2, #c9c4e3); }
.cx-hint b { color: #fff; }
.cx-error { margin: 0; min-height: 0; text-align: center; font-size: 14px; color: #ff8a96; }
.cx-error:empty { display: none; }
.cx.is-busy .cx-picks, .cx.is-busy .cx-board, .cx.is-busy .cx-switch, .cx.is-busy .cx-amount, .cx.is-busy .cx-quick { opacity: .55; pointer-events: none; }

/* История */
.cx-history { display: grid; gap: 8px; }
.cx-hist-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.cx-hist-row + .cx-hist-row { border-top: 1px solid rgba(255, 255, 255, .06); }
.cx-hist-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.cx-hist-text b { font-size: 14px; color: #fff; }
.cx-hist-text small { font-size: 12px; color: var(--nx-muted, #8c86ad); }
.cx-hist-syms { display: flex; gap: 2px; }
.cx-hist-syms .cx-sym { width: 26px; height: 26px; }
.cx-net { font-weight: 700; font-size: 14px; flex: none; }
.cx-net.is-win { color: #35e0a1; } .cx-net.is-lose { color: var(--nx-muted, #8c86ad); }
.cx-empty { margin: 0; padding: 14px; font-size: 14px; color: var(--nx-muted, #8c86ad); text-align: center; }

@media (max-width: 360px) { .cx { --cx-cell: 66px; } .cx-sym { width: 42px; height: 42px; } }
