/* ========================================================
   HALLOWEEN CRASH GAME - PURE VANILLA CSS
   ======================================================== */

:root {
  --bg-main: #120921;
  --bg-frame: #180f2d;
  --bg-panel: #1f1438;
  --bg-card: #261a44;
  --bg-input: #170d2b;
  --bg-button: #362254;
  --bg-button-hover: #482f70;
  
  --color-orange: #f59e0b;
  --color-orange-glow: #ffaa1a;
  --color-orange-dark: #d97706;
  --color-green: #10b981;
  --color-green-glow: #34d399;
  --color-green-dark: #059669;
  --color-red: #ef4444;
  --color-red-glow: #f87171;
  --color-red-dark: #dc2626;
  
  --color-text-main: #ffffff;
  --color-text-light: #d1c7e6;
  --color-text-muted: #8e7ea8;
  --color-text-dim: #675883;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-main);
  color: var(--color-text-main);
  font-family: var(--font-family);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Master App Container */
#app-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  background: var(--bg-main);
  overflow: hidden;
  position: relative;
}

/* Outer Game Grid */
#game-frame {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 10px;
  padding: 8px 10px 10px 10px;
  position: relative;
  overflow: hidden;
}

/* ========================================================
   SIDEBAR (Desktop Left Column)
   ======================================================== */
#sidebar-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 10px;
  gap: 10px;
  height: 100%;
  border: 1px solid #2d1d4d;
  overflow: hidden;
}

.sidebar-header-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #36235d;
}

.balance-container {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.balance-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.balance-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-orange);
  letter-spacing: 0.3px;
  font-feature-settings: "tnum";
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-action-btn {
  background: var(--bg-button);
  border: 1px solid #432b6b;
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-action-btn:hover {
  background: var(--bg-button-hover);
  border-color: #5c3c92;
  color: #ffffff;
}

.header-action-btn:active {
  transform: scale(0.94);
}

.player-profile-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #251642;
  border: 1px solid #482f70;
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  max-width: 135px;
}

.player-profile-chip:hover {
  background: #341e5e;
  border-color: var(--color-orange);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.player-avatar {
  font-size: 12px;
  line-height: 1;
}

.player-name-display {
  font-size: 11px;
  font-weight: 700;
  color: #ffaa1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.setting-nickname-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid #362255;
}

.nickname-label {
  font-size: 11px;
  font-weight: 700;
  color: #c4b5dc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nickname-input-wrapper {
  display: flex;
  gap: 6px;
  width: 100%;
}

.nickname-input-field {
  flex: 1;
  background: #170d2b;
  border: 1px solid #482f70;
  border-radius: var(--radius-sm);
  color: #ffaa1a;
  font-weight: 700;
  font-size: 12px;
  padding: 0 10px;
  height: 32px;
  outline: none;
  transition: border-color 0.15s;
}

.nickname-input-field:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.3);
}

