/* =============================================================
/* GATES OF OLYMPUS — Stylesheet
   Sections:
     1. Variables & Reset
     2. Base Layout
     3. Loading Screen
     4. Main Menu
     5. Game Root & Clouds
     6. Reel Grid & Tiles
     7. Win Highlights
     8. HUD & Controls
     9. Overlays (Free Spins, Buy Modal)
    10. Paytable
    11. Animations
   ============================================================= */


/* ── 1. Variables & Reset ─────────────────────────────────── */
:root {
  --gold:   #f5c842;
  --gold2:  #ffd700;
  --marble: #e8dfc8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ── 2. Base Layout ───────────────────────────────────────── */
body {
  background: #0a0e2a;
  font-family: 'Rajdhani', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, #1a2a6c, #0a0e2a 60%);
  z-index: 0;
}

body.freespin-mode::before {
  background: radial-gradient(ellipse at 50% 0%, #3a1f00, #1a0a00 40%, #0a0510);
}


/* ── 3. Loading Screen ────────────────────────────────────── */
#loadingScreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(ellipse at 50% 30%, #0e1a5e, #050b2a 60%, #000510);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity .8s, visibility .8s;
}

#loadingScreen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.load-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle linear infinite;
}

.load-zeus {
  font-size: clamp(70px, 15vw, 130px);
  animation: zFloat 2s ease-in-out infinite alternate, fadeD .8s .1s ease both;
  margin-bottom: 40px;
  filter: drop-shadow(0 0 30px rgba(255, 200, 0, .5));
}

.load-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(28px, 7vw, 64px);
  font-weight: 900;
  background: linear-gradient(135deg, #5a3a00, var(--gold2), #fff8c0, var(--gold2), #5a3a00);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(255, 200, 0, .7));
  letter-spacing: 5px;
  animation: shine 2s linear infinite, fadeD .8s ease both;
  margin-bottom: 6px;
}

.load-subtitle {
  color: rgba(220, 200, 150, .7);
  font-size: clamp(10px, 2vw, 15px);
  letter-spacing: 6px;
  margin-bottom: 50px;
  animation: fadeD .8s .2s ease both;
}

.load-bar-wrap {
  width: clamp(200px, 50vw, 380px);
  height: 8px;
  background: rgba(255, 255, 255, .08);
  border-radius: 10px;
  border: 1px solid rgba(255, 200, 0, .25);
  overflow: hidden;
  margin-bottom: 12px;
}

.load-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #c8860a, var(--gold2), #fff8a0, var(--gold2));
  border-radius: 10px;
  transition: width .12s linear;
  box-shadow: 0 0 10px rgba(255, 200, 0, .8);
}

.load-pct {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 2px;
}

.load-tip {
  margin-top: 20px;
  font-size: clamp(9px, 1.5vw, 12px);
  color: rgba(200, 180, 120, .5);
  letter-spacing: 1px;
  text-align: center;
  max-width: 320px;
  animation: tipF 2s ease-in-out infinite alternate;
}


/* ── 4. Main Menu ─────────────────────────────────────────── */
#mainMenu {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s, visibility .6s;
}

#mainMenu.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.menu-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 20%, #0e1e70, #060e3a 55%, #020510);
  z-index: 0;
}

.menu-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(80, 30, 0, .4), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(80, 30, 0, .4), transparent 50%);
}

.pillar {
  position: absolute;
  bottom: 0;
  width: clamp(40px, 7vw, 80px);
  height: 85vh;
  background: linear-gradient(90deg, #a08040, #e8d080 30%, #c8a850 55%, #f0e090 65%, #c8a850 80%, #a08040);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 0 30px rgba(200, 160, 60, .3);
  z-index: 1;
}

.pillar::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -14px;
  right: -14px;
  height: 36px;
  background: linear-gradient(90deg, #8a6820, #e8d080, #8a6820);
  border-radius: 4px;
}

.pillar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -14px;
  right: -14px;
  height: 24px;
  background: linear-gradient(90deg, #8a6820, #e8d080, #8a6820);
}

.pillar.left  { left:  clamp(10px, 5vw, 60px); }
.pillar.right { right: clamp(10px, 5vw, 60px); }

.menu-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: linear-gradient(180deg, #8a6a20, #4a3208);
  z-index: 2;
  box-shadow: 0 -4px 20px rgba(200, 150, 0, .3);
}

.menu-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
}

