/* Design overrides for the built-in arcade games (Dice, Dice 3D, Slots, Slots 3D, Heads or Tails, Plinko, Keno, Lucky Wheel,
   Crypto prediction, Raffles). Owned by one work session at a time (qa-arcade, 2026-11-18).
   Every rule is scoped to html[data-arcade], which arcade.js sets only on these games' pages. Design v2 tokens come from v2.css. */

html[data-arcade] {
  --arc-lime: 198, 242, 78;
  --arc-panel: rgba(18, 28, 22, .78);
  --arc-line: var(--line, rgba(240, 240, 230, .1));
  --arc-radius: var(--radius, 18px);
}

/* ---------- shared: the bet bar becomes one docked panel, a bigger Play button ---------- */
html[data-arcade] .game-container .d-flex.justify-center.align-center.flex-wrap.mt-3.ga-3 {
  background: var(--arc-panel);
  border: 1px solid var(--arc-line);
  border-radius: var(--arc-radius);
  padding: 10px 12px;
  margin-left: auto !important;
  margin-right: auto !important;
  width: fit-content;
  max-width: calc(100% - 24px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
html[data-arcade] .game-container .d-flex.flex-wrap.ga-3 .v-field__input {
  min-width: 64px;
}
@media (min-width: 600px) {
  html[data-arcade] .game-container .d-flex.justify-center.align-center.flex-wrap.mt-3.ga-3 {
    flex-wrap: nowrap !important;
  }
}
/* phones: Play goes under the bet fields, full width, easy to hit with a thumb */
@media (max-width: 599px) {
  html[data-arcade] .game-container .d-flex.justify-center.align-center.flex-wrap.mt-3.ga-3 {
    width: calc(100% - 24px);
    padding: 10px;
  }
  html[data-arcade] .game-container .d-flex.flex-wrap.ga-3 > .v-btn.bg-primary {
    flex: 1 1 100%;
  }
}
html[data-arcade] .game-container .d-flex.flex-wrap.ga-3 > .v-btn.bg-primary {
  height: 44px !important;
  min-width: 128px;
  padding: 0 26px !important;
  border-radius: 12px !important;
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .01em;
  text-transform: none;
  box-shadow: 0 0 0 1px rgba(var(--arc-lime), .4), 0 8px 26px rgba(var(--arc-lime), .28);
  transition: transform .12s ease, box-shadow .2s ease;
}
html[data-arcade] .game-container .d-flex.flex-wrap.ga-3 > .v-btn.bg-primary:not(.v-btn--disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(var(--arc-lime), .6), 0 10px 32px rgba(var(--arc-lime), .4);
}
html[data-arcade] .game-container .d-flex.flex-wrap.ga-3 > .v-btn.bg-primary.v-btn--disabled {
  box-shadow: none;
}
html[data-arcade] .game-container .d-flex.flex-wrap.ga-3 .v-field {
  border-radius: 12px;
}
html[data-arcade] .game-container .d-flex.flex-wrap.ga-3 .v-field__input {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* toggles (Heads / Tails, roll under / over): pill with the active side in lime */
html[data-arcade] .game-container .v-btn-group.v-btn-toggle {
  border: 1px solid var(--arc-line);
  background: var(--arc-panel);
  padding: 3px;
  height: auto !important;
}
html[data-arcade] .game-container .v-btn-group.v-btn-toggle > .v-btn {
  border-radius: 999px !important;
  font-weight: 600;
  text-transform: none;
  min-height: 32px;
}

/* ---------- shared: the result message ---------- */
html[data-arcade] .game-container .message-container .v-alert {
  border-radius: 999px !important;
  padding: 6px 18px !important;
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .01em;
  background: var(--arc-panel);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
html[data-arcade][data-arcade-result="win"] .game-container .message-container .v-alert {
  color: rgb(var(--arc-lime)) !important;
  border-color: rgba(var(--arc-lime), .6) !important;
  box-shadow: 0 0 28px rgba(var(--arc-lime), .25);
}
html[data-arcade][data-arcade-result="loss"] .game-container .message-container .v-alert {
  color: rgb(170, 182, 170) !important;
  border-color: rgba(240, 240, 230, .18) !important;
}
html[data-arcade] .game-container .message-container .v-alert__content[data-arcade-win]::after {
  content: attr(data-arcade-win);
  margin-left: .5em;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}

/* ---------- Dice ---------- */
html[data-arcade="dice"] .game-dice .v-card {
  background: linear-gradient(180deg, rgba(44, 62, 50, .55), rgba(18, 28, 22, .9)) !important;
  border: 1px solid var(--arc-line);
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 28px rgba(0, 0, 0, .35) !important;
}
html[data-arcade="dice"] .game-dice .digit {
  font-family: var(--font-display, inherit) !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
html[data-arcade="dice"][data-arcade-result="win"] .game-dice .v-card .digit {
  color: rgb(var(--arc-lime));
  text-shadow: 0 0 22px rgba(var(--arc-lime), .45);
}

/* ---------- Dice 3D: the dice stage no longer pushes Play below the screen on a laptop ---------- */
html[data-arcade="dice-3d"] .game-dice-3d > .d-flex.justify-center.fill-height.align-center {
  height: auto !important;
  min-height: min(380px, 48dvh);
}

/* ---------- Heads or Tails: the old wooden table becomes a dark green felt ---------- */
html[data-arcade="heads-or-tails"] .static-background {
  background-image:
    radial-gradient(ellipse 55% 45% at 50% 46%, rgba(var(--arc-lime), .13), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 40%, #173323 0%, #0f2118 45%, #0a120e 100%) !important;
  background-size: cover !important;
}

/* ---------- Plinko: transparent board, Play stays on screen on a laptop ---------- */
html[data-arcade="plinko"] .game-plinko .game {
  flex: 0 1 auto !important;
}
html[data-arcade="plinko"] .game-plinko .game canvas {
  background-color: transparent !important;
  height: min(550px, calc(100dvh - 330px)) !important;
  min-height: 260px;
  width: auto !important;
  max-width: 100%;
  border-radius: var(--arc-radius);
}

/* ---------- Keno: calmer grid, clear states (picked, hit, missed) ---------- */
html[data-arcade="keno"] .game-keno .keno-btn::before,
html[data-arcade="keno"] .game-keno .keno-btn::after {
  border-radius: 10px;
}
html[data-arcade="keno"] .game-keno .keno-btn.normal::before {
  background: rgba(240, 240, 230, .16);
}
html[data-arcade="keno"] .game-keno .keno-btn.normal::after {
  opacity: 0;
}
html[data-arcade="keno"] .game-keno .keno-btn .t1,
html[data-arcade="keno"] .game-keno .keno-btn .t2 {
  border-radius: 9px;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
html[data-arcade="keno"] .game-keno .keno-btn.normal:hover::before {
  opacity: 1;
  background: rgba(var(--arc-lime), .55);
}
html[data-arcade="keno"] .game-keno .keno-btn.selected .t1 {
  box-shadow: 0 0 14px rgba(var(--arc-lime), .55) !important;
}
html[data-arcade="keno"] .game-keno .keno-btn.win::after {
  opacity: .9;
}
html[data-arcade="keno"] .game-keno .keno-btn.loss .t1,
html[data-arcade="keno"] .game-keno .keno-btn.loss .t2 {
  opacity: .55;
}

/* ---------- Raffles: cards without a banner get a short v2 header instead of a 300px empty block ---------- */
html[data-arcade="raffle"] main .v-card {
  border: 1px solid var(--arc-line);
  border-radius: var(--arc-radius) !important;
  overflow: hidden;
}
html[data-arcade="raffle"] main .v-card > .v-img:not(:has(img)) {
  height: 88px !important;
  background:
    radial-gradient(ellipse 60% 120% at 85% 0%, rgba(var(--arc-lime), .28), transparent 70%),
    repeating-linear-gradient(135deg, rgba(240, 240, 230, .035) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, #1d3624, #0f1d15);
}
html[data-arcade="raffle"] main .v-card > .v-img:not(:has(img)) .v-img__placeholder,
html[data-arcade="raffle"] main .v-card > .v-img:not(:has(img)) .v-responsive__sizer {
  display: none;
}
html[data-arcade="raffle"] main .v-card .v-list-item-title.headline {
  font-family: var(--font-display, inherit);
  font-weight: 700;
}
html[data-arcade="raffle"] main .v-card .v-progress-linear--striped {
  border-radius: 999px;
}
html[data-arcade="raffle"] main .v-card .v-progress-linear--striped .v-progress-linear__background {
  background: rgba(240, 240, 230, .08) !important;
  opacity: 1 !important;
}
html[data-arcade="raffle"] main .v-card .v-progress-linear--striped .v-progress-linear__determinate {
  background-color: rgba(var(--arc-lime), .8) !important;
}
html[data-arcade="raffle"] main .v-card .v-progress-linear__content .v-chip {
  background: rgba(10, 18, 14, .88) !important;
  color: rgb(240, 240, 230) !important;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ---------- Slots 3D: the empty space under the machine goes, Play stays on screen on a laptop ---------- */
html[data-arcade="slots-3d"] .game-slots-container {
  flex: 0 0 auto !important;
  height: calc(100dvh - 230px);
  min-height: 280px;
}

/* ---------- the win toast (arcade.js), for games that show no message after a win ---------- */
#arcade-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 2400;
  transform: translate(-50%, -10px);
  opacity: 0;
  pointer-events: none;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(18, 28, 22, .92);
  border: 1px solid rgba(198, 242, 78, .6);
  color: rgb(198, 242, 78);
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  box-shadow: 0 0 30px rgba(198, 242, 78, .25), 0 10px 30px rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: opacity .25s ease, transform .25s ease;
}
html[data-arcade] #arcade-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  #arcade-toast { transition: none; }
  html[data-arcade] .game-container .d-flex.flex-wrap.ga-3 > .v-btn.bg-primary { transition: none; }
}

/* ---------- Crypto prediction: the violet chart in design v2 colours ---------- */
html[data-arcade="crypto-prediction"] .chart stop[stop-color="#de87f6"] {
  stop-color: rgb(198, 242, 78);
}
html[data-arcade="crypto-prediction"] .chart stop[stop-color="#3cabff"] {
  stop-color: rgb(87, 217, 143);
}
html[data-arcade="crypto-prediction"] .chart [stroke="#de87f6"],
html[data-arcade="crypto-prediction"] .chart circle {
  stroke: rgb(198, 242, 78);
}
html[data-arcade="crypto-prediction"] .chart circle {
  fill: rgb(198, 242, 78);
}

/* ---------- Slots: fields wide enough for their labels ("Ставка", "Общая ставка") ---------- */
@media (min-width: 600px) {
  html[data-arcade="slots"] .game-container .d-flex.flex-wrap.ga-3 > .v-input:nth-of-type(2) {
    min-width: 230px;
  }
  html[data-arcade="slots"] .game-container .d-flex.flex-wrap.ga-3 > .v-input:nth-of-type(3) {
    min-width: 130px;
  }
}
/* ---------- Slots on phones: Lines and Total bet side by side, labels not cut ---------- */
@media (max-width: 599px) {
  html[data-arcade="slots"] .game-container .d-flex.flex-wrap.ga-3 > .v-input {
    flex: 1 1 140px;
    min-width: 140px;
  }
}

/* ---------- short screens (phones in landscape): the bet bar stays at the bottom edge, Play always reachable ---------- */
@media (max-height: 560px) {
  html[data-arcade] .game-container > :has(.d-flex.justify-center.align-center.flex-wrap.mt-3.ga-3) {
    position: sticky;
    bottom: calc(var(--v-layout-bottom, 0px) + 6px);
    z-index: 6;
  }
  html[data-arcade] .game-container .d-flex.justify-center.align-center.flex-wrap.mt-3.ga-3 {
    margin-top: 6px !important;
    padding: 6px 10px;
    background: rgba(14, 22, 18, .9);
  }
  html[data-arcade="plinko"] .game-plinko .game canvas {
    min-height: 200px;
  }
}

/* ---------- Keno: the 100,000 cap per round, under the paytable in "Game information" (arcade.js) ---------- */
html[data-arcade="keno"] .arcade-maxwin {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(198, 242, 78, .35);
  background: rgba(198, 242, 78, .08);
  color: rgb(240, 240, 230);
  font-weight: 600;
  font-size: .92rem;
  text-align: center;
}
