/* ============ Velo Spin on the painted plate (design/v2/spin.webp) ============
   Sizes use var(--u) = one plate pixel, so everything scales with the painting. */

/* The painted wheel turns under the plate's rim (a copy of the plate drawn over the wheel's edge) */
.game-spin .sp-wheel { z-index: 1; pointer-events: none; will-change: transform; }
.game-spin .sp-copy {
  background-image: url("../../img/v2/plates/spin.webp");
  background-repeat: no-repeat;
  background-size: calc(941 * var(--u)) calc(1672 * var(--u));
  pointer-events: none;
}
.game-spin .sp-rim { z-index: 2; }
.game-spin .sp-pointer { z-index: 4; clip-path: polygon(0 0, 100% 0, 50% 96.4%); transform-origin: 50% 8%; }
.game-spin .sp-pointer.tick { animation: sp-tick 0.12s ease-out; }
@keyframes sp-tick { 50% { filter: brightness(1.35); } }

/* Rim bulbs: extra glow on top of the painted ones (chase while spinning) */
.game-spin .sp-bulb {
  z-index: 3;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 252, 225, 0.95) 0 14%, rgba(255, 220, 120, 0.55) 30%, rgba(255, 180, 60, 0) 68%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.35s;
}
.game-spin .sp-bulb.on { opacity: 0.55; }
.game-spin .sp-spinning .sp-bulb { transition: opacity 0.06s; }
.game-spin .sp-spinning .sp-bulb.on { opacity: 1; }
.game-spin .sp-bulb.dim {
  opacity: 1;
  mix-blend-mode: multiply;
  background: radial-gradient(circle, rgba(120, 70, 20, 0.75) 0 20%, rgba(160, 100, 40, 0.3) 34%, rgba(255, 255, 255, 0) 50%);
}

/* Centre: gold frame + VELO SPIN emblem, fixed (the wheel turns under it) */
.game-spin .sp-hubring {
  z-index: 3;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #2A0B3E 0 58%, #120418 72%);
  box-shadow:
    inset 0 0 0 calc(5 * var(--u)) #F3C766,
    inset 0 0 0 calc(8 * var(--u)) #7A4A0E,
    inset 0 0 0 calc(11 * var(--u)) #E2A944,
    inset 0 0 calc(30 * var(--u)) calc(14 * var(--u)) rgba(0, 0, 0, 0.7),
    0 0 0 calc(2 * var(--u)) #5A3206,
    0 calc(8 * var(--u)) calc(22 * var(--u)) rgba(0, 0, 0, 0.65);
}
.game-spin .sp-hubring i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
  margin: calc(-15 * var(--u));
  background: linear-gradient(135deg, #FFF3C0, #F2C35A 45%, #A8680F);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #7A4A0E, 0 calc(2 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, 0.5);
}
.game-spin .sp-hubring i:nth-child(1) { transform: translateY(calc(-128 * var(--u))) rotate(45deg) scaleY(1.3); }
.game-spin .sp-hubring i:nth-child(2) { transform: translateX(calc(128 * var(--u))) rotate(45deg) scaleX(1.3); }
.game-spin .sp-hubring i:nth-child(3) { transform: translateY(calc(128 * var(--u))) rotate(45deg) scaleY(1.3); }
.game-spin .sp-hubring i:nth-child(4) { transform: translateX(calc(-128 * var(--u))) rotate(45deg) scaleX(1.3); }
.game-spin .sp-hub { z-index: 4; }
.game-spin .sp-hub img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 calc(4 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, 0.55)); }
.game-spin .sp-hub:active { transform: scale(0.97); }

/* BET AMOUNT: coin + amount in the painted box */
.game-spin .sp-bet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(24 * var(--u));
  padding-right: calc(4 * var(--u));
  pointer-events: none;
  z-index: 2;
}
.game-spin .sp-coin { width: calc(66 * var(--u)); height: calc(66 * var(--u)); flex: none; filter: drop-shadow(0 calc(3 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, 0.6)); }
.game-spin .sp-bet b {
  font-family: "Helvetica Neue", "sans-serif-condensed", "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: calc(80 * var(--u));
  line-height: 1;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  text-shadow: 0 calc(3 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, 0.7);
}
.game-spin .sp-bet.wide { gap: calc(20 * var(--u)); }
.game-spin .sp-bet.wide b { font-size: calc(72 * var(--u)); }
.game-spin .sp-step { border-radius: 50%; z-index: 2; }
.game-spin .sp-step:not(:disabled):active { background: rgba(255, 255, 255, 0.14); }
.game-spin .sp-step:disabled::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(8, 3, 16, 0.55); }

/* SPIN: the painting is the button */
.game-spin .sp-spin { z-index: 2; border-radius: calc(103 * var(--u)); }
.game-spin .sp-spin:not(:disabled):active { background: rgba(255, 255, 255, 0.1); transform: scale(0.985); }
.game-spin .sp-spin:disabled::after { content: ""; position: absolute; inset: calc(10 * var(--u)); border-radius: calc(95 * var(--u)); background: rgba(8, 3, 16, 0.5); }

.game-spin .sp-fine { font-family: -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif; font-weight: 400; font-size: calc(23 * var(--u)); line-height: 1; color: #BDB3CC; word-spacing: 0.08em; transform: translateY(-50%); }

/* Odds table in the help */
.sp-help table { width: 100%; }