.menu-zeus {
  font-size: clamp(80px, 18vw, 160px);
  animation: mZeus 3s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 40px rgba(255, 200, 0, .6));
  line-height: 1;
}

.menu-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(24px, 6vw, 60px);
  font-weight: 900;
  background: linear-gradient(135deg, #5a3a00, var(--gold2) 30%, #fff8c0 50%, var(--gold2) 70%, #5a3a00);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(255, 200, 0, .6));
  letter-spacing: 4px;
  animation: shine 3s linear infinite;
  line-height: 1.1;
}

.menu-tagline {
  font-size: clamp(10px, 2vw, 16px);
  color: rgba(230, 210, 150, .75);
  letter-spacing: 4px;
}

.menu-divider {
  width: clamp(120px, 40vw, 300px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .6;
}

.menu-play-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(16px, 3vw, 24px);
  font-weight: 900;
  letter-spacing: 4px;
  padding: clamp(14px, 2.5vw, 20px) clamp(40px, 8vw, 80px);
  background: linear-gradient(135deg, #8b5e00, var(--gold2), #fff0a0, var(--gold2), #8b5e00);
  background-size: 200%;
  color: #1a0800;
  border: none;
  border-radius: 60px;
  cursor: pointer;
  animation: shine 2s linear infinite, pPulse 2s ease-in-out infinite alternate;
  transition: transform .2s;
}

.menu-play-btn:hover  { transform: scale(1.08); box-shadow: 0 0 60px rgba(255, 200, 0, .9); }
.menu-play-btn:active { transform: scale(.96); }

.menu-info-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.menu-badge {
  background: rgba(255, 200, 0, .08);
  border: 1px solid rgba(255, 200, 0, .25);
  border-radius: 30px;
  padding: 6px 16px;
  font-size: clamp(9px, 1.5vw, 12px);
  color: rgba(230, 210, 150, .8);
  letter-spacing: 1px;
}

.menu-lightning-l,
.menu-lightning-r {
  position: absolute;
  font-size: clamp(24px, 5vw, 48px);
  animation: bFlash 1.5s ease-in-out infinite;
  z-index: 5;
}

.menu-lightning-l { left:  clamp(80px, 14vw, 160px); top: 28%; }
.menu-lightning-r { right: clamp(80px, 14vw, 160px); top: 33%; animation-delay: .7s; }


/* ── 5. Game Root & Clouds ────────────────────────────────── */
#gameRoot {
  transition: opacity .5s;
}

#gameRoot.hidden {
  opacity: 0;
  pointer-events: none;
}

.clouds {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  overflow: hidden;
  z-index: 0;
  opacity: .3;
}

.cloud {
  position: absolute;
  background: #fff;
  border-radius: 50px;
  filter: blur(20px);
  animation: drift linear infinite;
}

.cloud:nth-child(1) { width: 200px; height: 60px; top: 20px; left: -200px; animation-duration: 25s; }
.cloud:nth-child(2) { width: 300px; height: 80px; top: 50px; left: -300px; animation-duration: 35s; animation-delay: 5s; }
.cloud:nth-child(3) { width: 150px; height: 45px; top: 10px; left: -150px; animation-duration: 20s; animation-delay: 12s; }

/* ============================================================
/* PLINKO GAME — UNIFIED STYLES
   Desktop-first, then scales down via breakpoints
   ============================================================ */

/* Game Wrapper */
.game-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  width: 100%;
  max-width: 680px;
  box-sizing: border-box;
}