.btn-save-nickname {
  background: var(--color-orange);
  color: #170d2b;
  font-weight: 800;
  font-size: 12px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 32px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-save-nickname:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.btn-save-nickname:active {
  transform: scale(0.96);
}

.btn-menu-trigger .bar {
  width: 15px;
  height: 2px;
  background-color: var(--color-text-light);
  border-radius: 1px;
}

/* Bets Tabs */
.sidebar-bets-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.bets-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.tab-btn:hover:not(.active) {
  color: var(--color-text-light);
}

.tab-btn.active {
  background: var(--color-orange);
  color: #170d2b;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Bets List Table */
.bets-table-header {
  display: grid;
  grid-template-columns: 96px 1fr 44px 1fr;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.header-col-player { text-align: left; }
.header-col-bet { text-align: right; }
.header-col-x { text-align: center; }
.header-col-win { text-align: right; }

.bets-list-container {
  flex: 1;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bets-list-container::-webkit-scrollbar {
  width: 4px;
}
.bets-list-container::-webkit-scrollbar-thumb {
  background: #3c2960;
  border-radius: 4px;
}

.empty-stakes-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  text-align: center;
  padding: 24px 12px;
}

.empty-icon-coins {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  opacity: 0.65;
}

.empty-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 3px;
}

.empty-subtitle {
  font-size: 11px;
  color: var(--color-text-dim);
}

.bet-row {
  display: grid;
  grid-template-columns: 96px 1fr 44px 1fr;
  align-items: center;
  padding: 6px 6px;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  transition: background 0.15s;
}

.bet-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bet-row.cashed-out {
  background: rgba(16, 185, 129, 0.12);
}

.bet-row.crashed,
.bet-row.lost {
  background: rgba(239, 68, 68, 0.14);
}

.bet-player {
  color: var(--color-text-light);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bet-amount {
  color: #cfc2e6;
  text-align: right;
  font-feature-settings: "tnum";
}

.bet-mult {
  text-align: center;
  font-weight: 600;
  color: var(--color-text-muted);
}

.bet-mult.won {
  color: var(--color-orange);
  font-weight: 700;
}

.bet-mult.lost {
  color: #ef4444 !important;
  font-weight: 700;
}

.bet-win {
  text-align: right;
  font-weight: 600;
  color: var(--color-text-muted);
  font-feature-settings: "tnum";
}

.bet-win.won {
  color: var(--color-green);
  font-weight: 700;
}

.bet-win.lost {
  color: #ef4444 !important;
  font-weight: 600;
}

/* ========================================================
   MAIN CONTENT AREA (Right Column)
   ======================================================== */
#main-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  overflow: hidden;
}

#mobile-top-header {
  display: none;
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #2d1d4d;
}

/* Game Canvas Wrapper */
#canvas-stage-wrapper {
  flex: 1;
  min-height: 260px;
  background: #180f2d;
  border-radius: var(--radius-lg);
  border: 1px solid #2d1d4d;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(10, 4, 18, 0.85);
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(31, 18, 54, 0.8);
  border: 1px solid rgba(142, 126, 168, 0.3);
  color: #ddd0f5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.15s ease;
}

.canvas-fullscreen-btn:hover {
  background: rgba(48, 28, 84, 0.95);
  border-color: var(--color-orange);
  color: #ffffff;
  transform: scale(1.06);
}

/* Multiplier History Bar */
#history-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 4px;
  position: relative;
  overflow: hidden;
}

.history-indicator-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-orange);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-orange);
  flex-shrink: 0;
}

#history-pills-list {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  width: 100%;
}

#history-pills-list::-webkit-scrollbar {
  display: none;
}

.history-pill {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, filter 0.15s;
  border: 1px solid transparent;
}

.history-pill:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.pill-low {
  background: #281940;
  color: #a494bf;
  border-color: #382459;
}

.pill-med {
  background: #382153;
  color: #f7a600;
  border-color: #4f2e77;
}

.pill-high {
  background: #462568;
  color: #ffaa1a;
  border-color: #69389e;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.pill-super {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.history-stats-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: #cfc2e6;
  background: #281940;
  border: 1px solid #3f2766;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.history-stats-btn:hover {
  background: #382259;
  border-color: #5b3992;
  color: #ffffff;
}

/* ========================================================
   DUAL BET PANELS
   ======================================================== */
#bet-panels-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bet-panel {
  background: var(--bg-panel);
  border: 1px solid #2d1d4d;
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Auto Controls Row */
.bet-row-auto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.auto-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid #3a245a;
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  height: 26px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auto-toggle-btn:hover {
  border-color: #5c398e;
  background: #22143e;
}

.auto-toggle-text {
  font-size: 11px;
  font-weight: 700;
  color: #c4b5dc;
  white-space: nowrap;
}

