/* ── Game UI: HUD, controls, buttons, selectors ── */
/* Top-left: Galton board (compact) */

/* Row 1: P&L stats + badges + action buttons */
#pnl-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  padding: 4px 6px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  order: -1;
}

#pnl-info > span { white-space: nowrap; }

.pnl-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

/* Mobile menu button hidden on desktop; desktop buttons hidden on mobile */
.pnl-mobile-only { display: none; }

/* Mobile badge strip — hidden on desktop */
.mobile-badge-strip { display: none; }

.btn-sm {
  background: #334155;
  color: #e0e0e0;
  padding: 3px 7px !important;
  font-size: 11px !important;
  min-width: 0;
  letter-spacing: 0 !important;
}

/* Row 2: Difficulty + Product + Bet */
#pnl-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
  padding: 4px 8px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

#pnl-info .balance { color: #a0c4ff; font-weight: 700; }
#pnl-info .pnl-positive { color: #4ade80; font-weight: 700; }
#pnl-info .pnl-negative { color: #f87171; font-weight: 700; }
#pnl-info .pnl-flat { color: #94a3b8; font-weight: 700; }
#pnl-info .long { color: #4ade80; font-weight: 700; }
#pnl-info .short { color: #f87171; font-weight: 700; }

/* Controls bar */
#controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  padding: 8px 6px 46px;
  background: #16213e;
  border-top: 2px solid var(--border);
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 1px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

#btn-buy,
#btn-sell {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 8px;
  font-size: 14px;
  letter-spacing: 0.5px;
}

#btn-buy {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}
#btn-buy:hover:not(:disabled) { background: #16a34a; }

#btn-sell {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}
#btn-sell:hover:not(:disabled) { background: #dc2626; }

#btn-spin {
  flex: 1 1 100%;
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
  padding: 10px 8px;
  font-size: 14px;
}
#btn-spin:hover:not(:disabled) { background: #2563eb; }
#btn-spin.paused {
  background: #334155;
  color: #e0e0e0;
  box-shadow: none;
}

/* Round info */
#round-info {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  padding: 2px;
}
.ticker-label {
  color: #fbbf24;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Timer bar */
#timer-bar-container {
  height: 4px;
  background: #0f3460;
}
#timer-bar {
  height: 100%;
  background: #3b82f6;
  width: 0%;
  transition: width 0.08s linear;
}

/* Position info in controls */
.position-info {
  font-size: 12px;
  color: #94a3b8;
  min-width: 0;
  text-align: center;
  flex: 0 1 auto;
  padding: 0 2px;
}
.position-info .long { color: #4ade80; }
.position-info .short { color: #f87171; }
.position-info .flat { color: #94a3b8; }

/* Leverage indicator */

/* Difficulty selector — moved to Settings panel */
.diff-selector {
  display: none;
}

.diff-btn {
  padding: 4px 8px;
  border: 1px solid #0f3460;
  border-radius: 6px;
  background: #1a1a2e;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.diff-btn:hover { border-color: #3b82f6; color: #e0e0e0; }

.diff-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* Strategy selector */
.strategy-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

#sel-strategy {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
#sel-strategy:focus { outline: none; border-color: #3b82f6; }

#option-params {
  display: flex;
  align-items: center;
  gap: 4px;
}
#option-params select {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
#option-params select:focus { outline: none; border-color: #3b82f6; }

/* Bet size selector */
.bet-selector {
  display: flex;
  align-items: center;
  gap: 4px;
}

#sel-bet-pct {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
#sel-bet-pct:focus { outline: none; border-color: #3b82f6; }

.bet-label {
  font-size: 11px;
  color: var(--text-heading);
  font-weight: 700;
  white-space: nowrap;
}

.def-bet-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.def-bet-select:focus { outline: none; border-color: #3b82f6; }

#controls, #btn-buy, #btn-sell, #btn-spin {
  pointer-events: auto;
  touch-action: manipulation;
}