/* Title */
.title-banner {
  background: linear-gradient(135deg, #8b6914, var(--gold) 40%, #fff5a0 55%, var(--gold) 70%, #8b6914);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(14px, 3.5vw, 36px);
  font-weight: 900;
  letter-spacing: 4px;
  filter: drop-shadow(0 0 10px rgba(255, 200, 0, .5));
  text-align: center;
  width: 100%;
}

/* Top Row / Balance */
.top-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.balance-pill {
  background: rgba(10, 20, 60, .9);
  border: 1.5px solid rgba(245, 200, 66, .4);
  border-radius: 20px;
  padding: 4px 14px;
  color: var(--gold2);
  font-size: 14px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.balance-pill .lbl {
  color: rgba(255,255,255,.5);
  font-size: 10px;
  letter-spacing: 1px;
}

/* Board + History side by side (desktop/tablet) */
.board-with-history {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

/* Plinko Board */
.plinko-container {
  flex: 1;
  min-width: 0;
  height: 500px;
  background: rgba(10, 20, 60, 0.6);
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

/* History Side Strip */
.win-history-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 46px;
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-top: 2px;
  flex-shrink: 0;
}

.win-history-side::-webkit-scrollbar { display: none; }

/* History Bottom Strip (mobile only, hidden on desktop) */
.win-history-bottom {
  display: none;
}

.side-pill {
  width: 100%;
  min-height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  animation: pillDrop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.side-pill.pill-big  { background: #e67e22; }
.side-pill.pill-win  { background: #27ae60; }
.side-pill.pill-mid  { background: #2980b9; }
.side-pill.pill-loss { background: #c0392b; }

@keyframes pillDrop {
  from { transform: translateY(-16px) scale(0.8); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Pegs */
.peg {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,0.8);
  z-index: 2;
  pointer-events: none;
  transition: background 0.05s, box-shadow 0.05s;
}

.peg.peg-hit {
  background: #ff69b4;
  box-shadow:
    0 0 6px 2px rgba(255,105,180,0.7),
    0 0 14px 4px rgba(255,105,180,0.5),
    0 0 28px 8px rgba(255,105,180,0.25);
  animation: pegPop 0.3s ease-out forwards;
}

@keyframes pegPop {
  0%   { transform: translate(var(--tx,0), var(--ty,0)) scale(1); }
  40%  { transform: translate(var(--tx,0), var(--ty,0)) scale(2.2); }
  100% { transform: translate(var(--tx,0), var(--ty,0)) scale(1); }
}

/* Slot Strip */
.slot-container {
  position: absolute;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.slot {
  margin: 0 1px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  border-radius: 4px;
  transition: transform 0.1s;
}

.slot.slot-hit { animation: slotFlash 0.9s ease-out forwards; }

@keyframes slotFlash {
  0%   { transform: scaleY(1);    filter: brightness(1);   box-shadow: none; }
  15%  { transform: scaleY(1.25); filter: brightness(3);   box-shadow: 0 0 18px 6px rgba(255,255,255,1), 0 -10px 24px 4px rgba(255,255,255,0.8); }
  40%  { transform: scaleY(1.15); filter: brightness(2);   box-shadow: 0 0 12px 4px rgba(255,255,255,0.6); }
  100% { transform: scaleY(1);    filter: brightness(1);   box-shadow: none; }
}

/* Floating Win Text */
.float-win-text {
  position: absolute;
  transform: translateX(-50%);
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,220,50,1), 0 1px 3px rgba(0,0,0,0.8);
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  60%  { opacity: 1; transform: translateX(-50%) translateY(-28px); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-44px); }
}

/* Controls Panel */
.plinko-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0,0,0,0.5);
  padding: 16px;
  border-radius: 15px;
  width: 100%;
  box-sizing: border-box;
}

.controls-top-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.controls-top-row .control-group { flex: 1; min-width: 0; }

/* Control Labels */
.rows-control label,
.risk-control label,
.bet-control label {
  font-size: 11px;
  letter-spacing: 2px;
  color: #ff69b4;
  margin-bottom: 5px;
  display: block;
  font-family: 'Orbitron', sans-serif;
}

/* Rows Slider */
.rows-slider-wrap {
  position: relative;
  width: 100%;
  height: 36px;
  background: #2a0a3a;
  border-radius: 999px;
  border: 2px solid rgba(200,50,120,0.5);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  overflow: visible;
}

.rows-value {
  position: absolute;
  left: 14px;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 0 8px rgba(255,100,150,0.8);
  line-height: 1;
}

#rowsSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 36px;
  border-radius: 999px;
  background: transparent;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  margin: 0;
}

#rowsSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #ff6688, #d4004a);
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 0 10px rgba(220,0,80,0.9);
  cursor: pointer;
  transition: transform 0.1s;
}

#rowsSlider::-webkit-slider-thumb:hover { transform: scale(1.1); }

#rowsSlider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #ff6688, #d4004a);
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
}

/* Risk Picker */
.risk-picker {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  background: #2a0a3a;
  border-radius: 999px;
  border: 2px solid rgba(200,50,120,0.5);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
  overflow: hidden;
}

.risk-arrow {
  width: 36px;
  height: 100%;
  background: rgba(200,50,120,0.35);
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
  padding-bottom: 2px;
}

.risk-arrow:hover  { background: rgba(220,50,130,0.65); }
.risk-arrow:active { background: rgba(255,50,130,0.85); }

#riskLabel {
  flex: 1;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255,100,180,0.9);
  pointer-events: none;
}

/* Bet Picker */
.bet-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bet-picker {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  background: #2a0a3a;
  border-radius: 999px;
  border: 2px solid rgba(200,50,120,0.5);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
  overflow: hidden;
}

.bet-arrow {
  width: 42px;
  height: 100%;
  background: rgba(200,50,120,0.35);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.bet-arrow:hover  { background: rgba(220,50,130,0.65); }
.bet-arrow:active { background: rgba(255,50,130,0.85); transform: scale(0.93); }

#betLabel {
  flex: 1;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255,100,180,0.9);
  pointer-events: none;
}