.toggle-track {
  width: 24px;
  height: 13px;
  background: #342050;
  border-radius: 13px;
  position: relative;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.toggle-thumb {
  width: 9px;
  height: 9px;
  background: #9d8db8;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.auto-toggle-btn.active {
  background: #2c164a;
  border-color: var(--color-orange);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

.auto-toggle-btn.active .auto-toggle-text {
  color: #ffb833;
}

.auto-toggle-btn.active .toggle-track {
  background: var(--color-orange);
}

.auto-toggle-btn.active .toggle-thumb {
  background: #170d2b;
  transform: translateX(11px);
}

.auto-cashout-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.auto-mult-box {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid #3a245a;
  border-radius: var(--radius-sm);
  padding: 0 5px;
  height: 26px;
  transition: opacity 0.15s, border-color 0.15s;
}

.auto-mult-box.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.auto-mult-input {
  width: 38px;
  background: transparent;
  border: none;
  color: #ffaa1a;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  outline: none;
  font-family: inherit;
}

.mult-unit {
  font-size: 11px;
  font-weight: 700;
  color: #9d8db8;
  margin-left: 2px;
}

/* Bet Body Grid (60% Inputs / 40% Action Button) */
.bet-body-grid {
  display: grid;
  grid-template-columns: 1fr 40%;
  gap: 8px;
  align-items: stretch;
}

.bet-inputs-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bet-input-box {
  background: var(--bg-input);
  border: 1px solid #3a245a;
  border-radius: var(--radius-sm);
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.input-inner-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 4px;
}

.currency-tag {
  font-size: 12px;
  font-weight: 800;
  color: #9d8db8;
  margin-right: 4px;
}

.bet-input-field {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  font-family: inherit;
  outline: none;
}

.btn-step {
  width: 24px;
  height: 24px;
  background: #291746;
  border: 1px solid #44286e;
  border-radius: 4px;
  color: #e2d9f3;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  line-height: 1;
}

.btn-step:hover {
  background: #392062;
  border-color: #63399b;
  color: #ffffff;
}

.btn-step:active {
  transform: scale(0.92);
}

.bet-row-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  align-items: center;
}

.btn-preset {
  background: var(--bg-button);
  border: 1px solid #2e1c4c;
  border-radius: 3px;
  color: var(--color-text-light);
  font-size: 10px;
  font-weight: 700;
  height: 20px;
  padding: 0 1px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-preset:hover {
  background: var(--bg-button-hover);
  border-color: #553488;
  color: #ffffff;
}

.btn-preset:active {
  transform: scale(0.92);
}

.btn-preset-action {
  background: #23153d;
  color: #c9bade;
}

/* ========================================================
   ACTION BUTTON STATES (Bet, Cancel, Cash Out)
   ======================================================== */
.btn-start-action {
  background: var(--color-orange);
  color: #170d2b;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  width: 100%;
  height: 100%;
  min-height: 52px;
  padding: 0 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

.btn-start-action:hover {
  background: var(--color-orange-glow);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55);
}

.btn-start-action:active {
  transform: scale(0.97);
}

/* Red Cancel Button (During Countdown or Queued Next Round) */
.btn-start-action.state-waiting {
  background: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.5) !important;
}

.btn-start-action.state-waiting:hover:not(:disabled) {
  background: #dc2626 !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.7) !important;
}

.btn-start-action.state-waiting:disabled {
  background: #b91c1c !important;
  color: #fecaca !important;
  opacity: 0.85;
  cursor: not-allowed;
  box-shadow: none !important;
  pointer-events: none;
}

/* Glowing Emerald Green WITHDRAWABLE Cash Out Button */
.btn-start-action.state-cashout {
  background: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.75), 0 4px 12px rgba(16, 185, 129, 0.5) !important;
  animation: pulseGreenGlow 1.1s infinite alternate ease-in-out;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: 0.4px;
}

.btn-start-action.state-cashout:hover {
  background: #059669 !important;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.95), 0 6px 16px rgba(16, 185, 129, 0.7) !important;
}

