/* ==========================================================================
   §0 WAITING OVERLAY VISIBILITY GATE (FIX: UFC badge must vanish on liftoff)
   The mobile overlay previously had no display rules at all, so it stayed
   painted over the canvas during flight.
   ========================================================================== */
#waiting-overlay,
#waiting-overlay-mobile {
  display: none;
}
#waiting-overlay.active,
#waiting-overlay-mobile.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
body.is-flying #waiting-overlay,
body.is-flying #waiting-overlay-mobile {
  display: none !important;
}


/* ==========================================================================
   STACK — Aviator (Spribe Rebuild UI Styles)
   Pixel-perfect Spribe Aviator dark theme, 3-column desktop layout, Web Audio
   ========================================================================== */

:root {
  --aviator-bg: #0E121A;
  --aviator-canvas-bg: #090B10;
  --aviator-surface-1: #141923;
  --aviator-surface-2: #1B2230;
  --aviator-surface-3: #242D3D;
  --aviator-border: #232C3D;
  --aviator-red: #E9113C;
  --aviator-red-hover: #FF1A4B;
  --aviator-red-glow: rgba(233, 17, 60, 0.4);
  --aviator-green: #00E701;
  --aviator-green-hover: #1FFF20;
  --aviator-orange: #FF9500;
  --aviator-orange-hover: #FFA726;
  --aviator-blue: #4A9EFF;
  --aviator-purple: #B388FF;
  --aviator-pink: #FF3D71;
  --aviator-text-white: #FFFFFF;
  --aviator-text-muted: #8492A6;
  --aviator-text-sub: #B1BAD2;
}

/* Global Reset for Aviator Scope */
.aviator-body {
  margin: 0;
  padding: 0;
  background-color: var(--aviator-bg);
  color: var(--aviator-text-white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   §1 SPLASH SCREEN OVERLAY (Image B: Exactly 3000ms hold)
   ========================================================================== */
#aviator-splash {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 24px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  margin-bottom: auto;
}

.splash-logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.splash-plane-icon {
  width: 90px;
  height: 45px;
}

.splash-title {
  font-size: 42px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 2px;
  color: #FFFFFF;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.splash-title span {
  color: var(--aviator-red);
}

/* 3 Red Pulsing Dots */
.splash-dots {
  display: flex;
  align-items: center;
  gap: 12px;
}

.splash-dot {
  width: 12px;
  height: 12px;
  background-color: var(--aviator-red);
  border-radius: 50%;
  opacity: 0.3;
}

.splash-dot:nth-child(1) {
  animation: dotPulse 1.2s infinite ease-in-out;
}

.splash-dot:nth-child(2) {
  animation: dotPulse 1.2s infinite ease-in-out 0.2s;
  transform: scale(1.2);
}

.splash-dot:nth-child(3) {
  animation: dotPulse 1.2s infinite ease-in-out 0.4s;
}

@keyframes dotPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

.splash-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.splash-footer-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--aviator-text-muted);
}

.splash-spribe-img {
  height: 24px;
  opacity: 0.9;
}

/* ==========================================================================
   §2 TOP NAVIGATION BAR
   ========================================================================== */
.aviator-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  background-color: var(--aviator-surface-1);
  border-bottom: 1px solid var(--aviator-border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.topbar-logo-plane {
  width: 38px;
  height: 20px;
}

.topbar-logo-text {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  color: #FFFFFF;
}

.topbar-logo-text span {
  color: var(--aviator-red);
}

.how-to-play-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--aviator-text-sub);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.how-to-play-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-balance-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--aviator-surface-2);
  border: 1px solid var(--aviator-border);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
}

.topbar-balance-amount {
  color: var(--aviator-green);
  font-variant-numeric: tabular-nums;
}

.sound-toggle-btn {
  background: transparent;
  border: none;
  color: var(--aviator-text-sub);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.sound-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
}

.provably-fair-btn {
  background: transparent;
  border: none;
  color: var(--aviator-text-sub);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
}

.provably-fair-btn:hover {
  color: #FFF;
}

/* ==========================================================================
   §3 MAIN 3-COLUMN CONTAINER
   ========================================================================== */
.aviator-main-container {
  display: flex;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  height: calc(100vh - 52px);
  padding: 10px;
  gap: 10px;
  box-sizing: border-box;
}

/* LEFT COLUMN — Live Bets (280px) */
.aviator-left-col {
  width: 280px;
  min-width: 280px;
  background: var(--aviator-surface-1);
  border: 1px solid var(--aviator-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.live-bets-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--aviator-border);
}

.live-bets-tabs {
  display: flex;
  background: var(--aviator-surface-2);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.bets-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--aviator-text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.bets-tab-btn.active {
  background: var(--aviator-surface-3);
  color: #FFFFFF;
}

.live-bets-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--aviator-text-sub);
}