/* Drop Ball Button */
.spin-btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, #c8860a, var(--gold2), #c8860a);
  color: #1a0a00;
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 0 20px rgba(245,200,66,0.5);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.spin-btn:hover:not(:disabled) { box-shadow: 0 0 35px rgba(245,200,66,0.8); transform: scale(1.03); }
.spin-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* No Balance Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden { display: none !important; }

.modal-box {
  background: linear-gradient(160deg, #2a0a3a, #1a051f);
  border: 2px solid rgba(220,50,120,0.6);
  border-radius: 20px;
  padding: 32px 28px 24px;
  max-width: min(320px, 88vw);
  width: 100%;
  text-align: center;
  box-shadow: 0 0 40px rgba(200,0,100,0.4), 0 20px 60px rgba(0,0,0,0.6);
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-icon {
  font-size: 44px;
  margin-bottom: 12px;
  animation: iconBounce 0.4s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.modal-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 900;
  color: #ff69b4;
  margin-bottom: 10px;
}

.modal-msg {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: rgba(230,200,220,0.75);
  line-height: 1.6;
  margin-bottom: 22px;
}

.modal-close-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 3px;
  padding: 11px 36px;
  background: linear-gradient(135deg, #a0004a, #e0006a, #ff69b4, #e0006a, #a0004a);
  background-size: 200%;
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  animation: shine 2s linear infinite;
  transition: transform 0.15s;
}

.modal-close-btn:hover  { transform: scale(1.07); }
.modal-close-btn:active { transform: scale(0.96); }

@keyframes modalPop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

@keyframes iconBounce {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

/* ============================================================
   TABLET  (max-width: 600px)
   - Board shrinks to fit width
   - Controls stay side-by-side but smaller
   ============================================================ */
@media (max-width: 600px) {
  .game-wrapper {
    padding: 10px 8px;
    gap: 8px;
    max-width: 100vw;
  }

  .title-banner {
    font-size: clamp(12px, 5vw, 22px);
    letter-spacing: 1px;
  }

  .balance-pill {
    font-size: 12px;
    padding: 3px 10px;
  }

  .balance-pill .lbl { font-size: 9px; }

  .plinko-container {
    height: clamp(220px, 72vw, 420px);
  }

  .win-history-side {
    max-height: clamp(220px, 72vw, 420px);
    width: 36px;
  }

  .side-pill {
    min-height: 28px;
    font-size: 7px;
    border-radius: 5px;
  }

  .slot {
    height: 22px;
    font-size: 6px;
  }

  .plinko-controls {
    padding: 12px 10px;
    gap: 9px;
    border-radius: 12px;
  }

  .controls-top-row { gap: 8px; }

  .rows-slider-wrap,
  .risk-picker,
  .bet-picker {
    height: 32px;
  }

  .rows-value,
  #riskLabel,
  #betLabel {
    font-size: 12px;
    letter-spacing: 1px;
  }

  .risk-arrow,
  .bet-arrow {
    width: 30px;
    font-size: 18px;
  }

  .rows-control label,
  .risk-control label,
  .bet-control label {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .spin-btn {
    height: 44px;
    font-size: 13px;
    letter-spacing: 2px;
  }
}

/* ============================================================
   MOBILE  (max-width: 480px)
   - Board fills full width
   - History moves BELOW board as horizontal strip
   - Controls stack, smaller
   ============================================================ */
@media (max-width: 480px) {
  .game-wrapper {
    padding: 8px 6px;
    gap: 6px;
  }

  .title-banner {
    font-size: clamp(11px, 5.5vw, 18px);
    letter-spacing: 0.5px;
  }

  /* Stack board and history vertically */
  .board-with-history {
    flex-direction: column;
    gap: 5px;
  }

  /* Board fills full width */
  .plinko-container {
    width: 100% !important;
    height: clamp(360px, 110vw, 520px);
  }

  /* Hide vertical history strip */
  .win-history-side {
    display: none !important;
  }

  /* Show horizontal bottom history strip */
  .win-history-bottom {
    display: flex;
    flex-direction: row;
    gap: 5px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 2px 0;
  }

  .win-history-bottom::-webkit-scrollbar { display: none; }

  .win-history-bottom .side-pill {
    width: auto;
    min-width: 38px;
    height: 28px;
    min-height: unset;
    padding: 0 8px;
    font-size: 8px;
    flex-shrink: 0;
    border-radius: 6px;
    animation: pillSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @keyframes pillSlideIn {
    from { transform: translateX(-12px) scale(0.8); opacity: 0; }
    to   { transform: translateX(0) scale(1); opacity: 1; }
  }

  .slot {
    height: 20px;
    font-size: 6px;
  }

  .plinko-controls {
    padding: 10px 8px;
    gap: 8px;
  }

  .controls-top-row {
    gap: 6px;
  }

  .rows-slider-wrap,
  .risk-picker,
  .bet-picker {
    height: 30px;
  }

  .rows-value,
  #riskLabel,
  #betLabel {
    font-size: 11px;
    letter-spacing: 0.5px;
  }

  .risk-arrow,
  .bet-arrow {
    width: 28px;
    font-size: 16px;
  }

  .rows-control label,
  .risk-control label,
  .bet-control label {
    font-size: 8px;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
  }

  .spin-btn {
    height: 40px;
    font-size: 12px;
    letter-spacing: 1.5px;
  }

  .balance-pill {
    font-size: 11px;
    padding: 3px 9px;
  }
}

/* ============================================================
   SMALL MOBILE  (max-width: 360px)
   ============================================================ */
@media (max-width: 360px) {
  .plinko-container {
    height: clamp(320px, 108vw, 460px);
  }

  .title-banner {
    font-size: 11px;
  }

  .spin-btn {
    height: 38px;
    font-size: 11px;
  }
}

/* Canvas always fills container */
#plinkoCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}