.btn-start-action.state-cashout:active {
  transform: scale(0.96);
  background: #047857 !important;
}

@keyframes pulseGreenGlow {
  0% {
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6), 0 3px 8px rgba(16, 185, 129, 0.4);
  }
  100% {
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.9), 0 5px 16px rgba(16, 185, 129, 0.7);
  }
}

/* Orange Bet on Next Round Button */
.btn-start-action.state-next-round {
  background: var(--color-orange) !important;
  color: #170d2b !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35) !important;
}

.btn-start-action.state-next-round:hover {
  background: var(--color-orange-glow) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55) !important;
}

/* Remove number input spin buttons */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ========================================================
   MOBILE BETS DRAWER
   ======================================================== */
#mobile-bets-drawer {
  display: none;
  background: var(--bg-panel);
  border: 1px solid #2d1d4d;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 4px;
}

.btn-toggle-bets-drawer {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-card);
  border: none;
  color: var(--color-text-light);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.badge-count {
  background: var(--color-orange);
  color: #170d2b;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.chevron-icon {
  transition: transform 0.2s ease;
}

.btn-toggle-bets-drawer.open .chevron-icon {
  transform: rotate(180deg);
}

.mobile-bets-content {
  display: none;
  padding: 8px 10px;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
}

.mobile-bets-content.open {
  display: flex;
}

/* ========================================================
   MODALS (Settings, Provably Fair, Rules, History)
   ======================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 4, 18, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-frame);
  border: 1px solid #3d2963;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 440px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2d1e4e;
  padding-bottom: 8px;
}

.modal-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-orange);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.4;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #382458;
  transition: 0.2s;
  border-radius: 20px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider-round {
  background-color: var(--color-orange);
}

input:checked + .slider-round:before {
  transform: translateX(18px);
  background-color: #170d2b;
}

.btn-modal-action {
  background: var(--bg-button);
  color: #ffffff;
  border: 1px solid #482f70;
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.btn-modal-action:hover {
  background: var(--bg-button-hover);
  border-color: #63399b;
}

/* Tooltip */
#multiplier-tooltip {
  position: fixed;
  bottom: 50px;
  background: #251642;
  border: 1px solid #4a2f7c;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: 11px;
  color: #cfc5e8;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  z-index: 50;
  display: none;
  white-space: nowrap;
}

/* Clean Minimal Text-Only Toast Notifications */
#toast-notification {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-25px);
  min-width: 220px;
  max-width: 90vw;
  background: #1e1336;
  border: 1px solid #4a3370;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
}

#toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#toast-notification .toast-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

#toast-notification .toast-heading {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

#toast-notification .toast-subtext {
  font-size: 11px;
  font-weight: 500;
  color: #c9bedf;
}

#toast-notification.toast-success {
  background: #064e3b;
  border-color: #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

#toast-notification.toast-success .toast-heading {
  color: #a7f3d0;
}

#toast-notification.toast-loss {
  background: #7f1d1d;
  border-color: #ef4444;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

#toast-notification.toast-loss .toast-heading {
  color: #fecaca;
}

#toast-notification.toast-info {
  background: #251642;
  border-color: #f59e0b;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
}

#toast-notification.toast-info .toast-heading {
  color: #fcd34d;
}

/* ========================================================
   RESPONSIVE DESIGN (Mobile & Tablet)
   ======================================================== */
@media (max-width: 900px) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
  }

  #app-container {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    display: block;
  }

  #game-frame {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 8px 24px 8px;
    height: auto;
    min-height: 100%;
  }

  #sidebar-panel {
    display: none;
  }

  #mobile-top-header {
    display: flex;
  }

  #main-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: auto;
  }

  #canvas-stage-wrapper {
    height: 270px;
    min-height: 240px;
    max-height: 340px;
  }

  #bet-panels-container {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #mobile-bets-drawer {
    display: block;
  }
}