.bets-count-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
}

.live-bets-table-head {
  display: grid;
  grid-template-columns: 1fr 65px 50px 70px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--aviator-text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.live-bets-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.live-bet-row {
  display: grid;
  grid-template-columns: 1fr 65px 50px 70px;
  align-items: center;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s;
}

.live-bet-row.cashed-out {
  background: rgba(0, 231, 1, 0.07);
  border-left: 2px solid var(--aviator-green);
}

.bet-user-col {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--aviator-text-sub);
}

.bet-user-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--aviator-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #FFF;
}

.bet-stake-col {
  color: #FFF;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bet-mult-col {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}

.bet-mult-col.pending {
  color: var(--aviator-text-muted);
}

.bet-mult-col.won {
  color: var(--aviator-purple);
}

.bet-cash-col {
  color: var(--aviator-green);
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* CENTER COLUMN — History Strip, Canvas, Dual Bet Panels */
.aviator-center-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 8px;
  height: 100%;
}

/* History Strip (Top of Center Column) */
.history-strip-container {
  display: flex;
  align-items: center;
  background: var(--aviator-surface-1);
  border: 1px solid var(--aviator-border);
  border-radius: 10px;
  padding: 4px 8px;
  gap: 8px;
  height: 38px;
  box-sizing: border-box;
}

.history-strip-icon {
  color: var(--aviator-text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
}

.history-pills-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.history-pills-wrap::-webkit-scrollbar {
  display: none;
}

.history-pill {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.15s;
}

.history-pill:hover {
  transform: scale(1.06);
}

.history-pill.tier-blue {
  background: rgba(74, 158, 255, 0.16);
  color: var(--aviator-blue);
  border: 1px solid rgba(74, 158, 255, 0.3);
}

.history-pill.tier-purple {
  background: rgba(179, 136, 255, 0.16);
  color: var(--aviator-purple);
  border: 1px solid rgba(179, 136, 255, 0.3);
}

.history-pill.tier-pink {
  background: rgba(255, 61, 113, 0.16);
  color: var(--aviator-pink);
  border: 1px solid rgba(255, 61, 113, 0.3);
}

.history-pill.tier-red {
  background: rgba(233, 17, 60, 0.22);
  color: var(--aviator-red);
  border: 1px solid rgba(233, 17, 60, 0.5);
  font-weight: 800;
}

.history-dropdown-btn {
  background: transparent;
  border: none;
  color: var(--aviator-text-muted);
  cursor: pointer;
  font-size: 14px;
}

/* Canvas Display Area */
.canvas-wrapper {
  position: relative;
  flex: 1;
  min-height: 280px;
  background: radial-gradient(circle at 10% 90%, #20050e 0%, #0c0d14 60%, #06070a 100%);
  border: 1px solid var(--aviator-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Rotating sunburst backdrop (moved off the canvas into CSS)
   -------------------------------------------------------------------------- */
.canvas-wrapper,
.aviator-mobile-canvas-block {
  position: relative;
  isolation: isolate;
  background: #090B10;
  transition: background-color 0.6s ease;
}

.canvas-wrapper::before,
.aviator-mobile-canvas-block::before {
  content: '';
  position: absolute;
  inset: -60%;
  z-index: 0;
  background:
    repeating-conic-gradient(
      from 0deg at 50% 50%,
      rgba(255,255,255,0.028) 0deg 6deg,
      transparent 6deg 12deg
    );
  animation: sunburstSpin 60s linear infinite;
  pointer-events: none;
  will-change: transform;
}

@keyframes sunburstSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.canvas-wrapper > *,
.aviator-mobile-canvas-block > * {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .canvas-wrapper::before,
  .aviator-mobile-canvas-block::before { animation: none; }
}

#aviator-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Live Multiplier drawn on canvas; hide DOM overlay to avoid duplicate or obscuring plane (FIX 1) */
.multiplier-overlay {
  display: none !important;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}

/* Plane image size (FIX 1) */
.aviator-plane {
  width: 110px;
  height: auto;
}
@media (max-width: 1023px) {
  .aviator-plane { width: 80px; }
}

.multiplier-value {
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: #FFFFFF;
  /* Soft tier-coloured glow above a tight drop shadow. */
  text-shadow: 0 0 24px currentColor, 0 2px 6px rgba(0, 0, 0, 0.8);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.multiplier-value.tier-purple {
  color: var(--aviator-purple);
  text-shadow: 0 0 24px currentColor, 0 2px 6px rgba(0, 0, 0, 0.8);
}

.multiplier-value.tier-pink {
  color: var(--aviator-pink);
  text-shadow: 0 0 24px currentColor, 0 2px 6px rgba(0, 0, 0, 0.8);
}

.multiplier-value.tier-red {
  color: var(--aviator-red);
  text-shadow: 0 0 24px currentColor, 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Bust State Notification */
.bust-message {
  display: none;
  position: absolute;
  top: calc(50% + 55px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--aviator-red);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 11;
  animation: bustShake 0.4s ease;
}

@keyframes bustShake {
  0% { transform: translate(-50%, 0); }
  25% { transform: translate(-54%, -3px); }
  50% { transform: translate(-46%, 3px); }
  75% { transform: translate(-52%, -1px); }
  100% { transform: translate(-50%, 0); }
}

/* ==========================================================================
   §4 WAITING STATE OVERLAY (Image C: Exactly 7000ms countdown)
   ========================================================================== */
#waiting-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

#waiting-overlay.active {
  display: flex;
}

/* Mobile waiting overlay had no positional rules of its own, so it sat in
   normal flow at the top of .aviator-mobile-canvas-block instead of covering
   it. Mirror the desktop overlay. `display` is intentionally NOT set here:
   the §0 gate at the top of this file owns it (none / flex via .active). */
#waiting-overlay-mobile {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 20;
}

.waiting-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--aviator-text-sub);
  margin-bottom: 12px;
}

/* 300px Red Progress Bar */
.waiting-progress-track {
  width: 300px;
  max-width: 80%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.waiting-progress-fill {
  width: 100%;
  height: 100%;
  background: var(--aviator-red);
  border-radius: 4px;
  transform-origin: left;
}

.waiting-countdown-text {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  margin-bottom: 24px;
}

/* UFC | Aviator Official Partners Badge */
.ufc-partner-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Was 8px 16px with 12px gaps and an 18px UFC wordmark. Inside the 7000ms
     overlay it pulled focus off the countdown it is supposed to sit under. */
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  opacity: 0.75;
}

.ufc-text {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #D20A0A;
}

.badge-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.aviator-partner-name {
  font-size: 12px;
  font-weight: 800;
  font-style: italic;
  color: #FFF;
}

.partner-subtitle {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--aviator-text-muted);
}

/* ==========================================================================
   §5 DUAL BET PANELS (Side-by-side)
   ========================================================================== */
.dual-bet-panels {
  display: flex;
  gap: 10px;
  /* Was a fixed 155px. The 2-row chip grid + the wait pill above the button
     need ~207px, so the panel is content-sized with a floor instead. */
  height: auto;
  min-height: 210px;
}

.bet-panel {
  flex: 1;
  background: var(--aviator-surface-1);
  border: 1px solid var(--aviator-border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel-header-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.panel-mode-toggle {
  display: flex;
  background: var(--aviator-surface-2);
  border-radius: 14px;
  padding: 2px;
  gap: 2px;
}

.mode-tab-btn {
  background: transparent;
  border: none;
  color: var(--aviator-text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-tab-btn.active {
  background: var(--aviator-surface-3);
  color: #FFFFFF;
}

.panel-auto-opts {
  display: none;
  align-items: center;
  gap: 8px;
}

.panel-auto-opts.visible {
  display: flex !important;
}

.auto-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--aviator-text-sub);
}

.auto-switch {
  position: relative;
  width: 32px;
  height: 18px;
}

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--aviator-surface-3);
  border-radius: 18px;
  transition: .3s;
}

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

.auto-switch input:checked + .switch-slider {
  background-color: var(--aviator-green);
}

.auto-switch input:checked + .switch-slider:before {
  transform: translateX(14px);
}

.auto-mult-input {
  width: 60px;
  background: var(--aviator-surface-2);
  border: 1px solid var(--aviator-border);
  color: #FFFFFF;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.panel-main-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.stake-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.stake-row .stepper-btn {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.stake-row .stepper-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.chips-and-action {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

/* 4-across, 2 rows: 4 amount chips + MAX + 1/2 + x2 (Change 12). */
.chips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
}

.chips-grid .quick-chip {
  min-height: 36px;
  font-size: 12px;
  font-weight: 700;
  background: var(--aviator-surface-2);
  color: var(--aviator-text-sub);
  border: 1px solid var(--aviator-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.chips-grid .quick-chip:hover {
  background: var(--aviator-border);
  color: #fff;
}

/* MAX reads the live balance rather than a constant, so it is tinted to
   separate it from the four fixed-amount chips beside it. */
.chips-grid .quick-chip[data-act="stake-max"] {
  color: var(--aviator-green);
  border-color: rgba(0, 231, 1, 0.35);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.chips-grid .quick-chip[data-act="stake-max"]:hover {
  background: rgba(0, 231, 1, 0.14);
  color: var(--aviator-green);
}

/* The wait pill had to stay ABOVE the button, so the button sits inside
   .panel-action-stack — which means the STACK is the grid item spanning both
   chip rows, not the button (a nested element cannot be a grid item). */
.chips-and-action .panel-action-stack {
  grid-row: span 2;
  height: 100%;
  min-height: 60px;
}

.chips-and-action .aviator-action-btn {
  width: 100%;
  height: 100%;
  min-height: 60px;
}

.panel-inputs-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Stepper Input Row */
.stepper-row {
  display: flex;
  align-items: center;
  background: var(--aviator-surface-2);
  border: 1px solid var(--aviator-border);
  border-radius: 8px;
  overflow: hidden;
}

.stepper-btn {
  background: transparent;
  border: none;
  color: var(--aviator-text-sub);
  width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.stepper-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFF;
}

.stepper-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: none;
  width: 60px;
}

/* Quick Amount Buttons — 4 amount chips + the restored ½ / ×2 chips */
.quick-amounts-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.quick-chip--small {
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--aviator-surface-3);
}

.quick-chip {
  background: var(--aviator-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--aviator-text-sub);
  border-radius: 6px;
  padding: 3px 0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.quick-chip:hover {
  background: var(--aviator-surface-3);
  color: #FFF;
}

/* Taller, narrower action button. §5 pinned width:140px/height:64px, but
   .chips-and-action .aviator-action-btn later overrides width/height to
   100%/100% (the button is a grid item spanning both chip rows), so the
   declared size only ever applied where that override did not reach. */
.aviator-action-btn {
  width: 140px;
  height: 88px;
  border: none;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

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

/* State: BET (Green) */
.aviator-action-btn.btn-bet {
  background: linear-gradient(180deg, #1FFF20 0%, #00C801 100%);
  color: #000000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 231, 1, 0.28);
}

.aviator-action-btn.btn-bet:hover {
  background: linear-gradient(180deg, #38FF39 0%, #00DF01 100%);
}

.aviator-action-btn.btn-bet .btn-main-label {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.aviator-action-btn.btn-bet .btn-sub-label {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

/* State: CANCEL / WAITING (Red/Coral) */
.aviator-action-btn.btn-cancel {
  background: linear-gradient(180deg, #FFD54A 0%, #FF9500 100%);
  color: #000000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 16px rgba(233, 17, 60, 0.32);
}

.aviator-action-btn.btn-cancel .btn-main-label {
  font-size: 15px;
  font-weight: 900;
}

.aviator-action-btn.btn-cancel .btn-sub-label {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
}

/* State: CASH OUT (Vibrant Orange) */
.aviator-action-btn.btn-cashout {
    background: linear-gradient(180deg, #FFB800 0%, #FF9500 100%);
    color: #000000;
    animation: cashoutPulse 1s infinite alternate;
  }

@keyframes cashoutPulse {
  0% { box-shadow: 0 0 10px rgba(255, 149, 0, 0.4); }
  100% { box-shadow: 0 0 25px rgba(255, 149, 0, 0.8); }
}

.aviator-action-btn.btn-cashout .btn-main-label {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.aviator-action-btn.btn-cashout .btn-sub-label {
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* State: Cashed Out Done */
.aviator-action-btn.btn-done {
  background: var(--aviator-surface-3);
  color: var(--aviator-red);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

/* ==========================================================================
   §6 RIGHT COLUMN — Live Chat / Feed (320px)
   ========================================================================== */
.aviator-right-col {
  width: 310px;
  min-width: 310px;
  background: var(--aviator-surface-1);
  border: 1px solid var(--aviator-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--aviator-border);
}

.chat-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-online-dot {
  width: 8px;
  height: 8px;
  background: var(--aviator-green);
  border-radius: 50%;
}

.chat-title {
  font-size: 13px;
  font-weight: 800;
  color: #FFF;
}

.chat-online-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--aviator-text-muted);
}

.chat-messages-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-card {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

/* Player Message */
.chat-card.msg-player {
  background: var(--aviator-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
  font-size: 10px;
}

.chat-username {
  font-weight: 700;
  color: var(--aviator-blue);
}

.chat-time {
  color: var(--aviator-text-muted);
}

.chat-msg-body {
  color: #ECEFF1;
}

/* Big Win / Celebration Card (#2D1B4E) */
.chat-card.msg-win {
  background: #2D1B4E;
  border: 1px solid #7033A3;
}

.msg-win .chat-win-title {
  color: var(--aviator-purple);
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.msg-win .chat-win-desc {
  color: #FFFFFF;
  margin-top: 2px;
}

.chat-input-area {
  padding: 10px;
  border-top: 1px solid var(--aviator-border);
  display: flex;
  gap: 8px;
}

.chat-input-field {
  flex: 1;
  background: var(--aviator-surface-2);
  border: 1px solid var(--aviator-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: #FFFFFF;
  outline: none;
}

.chat-input-field:focus {
  border-color: var(--aviator-blue);
}

.chat-send-btn {
  background: var(--aviator-surface-3);
  border: none;
  border-radius: 8px;
  color: var(--aviator-blue);
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
}

.chat-send-btn:hover {
  background: rgba(74, 158, 255, 0.2);
}

/* ==========================================================================
   §7 PROVABLY FAIR MODAL
   ========================================================================== */
.aviator-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.aviator-modal-overlay.active {
  display: flex;
}

.aviator-modal-box {
  background: var(--aviator-surface-1);
  border: 1px solid var(--aviator-border);
  border-radius: 14px;
  width: 100%;
  max-width: 500px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFF;
}

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

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

.modal-row {
  margin-bottom: 12px;
}

.modal-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--aviator-text-muted);
  margin-bottom: 4px;
}

.modal-val-box {
  background: var(--aviator-surface-2);
  border: 1px solid var(--aviator-border);
  padding: 8px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 12px;
  color: var(--aviator-blue);
  word-break: break-all;
}

.modal-info-text {
  font-size: 12px;
  color: var(--aviator-text-sub);
  line-height: 1.5;
  margin-top: 14px;
}

/* ==========================================================================
   §8 FEED-ROW GRID & TAB TABLES (FIX 2, FIX 3, FIX 4)
   ========================================================================== */
.feed-section-header,
.rounds-subhead {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8492A6;
  padding: 8px 12px 4px;
}

.feed-row {
  display: grid;
  grid-template-columns: 32px 1fr 90px 60px 100px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  background: rgba(255,255,255,0.02);
  transition: background 0.2s;
}

.feed-row__stake,
.feed-row__win {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.feed-row.cashed-out {
  background: rgba(0,231,1,0.07);
  border-left: 2px solid var(--aviator-green);
}

.history-row {
  display: grid;
  grid-template-columns: 75px 1fr 85px 105px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
}

.top-row {
  display: grid;
  grid-template-columns: 50px 1fr 90px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.top-mult {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.empty-tab-state {
  padding: 36px 16px;
  text-align: center;
  color: #8492A6;
  font-size: 13px;
  line-height: 1.5;
}

.text-muted {
  color: #8492A6;
}

.text-win {
  color: #00E701;
  font-weight: 700;
}

.text-loss {
  color: #E9113C;
  font-weight: 700;
}

/* ==========================================================================
   §9 RESPONSIVE — Tablet (768px–1023px)
   ========================================================================== */
@media (max-width: 1023px) {
  .aviator-right-col { display: none; }
  .aviator-left-col { width: 240px; min-width: 240px; }
  .aviator-plane { width: 80px; }
}

/* ==========================================================================
   §10 DEDICATED MOBILE LAYOUT (< 768px)
   Do NOT just tweak desktop rules — this is a completely separate layout.
   ========================================================================== */
@media (max-width: 767px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100%;
    position: static;
  }

  .aviator-shell,
  .aviator-main,
  .aviator-main-container,
  .aviator-canvas-wrap,
  .aviator-content {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    position: static !important;
  }

  /* Hide the desktop 3-column layout */
  .aviator-desktop-columns,
  .aviator-main-container {
    display: none !important;
  }

  /* Show the mobile stacked layout */
  .aviator-mobile-stack {
    display: block !important;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }

  /* History strip (mobile) */
  .aviator-mobile-stack .history-strip-container {
    margin: 6px 10px 0;
    border-radius: 8px;
  }

  /* Compact history strip + pills on mobile (PART G) */
  .aviator-mobile-stack .history-strip-container {
    height: 40px;
    padding: 4px 8px;
    margin: 6px 10px 0;
  }
  .aviator-mobile-stack .history-pill {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 14px;
  }

  /* Canvas block (mobile) */
  .aviator-mobile-canvas-block {
    position: relative;
    width: 100%;
    height: 45vh;
    min-height: 260px;
    max-height: 420px;
    background: radial-gradient(circle at 10% 90%, #20050e 0%, #0c0d14 60%, #06070a 100%);
    border: 1px solid var(--aviator-border);
    overflow: hidden;
    margin: 6px 0 0;
  }

  .aviator-mobile-canvas-block canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .aviator-mobile-canvas-block .multiplier-overlay {
    top: 40%;
  }

  .aviator-mobile-canvas-block .bust-message {
    top: calc(40% + 55px);
  }

  /* The live multiplier is painted on the canvas (see multFontSize in
     aviator.js renderSingleCanvas), and .multiplier-overlay is display:none.
     Kept in sync anyway so re-enabling the DOM overlay does not regress. */
  .aviator-mobile-canvas-block .multiplier-value {
    font-size: 80px;
  }

  /* Mobile bet panel sizing */
  .aviator-bet-panel {
    padding: 16px;
    margin: 12px 16px;
    border-radius: 12px;
    background: #141414;
  }
  .aviator-bet-panel button {
    min-height: 48px;   /* tap target */
  }
  .aviator-bet-panel input {
    font-size: 18px;
    min-height: 48px;
  }

  .aviator-mobile-stack .dual-bet-panels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Reset the desktop floor: §5 sets min-height:210px, which never got
       overridden here, so each stacked panel kept a desktop-height box. */
    height: auto;
    min-height: 0;
    margin: 8px 0 0;
  }

  /* Mobile Tab Strip */
  .aviator-mobile-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    padding: 12px 16px;
    background: #0A0F14;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 48px; /* matches new header height */
    z-index: 5;
  }

  .aviator-mobile-tab {
    padding: 10px;
    border-radius: 8px;
    background: #141414;
    color: #8492A6;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
  }

  .aviator-mobile-tab--active {
    background: #FFFFFF;
    color: #000000;
  }

  /* Mobile Tab Panel Content */
  .aviator-mobile-tab-content {
    background: var(--aviator-surface-1);
    min-height: 180px;
  }

  /* Mobile Chat Sizing */
  .aviator-chat {
    margin: 12px 16px;
    border-radius: 12px;
    background: var(--aviator-surface-1);
    border: 1px solid var(--aviator-border);
    max-height: 55vh;
    display: flex;
    flex-direction: column;
  }
  .aviator-chat__messages {
    flex: 1;
    overflow-y: auto;
  }

  /* Desktop columns hidden on mobile */
  .aviator-left-col,
  .aviator-right-col {
    display: none !important;
  }

  /* Splash mobile */
  .splash-title { font-size: 32px; }

  /* ==========================================================================
     §9 MOBILE HEADER — ONE ROW, ICONS ONLY
     At 375px the row cannot fit the "How to play?" + "Provably Fair" text
     labels alongside the logo, balance pill and mute button. The labels wrapped,
     the row grew to three lines, and controls overlapped. Labels are hidden with
     font-size: 0 on the button plus span { display: none }, leaving each control
     as a 32x32 tap target. Desktop keeps the full labels (min-width: 768px).
     ========================================================================== */
  .aviator-topbar {
    height: 48px !important;
    padding: 0 10px !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }

  .topbar-left {
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .topbar-logo-plane {
    width: 28px !important;
    height: 15px !important;
  }

  .topbar-logo-text {
    font-size: 16px !important;
    white-space: nowrap !important;
  }

  /* Hide "How to play?" text — keep just the ? icon */
  .how-to-play-btn {
    padding: 4px 8px !important;
    font-size: 0 !important;
    gap: 0 !important;
    min-width: 32px !important;
    min-height: 32px !important;
    justify-content: center !important;
  }
  .how-to-play-btn i {
    font-size: 14px !important;
  }
  .how-to-play-btn span {
    display: none !important;
  }

  /* Hide "Provably Fair" text — keep just the shield icon */
  .provably-fair-btn {
    padding: 4px 8px !important;
    font-size: 0 !important;
    min-width: 32px !important;
    min-height: 32px !important;
    justify-content: center !important;
  }
  .provably-fair-btn i {
    font-size: 14px !important;
  }
  .provably-fair-btn span {
    display: none !important;
  }

  .topbar-right {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .topbar-balance-pill {
    padding: 4px 10px !important;
    font-size: 12px !important;
  }

  .topbar-balance-amount {
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .sound-toggle-btn {
    width: 30px !important;
    height: 30px !important;
  }

  /* ==========================================================================
     FIX 4 STEP C — MOBILE BET PANEL (Stake-style 2-row chips + button)
     ========================================================================== */
  .chips-and-action {
    grid-template-columns: 1fr 120px;
  }

  .chips-grid .quick-chip {
    min-height: 34px;
    font-size: 11px;
  }

  .chips-and-action .aviator-action-btn {
    min-height: 76px;
  }

  .stake-row .stepper-input {
    font-size: 15px;
  }

  /* ==========================================================================
     SECTION 3C — COMPACT BET PANELS ON MOBILE
     ========================================================================== */
  .aviator-mobile-stack .bet-panel {
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }
  .aviator-mobile-stack .panel-header-tabs {
    margin-bottom: 6px !important;
  }
  .aviator-mobile-stack .panel-mode-toggle {
    padding: 2px !important;
  }
  .aviator-mobile-stack .mode-tab-btn {
    padding: 4px 10px !important;
    font-size: 11px !important;
  }
  .aviator-mobile-stack .stake-row {
    gap: 4px !important;
    height: 38px !important;
  }
  .aviator-mobile-stack .stake-row .stepper-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }
  .aviator-mobile-stack .stake-row .stepper-input {
    height: 34px !important;
    font-size: 14px !important;
  }
  .aviator-mobile-stack .chips-and-action {
    grid-template-columns: 1fr 100px !important;
    gap: 6px !important;
  }
  .aviator-mobile-stack .chips-grid {
    gap: 4px !important;
  }
  .aviator-mobile-stack .chips-grid .quick-chip {
    min-height: 28px !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
  .aviator-mobile-stack .aviator-action-btn {
    min-height: 60px !important;
    font-size: 14px !important;
  }
  .aviator-mobile-stack .aviator-action-btn .btn-sub-label {
    font-size: 11px !important;
  }

  /* ==========================================================================
     Change 15 — MOBILE TAP TARGETS
     The compact pass above dropped the steppers to 34px, the amount chips to
     28px and the mode tabs to ~22px, all under the 44px minimum comfortable on
     touch. The steppers, mode tabs and toggles are the most-tapped controls on
     the panel, so those are lifted; the amount chips stay as they are because
     growing them would push the grid off the first screen.
     ========================================================================== */
  .aviator-mobile-stack .stake-row {
    height: 44px !important;
  }
  .aviator-mobile-stack .stake-row .stepper-btn,
  .aviator-mobile-stack .stake-row .stepper-input {
    height: 44px !important;
  }
  .aviator-mobile-stack .stake-row .stepper-btn {
    width: 44px !important;
    min-width: 44px !important;
  }

  .aviator-mobile-stack .mode-tab-btn {
    min-height: 32px !important;
    padding: 6px 14px !important;
  }

  .aviator-mobile-stack .auto-mult-input {
    min-height: 40px !important;
  }

  /* 44px on the two tab strips and the send button. */
  .aviator-mobile-tabs {
    gap: 8px !important;
    padding: 10px 16px !important;
  }
  .aviator-mobile-tab {
    min-height: 44px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .aviator-mobile-stack .chat-send-btn {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .aviator-mobile-stack .auto-switch {
    width: 44px !important;
    height: 26px !important;
  }
  .aviator-mobile-stack .auto-switch .switch-slider:before {
    height: 20px !important;
    width: 20px !important;
  }
  .aviator-mobile-stack .auto-switch input:checked + .switch-slider:before {
    transform: translateX(18px) !important;
  }

}

/* Desktop: hide mobile stack */
@media (min-width: 768px) {
  .aviator-mobile-stack { display: none !important; }
}


/* ==========================================================================
   §7 VISUAL POLISH — PROPELLER SPIN
   transform-box: fill-box is required here: without it, transform-origin:
   center resolves against the whole SVG viewport (60,30) and the blades orbit
   the nose instead of spinning on the hub at (108,30).
   ========================================================================== */
.plane-propeller {
  transform-box: fill-box;
  transform-origin: center;
  animation: propSpin 0.15s linear infinite;
}

@keyframes propSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .plane-propeller { animation: none; }
}

/* ==========================================================================
   §8 VISUAL POLISH — CANVAS TINT FOLLOWS MULTIPLIER TIER
   Class set by renderSingleCanvas() via getTierClass().
   ========================================================================== */
body.tier-blue   .canvas-wrapper,
body.tier-blue   .aviator-mobile-canvas-block   { background-color: #090B10; }
body.tier-purple .canvas-wrapper,
body.tier-purple .aviator-mobile-canvas-block   { background-color: #0F0A1A; }
body.tier-pink   .canvas-wrapper,
body.tier-pink   .aviator-mobile-canvas-block   { background-color: #1A0A12; }
body.tier-red    .canvas-wrapper,
body.tier-red    .aviator-mobile-canvas-block   { background-color: #1F0510; }


/* ==========================================================================
   §9 BETTING PANEL — WAITING PILL (Change 1)
   The action button stays green/BET at all times; the countdown lives in this
   small pill instead of turning the whole button into a grey "WAITING" block.
   ========================================================================== */
/* The pill must sit ABOVE the button, so the button is wrapped in a column
   stack. .panel-main-controls is a flex row, so a bare sibling would have
   become a third column beside the button instead. */
.panel-action-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.aviator-wait-pill {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--aviator-text-sub);
  background: var(--aviator-surface-3);
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
}
.aviator-wait-pill[hidden] { display: none !important; }


/* ==========================================================================
   §10 LIVE PAYOUT ACCUMULATION (Change 2)
   ========================================================================== */
.aviator-live-payout {
  position: absolute;
  /* Centred and raised clear of the runway: at bottom:24px the amount sat
     exactly where the parked/launching plane sits and the two overlapped. */
  top: 62%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 15;
  pointer-events: none;
}
.aviator-live-payout[hidden] { display: none !important; }
.aviator-live-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--aviator-text-muted);
  margin-bottom: 2px;
}
.aviator-live-amount {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--aviator-green);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0, 231, 1, 0.4);
}
@media (max-width: 767px) {
  .aviator-live-amount { font-size: 22px; }
}


/* ==========================================================================
   §11 BUST OVERLAY — FULL-CANVAS "FLEW AWAY!" (Change 12)
   Declared last on purpose: `.canvas-wrapper > *` earlier in this file sets
   position: relative / z-index: 1 at equal specificity, so source order is
   what keeps this absolutely positioned above the canvas.
   ========================================================================== */
.aviator-bust-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bustFadeIn 0.25s ease both;
}
.aviator-bust-overlay[hidden] { display: none !important; }

@keyframes bustFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.aviator-bust-content {
  text-align: center;
  animation: bustPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bustPop {
  0%   { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.aviator-bust-title {
  margin: 0 0 8px;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--aviator-red);
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(233, 17, 60, 0.6);
}

.aviator-bust-mult {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--aviator-text-white);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  .aviator-bust-title { font-size: 40px; }
  .aviator-bust-mult  { font-size: 28px; }
}

/* Below desktop the 6-across chip row gets too narrow for "1,000", so the
   chips wrap 3-across instead. The button stack is the tallest child of
   .panel-main-controls either way, so the panel's fixed 155px still holds. */
@media (max-width: 1023px) {
  .quick-amounts-row { grid-template-columns: repeat(3, 1fr); }
}


/* ==========================================================================
   §12 ROUND-HISTORY SHEET (SECTION 2)
   ========================================================================== */
.aviator-history-modal {
  position: fixed; inset: 0; z-index: 8000;
  display: flex; align-items: flex-end; justify-content: center;
}
.aviator-history-modal[hidden] { display: none !important; }
.aviator-history-modal__scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.aviator-history-modal__sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  max-height: 75vh;
  background: var(--aviator-surface-1);
  border-top-left-radius: 16px; border-top-right-radius: 16px;
  border: 1px solid var(--aviator-border);
  display: flex; flex-direction: column;
  animation: sheetUp 0.25s ease both;
}
@keyframes sheetUp {
  from { transform: translateY(30%); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}
.aviator-history-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--aviator-border);
}
.aviator-history-modal__head h2 {
  margin: 0; font-size: 16px; font-weight: 700;
  color: var(--aviator-text-white);
}
.aviator-history-modal__close {
  background: transparent; border: 0;
  color: var(--aviator-text-muted);
  font-size: 24px; cursor: pointer; padding: 0 4px;
}
.aviator-history-modal__body {
  flex: 1; overflow-y: auto; padding: 12px 18px 20px;
}
.aviator-history-row {
  display: grid;
  grid-template-columns: 60px 1fr 90px;
  gap: 10px; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.aviator-history-row__id { color: var(--aviator-text-muted); }
.aviator-history-row__mult {
  font-weight: 700; text-align: right;
}
.aviator-history-row__mult.tier-blue   { color: #4A9EFF; }
.aviator-history-row__mult.tier-purple { color: #B388FF; }
.aviator-history-row__mult.tier-pink   { color: #FF3D71; }
.aviator-history-row__mult.tier-red    { color: #E9113C; }
.aviator-history-row__time { color: var(--aviator-text-muted); font-size: 12px; }
.aviator-history-empty { text-align: center; padding: 40px 0; color: var(--aviator-text-muted); }


/* ==========================================================================
   §13 SECOND-PANEL COLLAPSE TOGGLE (SECTION 3)
   ========================================================================== */
.panel-collapse-toggle {
  margin-left: auto;
  width: 32px; height: 20px;
  background: var(--aviator-surface-3);
  border: 1px solid var(--aviator-border);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: background 0.15s ease;
}
.panel-collapse-dot {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--aviator-green);
  transition: transform 0.2s ease;
}
.panel-collapse-toggle[aria-expanded="false"] {
  background: var(--aviator-surface-2);
}
.panel-collapse-toggle[aria-expanded="false"] .panel-collapse-dot {
  background: var(--aviator-text-muted);
  transform: translateX(12px);
}

.bet-panel.is-collapsed .panel-main-controls,
.bet-panel.is-collapsed .panel-auto-opts,
.bet-panel.is-collapsed .panel-mode-toggle,
.bet-panel.is-collapsed .panel-action-stack {
  display: none !important;
}
.bet-panel.is-collapsed {
  min-height: 0 !important;
  padding: 10px 14px !important;
}
.bet-panel.is-collapsed .panel-header-tabs {
  margin-bottom: 0 !important;
}


