/* ==========================================================================
   ROADSTER DASH - BETTING EDITION STYLES
   Futuristic Cyberpunk / Casino Luxury Neon Theme
   Mobile App Optimized (iOS & Android Safe Areas & Standalone Support)
   ========================================================================== */

:root {
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --bet-bg-dark: rgba(10, 11, 16, 0.95);
  --bet-card-bg: rgba(17, 20, 29, 0.92);
  --bet-card-border: rgba(255, 255, 255, 0.12);
  --bet-tesla-red: #e82127;
  --bet-tesla-red-glow: rgba(232, 33, 39, 0.45);
  --bet-win-green: #00e676;
  --bet-win-green-glow: rgba(0, 230, 118, 0.45);
  --bet-cyan: #00f0ff;
  --bet-cyan-glow: rgba(0, 240, 255, 0.4);
  --bet-gold: #ffb703;
  --bet-gold-glow: rgba(255, 183, 3, 0.45);
  --bet-text-primary: #ffffff;
  --bet-text-secondary: #94a3b8;
  --bet-font-display: 'Rajdhani', -apple-system, sans-serif;
  --bet-font-mono: 'Share Tech Mono', monospace;
}

/* Otimização App Mobile: Desativa pull-to-refresh acidental e rubber-band */
html, body {
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* ── TOP BAR (CASINO HEADER) ─────────────────────────────────── */
#bet-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding-top: var(--safe-t);
  padding-left: max(16px, var(--safe-l));
  padding-right: max(16px, var(--safe-r));
  height: calc(64px + var(--safe-t));
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(8, 9, 13, 0.96) 0%, rgba(8, 9, 13, 0.85) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  font-family: var(--bet-font-display);
  transition: transform 0.3s ease;
}

#bet-topbar.in-game-hidden,
body.is-racing #bet-topbar {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(-100%) !important;
}

body.is-racing #bet-hud-overlay {
  padding-top: 24px !important;
}

/* Remoção completa de Pause */
#pause-btn,
#pause,
.pause-mute,
[data-i18n="hint.pause"],
[data-i18n="help.pause"] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

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

.bet-brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  font-size: 1.15rem;
  text-transform: uppercase;
}

.bet-brand-badge .dash-tag {
  color: var(--bet-tesla-red);
  text-shadow: 0 0 12px var(--bet-tesla-red-glow);
}

.bet-brand-badge .bet-tag {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 1px;
}

/* Toggle Modo Real vs Modo Demo */
.bet-mode-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.bet-mode-btn {
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--bet-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.bet-mode-btn.active.real {
  background: var(--bet-win-green);
  color: #052e16;
  box-shadow: 0 0 12px var(--bet-win-green-glow);
}

.bet-mode-btn.active.demo {
  background: var(--bet-gold);
  color: #382400;
  box-shadow: 0 0 12px var(--bet-gold-glow);
}

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

/* Carteira / Saldo */
.bet-wallet-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 10px;
}

.bet-wallet-info {
  display: flex;
  flex-direction: column;
}

.bet-wallet-label {
  font-size: 0.68rem;
  color: var(--bet-text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.bet-wallet-amount {
  font-family: var(--bet-font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  transition: color 0.3s, transform 0.3s;
}

.bet-wallet-amount.pulse-green {
  color: var(--bet-win-green);
  transform: scale(1.1);
}

.bet-wallet-amount.pulse-red {
  color: var(--bet-tesla-red);
  transform: scale(0.95);
}

/* Botões de Ação na Topbar */
.btn-deposit-top {
  background: linear-gradient(135deg, #00e676 0%, #00b359 100%);
  color: #052e16;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 14px var(--bet-win-green-glow);
  transition: all 0.2s ease;
}

.btn-deposit-top:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-withdraw-top, .btn-history-top, .btn-logout-top, .btn-login-trigger {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-withdraw-top:hover, .btn-history-top:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-logout-top:hover {
  background: rgba(232, 33, 39, 0.2);
  border-color: var(--bet-tesla-red);
  color: #ff6b6b;
}

.bet-user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── OVERLAY DE AUTENTICAÇÃO INICIAL (LOGIN / CADASTRO / JOGAR GRÁTIS) ── */
#bet-auth-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(16, 20, 32, 0.92) 0%, rgba(5, 6, 10, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#bet-auth-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bet-auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bet-card-bg);
  border: 1px solid var(--bet-card-border);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 30px rgba(232, 33, 39, 0.15);
  overflow: hidden;
  font-family: var(--bet-font-display);
  position: relative;
  animation: authCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.bet-auth-header {
  padding: 24px 24px 16px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(232, 33, 39, 0.1) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bet-auth-header h2 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: 2px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bet-auth-header h2 span {
  color: var(--bet-tesla-red);
  text-shadow: 0 0 14px var(--bet-tesla-red-glow);
}

.bet-auth-header p {
  margin: 6px 0 0 0;
  font-size: 0.9rem;
  color: var(--bet-text-secondary);
}

/* Abas Login / Cadastro */
.bet-auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bet-auth-tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--bet-text-secondary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bet-auth-tab:hover {
  color: #fff;
}

.bet-auth-tab.active {
  color: #fff;
  border-bottom-color: var(--bet-tesla-red);
  background: rgba(232, 33, 39, 0.08);
}

.bet-auth-body {
  padding: 22px 24px;
}

/* Form Styles */
.bet-form-group {
  margin-bottom: 14px;
  text-align: left;
}

.bet-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.bet-form-group label .optional {
  color: var(--bet-text-secondary);
  font-size: 0.72rem;
  font-weight: normal;
}

.bet-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.bet-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.bet-input-wrap input:focus {
  border-color: var(--bet-tesla-red);
  box-shadow: 0 0 10px var(--bet-tesla-red-glow);
  background: rgba(0, 0, 0, 0.65);
}

.bet-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--bet-text-secondary);
  cursor: pointer;
  padding: 4px;
}

.bet-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 18px;
  cursor: pointer;
}

.bet-checkbox-group input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--bet-tesla-red);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.bet-checkbox-group span {
  font-size: 0.8rem;
  line-height: 1.35;
  color: #94a3b8;
  text-align: left;
}

.bet-checkbox-group a {
  color: var(--bet-cyan);
  text-decoration: underline;
}

.bet-alert-msg {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 14px;
  display: none;
  text-align: center;
}

.bet-alert-msg.error {
  display: block;
  background: rgba(232, 33, 39, 0.18);
  border: 1px solid rgba(232, 33, 39, 0.4);
  color: #ff9999;
}

.bet-alert-msg.success {
  display: block;
  background: rgba(0, 230, 118, 0.18);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: #80ffbf;
}

/* Botões do Formulário */
.btn-bet-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--bet-tesla-red) 0%, #b31419 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--bet-tesla-red-glow);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-bet-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--bet-tesla-red-glow);
}

.btn-bet-primary:active {
  transform: translateY(0);
}

.bet-divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
  color: #64748b;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.bet-divider::before, .bet-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bet-divider span {
  padding: 0 10px;
}

/* Botão JOGAR GRÁTIS */
.btn-bet-free {
  width: 100%;
  padding: 12px;
  background: rgba(255, 183, 3, 0.12);
  border: 1px solid var(--bet-gold);
  border-radius: 10px;
  color: var(--bet-gold);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 183, 3, 0.15);
}

.btn-bet-free:hover {
  background: rgba(255, 183, 3, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 183, 3, 0.3);
}

.btn-bet-free .subtext {
  font-size: 0.72rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-top: 2px;
}

/* ── PAINEL DE APOSTAS NO MENU PRINCIPAL ─────────────────────── */
#bet-menu-panel {
  width: 100%;
  max-width: 480px;
  background: rgba(14, 17, 26, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px;
  margin: 14px 0 18px 0;
  font-family: var(--bet-font-display);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

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

.bet-panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--bet-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bet-panel-mode-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.bet-panel-mode-badge.real {
  background: rgba(0, 230, 118, 0.15);
  color: var(--bet-win-green);
  border: 1px solid rgba(0, 230, 118, 0.35);
}

.bet-panel-mode-badge.demo {
  background: rgba(255, 183, 3, 0.15);
  color: var(--bet-gold);
  border: 1px solid rgba(255, 183, 3, 0.35);
}

/* Seletor de Valor de Aposta */
.bet-amount-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.bet-amount-box label {
  font-size: 0.78rem;
  color: var(--bet-text-secondary);
  font-weight: 600;
}

.bet-amount-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bet-currency-prefix {
  font-family: var(--bet-font-mono);
  font-size: 1.1rem;
  color: var(--bet-win-green);
  font-weight: 700;
}

.bet-amount-input {
  width: 110px;
  background: transparent;
  border: none;
  font-family: var(--bet-font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-align: right;
  outline: none;
}

/* Botões Rápidos de Aposta */
.bet-quick-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.bet-quick-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--bet-font-mono);
}

.bet-quick-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.bet-quick-btn.active {
  background: var(--bet-cyan);
  border-color: var(--bet-cyan);
  color: #000;
  font-weight: 900;
}

/* Modificadores: 1/2, 2X, MAX */
.bet-modifier-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.bet-mod-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--bet-text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.bet-mod-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Auto-Cashout Config */
.bet-autocashout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.bet-autocashout-row label {
  font-size: 0.78rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bet-autocashout-select {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--bet-win-green);
  font-family: var(--bet-font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 6px;
  outline: none;
}

/* Botão Principal de Apostar e Correr */
.btn-bet-play {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #00e676 0%, #00a854 100%);
  border: none;
  border-radius: 12px;
  color: #052e16;
  font-family: var(--bet-font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 4px 22px var(--bet-win-green-glow);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
}

.btn-bet-play.demo-style {
  background: linear-gradient(135deg, #ffb703 0%, #d49000 100%);
  color: #2b1800;
  box-shadow: 0 4px 22px var(--bet-gold-glow);
}

.btn-bet-play:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--bet-win-green-glow);
}

.btn-bet-play .hint-key {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  opacity: 0.8;
}

/* ── HUD DE APOSTAS EM JOGO (PROGRESSO DA META 500m) ────────── */
#bet-hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  font-family: var(--bet-font-display);
  display: none !important;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 24px 30px 24px;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Visível estritamente enquanto estiver correndo */
body.is-racing #bet-hud-overlay:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ocultação forçada e absoluta no lobby / menu e game over */
#bet-hud-overlay.hidden,
body:not(.is-racing) #bet-hud-overlay,
#menu:not(.hidden) ~ #bet-hud-overlay,
#menu:not(.hidden) #bet-hud-overlay,
#gameover:not(.hidden) ~ #bet-hud-overlay {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Card Superior Central com o Multiplicador */
.bet-hud-multiplier-card {
  align-self: center;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 12px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 20px var(--bet-cyan-glow);
  pointer-events: auto;
  animation: hudCardBounce 0.3s ease;
}

@keyframes hudCardBounce {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.bet-hud-bet-val {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--bet-text-secondary);
  text-transform: uppercase;
}

.bet-hud-mult-value {
  font-family: var(--bet-font-mono);
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin: 4px 0;
  text-shadow: 0 0 20px var(--bet-cyan-glow);
  transition: transform 0.1s;
}

.bet-hud-mult-value.mult-pulse {
  transform: scale(1.08);
  color: var(--bet-win-green);
  text-shadow: 0 0 25px var(--bet-win-green-glow);
}

.bet-hud-win-potential {
  font-family: var(--bet-font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bet-win-green);
  text-shadow: 0 0 10px var(--bet-win-green-glow);
}

/* Área Inferior com o Botão Gigante de CASHOUT */
.bet-hud-cashout-wrap {
  align-self: center;
  width: 100%;
  max-width: 440px;
  pointer-events: auto;
}

.btn-bet-cashout {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, #00e676 0%, #00b359 100%);
  border: 2px solid #fff;
  border-radius: 16px;
  color: #042411;
  font-family: var(--bet-font-display);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 0 35px var(--bet-win-green-glow), 0 8px 25px rgba(0, 0, 0, 0.5);
  animation: cashoutPulse 1.2s infinite alternate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  transition: all 0.15s;
}

@keyframes cashoutPulse {
  0% { transform: scale(1); box-shadow: 0 0 25px var(--bet-win-green-glow); }
  100% { transform: scale(1.03); box-shadow: 0 0 45px var(--bet-win-green); }
}

.btn-bet-cashout:active {
  transform: scale(0.97);
}

.btn-bet-cashout .cashout-key {
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
  font-family: var(--bet-font-mono);
}

.btn-bet-cashout.cashed-out {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  animation: none;
  cursor: default;
  opacity: 0.9;
  justify-content: center;
  gap: 10px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Banner Notificador de Green / Red */
.bet-hud-banner {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  padding: 18px 36px;
  border-radius: 16px;
  font-family: var(--bet-font-display);
  font-size: 1.8rem;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
  pointer-events: none;
}

.bet-hud-banner.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.bet-hud-banner.banner-green {
  background: rgba(0, 230, 118, 0.94);
  color: #042411;
  box-shadow: 0 0 60px var(--bet-win-green-glow);
  border: 2px solid #fff;
}

.bet-hud-banner.banner-red {
  background: rgba(232, 33, 39, 0.94);
  color: #fff;
  box-shadow: 0 0 60px var(--bet-tesla-red-glow);
  border: 2px solid #fff;
}

/* ── GAME OVER BETTING CARD ──────────────────────────────────── */
#bet-gameover-card {
  width: 100%;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 12px;
  font-family: var(--bet-font-display);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: authCardIn 0.3s ease;
}

#bet-gameover-card.green-card {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid var(--bet-win-green);
  box-shadow: 0 0 25px var(--bet-win-green-glow);
}

#bet-gameover-card.red-card {
  background: rgba(232, 33, 39, 0.12);
  border: 1px solid var(--bet-tesla-red);
  box-shadow: 0 0 25px var(--bet-tesla-red-glow);
}

.bet-go-status {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.green-card .bet-go-status { color: var(--bet-win-green); }
.red-card .bet-go-status { color: var(--bet-tesla-red); }

.bet-go-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--bet-font-mono);
  font-size: 1rem;
}

.bet-go-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.btn-rebet, .btn-double-rebet {
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-rebet {
  background: var(--bet-win-green);
  color: #042411;
}

.btn-double-rebet {
  background: var(--bet-gold);
  color: #2b1800;
}

.btn-rebet:hover, .btn-double-rebet:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ── MODAIS (DEPÓSITO, SAQUE, HISTÓRICO, TERMOS) ─────────────── */
.bet-generic-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: all 0.25s ease;
}

.bet-generic-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bet-modal-box {
  width: 100%;
  max-width: 480px;
  background: var(--bet-card-bg);
  border: 1px solid var(--bet-card-border);
  border-radius: 16px;
  padding: 24px;
  font-family: var(--bet-font-display);
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.bet-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--bet-text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.bet-modal-close:hover {
  color: #fff;
}

.bet-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pix QRCode Mock */
.bet-pix-qr-box {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  width: 160px;
  height: 160px;
  margin: 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bet-pix-copy-box {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.bet-pix-copy-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-family: var(--bet-font-mono);
  font-size: 0.8rem;
}

.btn-pix-copy {
  background: var(--bet-cyan);
  color: #000;
  border: none;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

/* Tabela de Histórico */
.bet-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 10px;
}

.bet-history-table th {
  color: var(--bet-text-secondary);
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.bet-history-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--bet-font-mono);
}

.bet-badge-green {
  background: rgba(0, 230, 118, 0.2);
  color: var(--bet-win-green);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.bet-badge-red {
  background: rgba(232, 33, 39, 0.2);
  color: var(--bet-tesla-red);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

/* RESPONSIVIDADE MOBILE E SAFE AREAS */
#menu {
  padding-top: calc(72px + var(--safe-t)) !important;
  padding-bottom: max(20px, var(--safe-b)) !important;
  padding-left: max(16px, var(--safe-l)) !important;
  padding-right: max(16px, var(--safe-r)) !important;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#bet-hud-overlay {
  top: var(--safe-t) !important;
  padding-top: max(12px, var(--safe-t)) !important;
  padding-left: max(12px, var(--safe-l)) !important;
  padding-right: max(12px, var(--safe-r)) !important;
}

.bet-modal-box {
  max-height: calc(100dvh - 36px - var(--safe-t) - var(--safe-b)) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* ── ADAPTAÇÃO MOBILE DA TOPBAR (SMARTPHONES E TABLETS <= 768px) ── */
@media (max-width: 768px) {
  #bet-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: calc(48px + env(safe-area-inset-top, 0px)) !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-left: max(8px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(8px, env(safe-area-inset-right, 0px)) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    gap: 4px !important;
    z-index: 10000 !important;
    background: rgba(9, 11, 16, 0.94) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .bet-topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
  }

  .bet-brand-badge {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  .bet-brand-badge .bet-tag,
  .bet-brand-badge span:not(.bet-brand-icon) {
    display: none !important;
  }

  .bet-mode-toggle {
    padding: 2px !important;
    gap: 2px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 12px !important;
  }

  .bet-mode-toggle button {
    padding: 3px 6px !important;
    font-size: 0.66rem !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
  }

  .bet-topbar-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    flex-shrink: 1 !important;
    overflow: hidden !important;
  }

  .bet-user-pill,
  .btn-reload-demo,
  .bet-wallet-label,
  .tag-bonus {
    display: none !important;
  }

  .bet-wallet-box {
    padding: 3px 6px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  .bet-wallet-amount {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
  }

  .btn-deposit-top {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  .btn-withdraw-top {
    display: none !important;
  }

  .btn-login-top, .btn-register-top {
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  .btn-logout-top {
    padding: 4px 6px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
  }

  .bet-coins-pill {
    padding: 2px 5px !important;
    font-size: 0.72rem !important;
    gap: 3px !important;
    border-radius: 12px !important;
  }

  .bet-coin-icon-img {
    width: 14px !important;
    height: 14px !important;
  }

  /* Grupo de Ações de Navegação: Recompensas, Loja, Histórico */
  .bet-topbar-nav-btns {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .btn-nav-top {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 1rem !important;
  }

  .btn-nav-top .btn-rewards-text,
  .btn-nav-top .btn-garage-text,
  .btn-nav-top .btn-history-text {
    display: none !important;
  }

  .btn-nav-top .bet-reward-badge {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    width: 10px !important;
    height: 10px !important;
    background: #ff3b30 !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    border: 2px solid #090b10 !important;
  }

  /* Evita auto-zoom do iOS Safari em inputs */
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ── BOTÕES DE LOGIN E REGISTRO NA TOPBAR (QUANDO DESLOGADO) ─── */
.btn-login-top {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--bet-font-display);
}

.btn-login-top:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.btn-register-top {
  background: linear-gradient(135deg, #e82127 0%, #ff5722 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--bet-font-display);
  box-shadow: 0 0 16px rgba(232, 33, 39, 0.45);
}

.btn-register-top:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(232, 33, 39, 0.7);
}

.btn-register-top .tag-bonus {
  background: #ffd700;
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Pulso leve no modo demo */
.btn-register-top.pulse-demo {
  animation: pulseRegisterDemo 2s infinite ease-in-out;
}

@keyframes pulseRegisterDemo {
  0% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(232, 33, 39, 0.45);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 24px rgba(255, 87, 34, 0.8), 0 0 35px rgba(232, 33, 39, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(232, 33, 39, 0.45);
  }
}

.btn-reload-demo {
  background: rgba(255, 183, 3, 0.12);
  border: 1px solid var(--bet-gold);
  color: var(--bet-gold);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  font-family: var(--bet-font-display);
}

.btn-reload-demo:hover {
  background: rgba(255, 183, 3, 0.25);
  transform: translateY(-1px);
}

/* Botão Fechar Modal Auth */
.bet-auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: #cbd5e1;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.bet-auth-close:hover {
  background: rgba(232, 33, 39, 0.3);
  border-color: var(--bet-tesla-red);
  color: #fff;
  transform: scale(1.05);
}

/* ── HUD DE META DE METROS & RECOMPENSA 4X ───────────────────── */
.bet-hud-target-card {
  align-self: center;
  background: rgba(10, 12, 18, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 14px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 240, 255, 0.25);
  pointer-events: auto;
  min-width: 340px;
  animation: hudCardBounce 0.3s ease;
}

.bet-hud-target-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--bet-gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.bet-hud-target-badge {
  background: linear-gradient(135deg, #00e676, #00b359);
  color: #042411;
  font-weight: 900;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.bet-hud-progress-wrap {
  width: 100%;
  height: 14px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin: 6px 0 10px 0;
}

.bet-hud-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00e676, #00f0ff);
  border-radius: 10px;
  box-shadow: 0 0 14px var(--bet-win-green-glow);
  transition: width 0.08s linear;
}

.bet-hud-target-stats {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--bet-font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.bet-hud-target-stats .remaining {
  color: var(--bet-cyan);
}

.bet-hud-target-stats .prize {
  color: var(--bet-win-green);
}

/* ── MODAL DE VITÓRIA NO MODO GRÁTIS COM BÔNUS DE CADASTRO ───── */
.bet-free-win-card {
  max-width: 500px;
  text-align: center;
  border: 2px solid var(--bet-gold);
  box-shadow: 0 0 50px rgba(255, 183, 3, 0.4), 0 20px 60px rgba(0, 0, 0, 0.9);
  background: radial-gradient(circle at top, rgba(32, 25, 12, 0.98) 0%, rgba(12, 14, 20, 0.98) 100%);
  animation: authCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bet-free-win-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000;
  font-weight: 900;
  font-size: 0.82rem;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.bet-bonus-unlocked-box {
  background: rgba(0, 230, 118, 0.12);
  border: 1px dashed var(--bet-win-green);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  text-align: center;
}

.bet-bonus-unlocked-title {
  color: var(--bet-win-green);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.bet-bonus-unlocked-desc {
  color: #cbd5e1;
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.4;
}

.bet-bonus-coupon-pill {
  display: inline-block;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffd700;
  font-family: var(--bet-font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 4px 12px;
  border-radius: 6px;
  margin-top: 8px;
}

.bet-target-banner-panel {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.15) 0%, rgba(0, 230, 118, 0.15) 100%);
  border: 1px solid rgba(255, 183, 3, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bet-target-banner-left {
  display: flex;
  flex-direction: column;
}

.bet-target-banner-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--bet-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.bet-target-banner-sub {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.bet-target-banner-reward {
  font-family: var(--bet-font-mono);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--bet-win-green);
  text-shadow: 0 0 10px var(--bet-win-green-glow);
}

/* ── CONTROLES: OCULTAR BOCAIS E TUTORIAL DE BOCAIS ───────────── */
.help-table th:nth-child(4),
.help-table td:nth-child(4),
[data-i18n="help.h.nozzle"],
[data-i18n="help.desc"],
#help .modal-desc[data-i18n="help.desc"] {
  display: none !important;
}

/* ── MODO ACUMULADOR DE MULTIPLICADOR (ALÉM DA META) ─────────── */
.bet-hud-target-card.accumulating {
  border-color: #ffd700;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.85), 0 0 32px rgba(255, 183, 3, 0.6);
  animation: hudCardGoldGlow 1.2s infinite alternate ease-in-out;
}

@keyframes hudCardGoldGlow {
  0% { box-shadow: 0 8px 36px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 183, 3, 0.4); }
  100% { box-shadow: 0 8px 36px rgba(0, 0, 0, 0.85), 0 0 45px rgba(255, 183, 3, 0.85); }
}

.bet-hud-target-badge.accumulating {
  background: linear-gradient(135deg, #ff9100, #ff3d00);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 61, 0, 0.7);
  animation: badgeFirePulse 0.6s infinite alternate ease-in-out;
}

@keyframes badgeFirePulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.08); filter: brightness(1.3); }
}

.bet-hud-progress-fill.accumulating {
  background: linear-gradient(90deg, #ff9100, #ffd700, #00f0ff);
  background-size: 200% 100%;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.9);
  animation: progressFireShine 1s linear infinite;
}

@keyframes progressFireShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.bet-hud-cashout-wrap {
  margin-top: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.bet-hud-cashout-wrap.hidden {
  display: none !important;
}

.bet-hud-cashout-btn {
  background: linear-gradient(135deg, #00e676 0%, #00b359 100%);
  color: #042411;
  border: 2px solid #84ffb5;
  border-radius: 12px;
  padding: 10px 22px;
  font-family: var(--bet-font-mono);
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  animation: cashoutGlowPulse 0.9s infinite alternate;
}

.bet-hud-cashout-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 26px rgba(0, 230, 118, 0.85);
}

.bet-hud-cashout-btn:active {
  transform: scale(0.96);
}

@keyframes cashoutGlowPulse {
  0% { transform: scale(1); box-shadow: 0 4px 18px rgba(0, 230, 118, 0.45); }
  100% { transform: scale(1.04); box-shadow: 0 6px 28px rgba(0, 230, 118, 0.85); }
}

.cashout-warning {
  color: #ff5252;
  font-family: var(--bet-font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  margin-top: 6px;
  text-transform: uppercase;
  text-align: center;
  animation: warningPulse 0.7s infinite alternate ease-in-out;
}

@keyframes warningPulse {
  0% { opacity: 0.75; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1.02); text-shadow: 0 0 10px rgba(255, 82, 82, 0.9); }
}

/* ── REMOÇÃO COMPLETA DA BARRA DE ROCKET ────────────────────── */
#fever,
.fever,
#fever-fill,
.hud-score .fever,
.meters #fever {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

/* ── LOJA DE COSMÉTICOS & MOEDAS DE 1 REAL ─────────────────────────── */
.bet-coins-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--bet-font-display);
}
.bet-coins-pill:hover {
  background: rgba(255, 215, 0, 0.22);
  border-color: #ffd700;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}
.bet-coin-icon-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}
.bet-coin-val {
  font-family: var(--bet-font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffd700;
}
.btn-garage-top {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.2));
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: #ffd700;
  font-family: var(--bet-font-display);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.btn-garage-top:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 140, 0, 0.35));
  border-color: #ffd700;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.45);
  transform: translateY(-1px);
}
.bet-garage-menu-btn {
  color: #ffd700 !important;
  border-color: rgba(255, 215, 0, 0.35) !important;
  font-weight: 700 !important;
}
.bet-garage-menu-btn:hover {
  background: rgba(255, 215, 0, 0.15) !important;
  border-color: #ffd700 !important;
}
.bet-upgrades-menu-btn {
  color: #00f0ff !important;
  border-color: rgba(0, 240, 255, 0.45) !important;
  background: rgba(0, 240, 255, 0.08) !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}
.bet-upgrades-menu-btn:hover {
  background: rgba(0, 240, 255, 0.22) !important;
  border-color: #00f0ff !important;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35) !important;
  transform: translateY(-1px);
}

/* Modal Garagem / Loja */
.bet-garage-card {
  max-width: 620px !important;
  width: 95% !important;
  background: linear-gradient(180deg, #12151c 0%, #0a0b0e 100%) !important;
  border: 1px solid rgba(255, 215, 0, 0.35) !important;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 215, 0, 0.15) !important;
}
.bet-garage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.bet-garage-title-wrap h2 {
  font-family: var(--bet-font-display);
  font-size: 1.45rem;
  color: #fff;
  margin: 0;
  letter-spacing: 1px;
}
.bet-garage-title-wrap h2 span {
  color: #ffd700;
}
.bet-garage-title-wrap p {
  color: #94a3b8;
  font-size: 0.8rem;
  margin: 4px 0 0 0;
}
.bet-garage-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 6px 12px;
  border-radius: 12px;
}
.bet-coin-balance-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
.bet-coin-mini-img {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  vertical-align: -3px;
  object-fit: cover;
  display: inline-block;
  margin-right: 4px;
  border: 1px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.35);
}
.bet-balance-info {
  display: flex;
  flex-direction: column;
}
.bet-balance-lbl {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 700;
}
.bet-balance-num {
  font-family: var(--bet-font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffd700;
  line-height: 1;
}

/* Abas */
.bet-garage-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
@media (max-width: 540px) {
  .bet-garage-tabs {
    grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
    gap: 4px;
  }
  .bet-garage-tab {
    font-size: 0.68rem !important;
    padding: 7px 2px !important;
  }
}
.bet-garage-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-family: var(--bet-font-display);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 9px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.bet-garage-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.bet-garage-tab.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 140, 0, 0.2));
  border-color: #ffd700;
  color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Grid de Itens */
.bet-garage-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
  margin-bottom: 14px;
}
.bet-garage-items::-webkit-scrollbar {
  width: 6px;
}
.bet-garage-items::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Card do Item */
.bet-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}
.bet-item-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}
.bet-item-card.equipped {
  border-color: #17cd57;
  background: rgba(23, 205, 87, 0.08);
  box-shadow: 0 0 12px rgba(23, 205, 87, 0.2);
}
.bet-item-card.equipped::after {
  content: '✓ ATIVO';
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.55rem;
  font-weight: 900;
  color: #17cd57;
  background: rgba(23, 205, 87, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
}
.bet-swatch-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.bet-swatch-glow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
.bet-item-name {
  font-family: var(--bet-font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.2;
}
.bet-item-price {
  font-family: var(--bet-font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffd700;
  margin-bottom: 8px;
}
.bet-item-price.free {
  color: #94a3b8;
}
.bet-item-btn {
  width: 100%;
  padding: 6px 4px;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--bet-font-display);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bet-item-btn.btn-buy {
  background: linear-gradient(135deg, #ffd700, #ff9800);
  color: #000;
}
.bet-item-btn.btn-buy:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.bet-item-btn.btn-equip {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.bet-item-btn.btn-equip:hover {
  background: #17cd57;
  border-color: #17cd57;
  color: #000;
}
.bet-item-btn.btn-active {
  background: #17cd57;
  color: #000;
  cursor: default;
}
.bet-item-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bet-garage-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}
.bet-garage-tip {
  color: #94a3b8;
  font-size: 0.76rem;
}

/* ── SEÇÃO DE MELHORIAS (UPGRADES) ────────────────────────── */
.bet-upgrades-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  max-height: 380px !important;
}

.bet-upgrade-card {
  background: linear-gradient(135deg, rgba(20, 26, 42, 0.95), rgba(13, 17, 28, 0.95));
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.bet-upgrade-card:hover {
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.15);
  transform: translateY(-1px);
}

.bet-upgrade-card.maxed {
  border-color: rgba(23, 205, 87, 0.4);
  background: linear-gradient(135deg, rgba(16, 36, 26, 0.95), rgba(11, 24, 18, 0.95));
  box-shadow: 0 4px 14px rgba(23, 205, 87, 0.15);
}

.bet-upgrade-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bet-upgrade-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bet-upgrade-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bet-upgrade-name {
  font-family: var(--bet-font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.bet-upgrade-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 1px;
  line-height: 1.25;
}

.bet-upgrade-badge {
  font-family: var(--bet-font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 16px;
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.35);
  white-space: nowrap;
}

.bet-upgrade-card.maxed .bet-upgrade-badge {
  background: rgba(23, 205, 87, 0.2);
  color: #17cd57;
  border-color: #17cd57;
}

.bet-upgrade-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.bet-upgrade-progress-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bet-upgrade-pip {
  width: 22px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.3s ease;
}

.bet-upgrade-pip.filled {
  background: linear-gradient(90deg, #ffd700, #ff9100);
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.bet-upgrade-card.maxed .bet-upgrade-pip.filled {
  background: linear-gradient(90deg, #17cd57, #00ff88);
  box-shadow: 0 0 6px rgba(23, 205, 87, 0.5);
}

.bet-upgrade-stats {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
}

.bet-upgrade-stats span {
  color: #ffd700;
  font-weight: 800;
}

.bet-upgrade-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--bet-font-display);
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bet-upgrade-btn.buy {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #0b0e17;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.35);
}

.bet-upgrade-btn.buy:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.55);
}

.bet-upgrade-btn.buy:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bet-upgrade-btn.max {
  background: rgba(23, 205, 87, 0.18);
  border: 1px solid #17cd57;
  color: #17cd57;
  cursor: default;
}






/* ── LOCK CARDS (LOJA DE SKINS & MELHORIAS) ─────────────────── */
.bet-locked-wrap {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  max-height: 440px !important;
  min-height: 280px !important;
  padding: 6px !important;
}

.bet-locked-card {
  background: linear-gradient(135deg, rgba(20, 24, 38, 0.98), rgba(10, 12, 20, 0.98));
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 14px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

@media (max-width: 540px) {
  .bet-locked-wrap {
    max-height: 460px !important;
    padding: 2px !important;
  }
  .bet-locked-card {
    padding: 14px 12px !important;
    gap: 8px !important;
  }
  .bet-locked-icon {
    font-size: 2.2rem !important;
  }
  .bet-locked-badge {
    font-size: 0.68rem !important;
    padding: 3px 8px !important;
  }
  .bet-locked-title {
    font-size: 1.1rem !important;
  }
  .bet-locked-desc {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
  }
  .bet-locked-progress-wrap {
    padding: 8px 10px !important;
  }
  .btn-unlock-deposit {
    padding: 10px 12px !important;
    font-size: 0.82rem !important;
  }
}

.bet-locked-card.upgrades-locked {
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 240, 255, 0.15);
}

.bet-locked-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.bet-locked-badge {
  font-family: var(--bet-font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.bet-locked-card.upgrades-locked .bet-locked-badge {
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.15);
  border-color: rgba(0, 240, 255, 0.3);
}

.bet-locked-title {
  font-family: var(--bet-font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
}

.bet-locked-desc {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

.bet-locked-desc strong {
  color: #ffd700;
}

.bet-locked-card.upgrades-locked .bet-locked-desc strong {
  color: #00f0ff;
}

.bet-locked-progress-wrap {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
}

.bet-locked-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.bet-locked-progress-header strong {
  color: #fff;
  font-family: var(--bet-font-mono);
  font-size: 0.85rem;
}

.bet-locked-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.bet-locked-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.bet-locked-card.upgrades-locked .bet-locked-progress-fill {
  background: linear-gradient(90deg, #00f0ff, #0088ff);
}

.btn-unlock-deposit {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Indicadores de cadeado nas abas */
.bet-garage-tab.tab-locked {
  opacity: 0.85;
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── BOTÃO RECOMPENSAS NO TOPBAR & MENU ──────────────────────── */
.btn-rewards-top {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid #ec4899;
  color: #f472b6;
  font-family: var(--bet-font-display);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.btn-rewards-top:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.45), rgba(168, 85, 247, 0.45));
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.4);
  transform: translateY(-1px);
}

.bet-reward-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.2;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse 1.5s infinite;
}

.bet-rewards-menu-btn {
  color: #ec4899 !important;
  border-color: rgba(236, 72, 153, 0.45) !important;
  background: rgba(236, 72, 153, 0.08) !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.15);
}

.bet-rewards-menu-btn:hover {
  background: rgba(236, 72, 153, 0.22) !important;
  border-color: #ec4899 !important;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.35) !important;
  transform: translateY(-1px);
}

.bet-rewards-menu-btn.has-reward {
  animation: rewardPulse 1.8s infinite;
}

@keyframes rewardPulse {
  0% { box-shadow: 0 0 10px rgba(236, 72, 153, 0.3); }
  50% { box-shadow: 0 0 20px rgba(236, 72, 153, 0.7); }
  100% { box-shadow: 0 0 10px rgba(236, 72, 153, 0.3); }
}

.tag-reward-alert {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 4px;
}

/* ── MODAL DE RECOMPENSAS ────────────────────────────────────── */
.bet-rewards-card {
  max-width: 640px !important;
  width: 95% !important;
  background: linear-gradient(180deg, #141624 0%, #0c0e17 100%) !important;
  border: 1px solid rgba(236, 72, 153, 0.35) !important;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(236, 72, 153, 0.15) !important;
}

.bet-rewards-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.bet-rewards-title-wrap h2 {
  font-family: var(--bet-font-display);
  font-size: 1.45rem;
  color: #fff;
  margin: 0;
  letter-spacing: 1px;
}

.bet-rewards-title-wrap h2 span {
  color: #ec4899;
}

.bet-rewards-title-wrap p {
  color: #94a3b8;
  font-size: 0.8rem;
  margin: 4px 0 0 0;
}

.bet-rewards-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 2px;
}

.bet-rewards-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
}

.bet-rewards-sec-header {
  margin-bottom: 12px;
}

.bet-sec-title {
  font-family: var(--bet-font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.bet-sec-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Grade de 7 dias */
.bet-daily-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

@media (max-width: 540px) {
  .bet-daily-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.bet-daily-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.bet-daily-card.ready {
  background: rgba(236, 72, 153, 0.15);
  border-color: #ec4899;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
  transform: scale(1.04);
}

.bet-daily-card.claimed {
  background: rgba(23, 205, 87, 0.08);
  border-color: rgba(23, 205, 87, 0.4);
}

.bet-daily-day {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
}

.bet-daily-icon {
  font-size: 1.2rem;
}

.bet-daily-val {
  font-family: var(--bet-font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bet-daily-badge {
  font-size: 0.55rem;
  font-weight: 800;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 4px;
  border-radius: 4px;
}

.bet-daily-card.ready .bet-daily-badge {
  color: #ec4899;
  background: rgba(236, 72, 153, 0.2);
}

.bet-daily-card.claimed .bet-daily-badge {
  color: #17cd57;
  background: rgba(23, 205, 87, 0.2);
}

.btn-claim-daily {
  width: 100%;
  padding: 12px;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #ec4899, #a855f7) !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(236, 72, 153, 0.4) !important;
}

.btn-claim-daily.claimed {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #64748b !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

/* Lista de Tarefas */
.bet-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bet-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.bet-task-item.ready {
  border-color: rgba(236, 72, 153, 0.4);
  background: rgba(236, 72, 153, 0.06);
}

.bet-task-item.claimed {
  opacity: 0.7;
}

.bet-task-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bet-task-icon {
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bet-task-title {
  font-family: var(--bet-font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.bet-task-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 1px;
}

.bet-task-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.bet-task-reward {
  font-family: var(--bet-font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffd700;
  display: flex;
  align-items: center;
}

.btn-task-action {
  font-family: var(--bet-font-display);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-task-action.btn-ready {
  background: linear-gradient(135deg, #17cd57, #00ff88);
  color: #0b0e17;
  box-shadow: 0 0 10px rgba(23, 205, 87, 0.4);
}

.btn-task-action.btn-ready:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-task-action.btn-claimed {
  background: rgba(23, 205, 87, 0.15);
  color: #17cd57;
  border: 1px solid rgba(23, 205, 87, 0.3);
  cursor: default;
}

.btn-task-action.btn-deposit-cta {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
}

.btn-task-action.btn-deposit-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-task-action.btn-locked {
  background: rgba(255, 255, 255, 0.06);
  color: #64748b;
  cursor: not-allowed;
}

.bet-rewards-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  margin-top: 6px;
}

.bet-rewards-tip {
  color: #94a3b8;
  font-size: 0.75rem;
}

.bet-reward-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.4);
  z-index: 999999999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

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

/* ==============================================================================
   CONTROLES TÁTEIS & ADAPTAÇÃO TOTAL PARA DISPOSITIVOS MÓVEIS (SMARTPHONES)
   ============================================================================== */

/* Barra de controles móveis durante a corrida */
.bet-mobile-touch-bar {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: calc(12px + env(safe-area-inset-left, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 99999;
}

/* Mostra controles táteis somente durante a corrida */
body.is-racing .bet-mobile-touch-bar {
  display: flex !important;
}

/* Em computadores desktop grandes com mouse, oculta se hover for preciso */
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
  .bet-mobile-touch-bar {
    display: none !important;
  }
}

.bet-touch-group {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.bet-touch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
  background: rgba(15, 20, 32, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-family: var(--bet-font-display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.08s ease, border-color 0.08s ease, box-shadow 0.08s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  min-width: 64px;
  min-height: 58px;
  padding: 6px 10px;
}

.bet-touch-btn svg {
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.bet-touch-btn:active, .bet-touch-btn.pressed {
  transform: scale(0.92);
  background: rgba(0, 240, 255, 0.25);
  border-color: #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6), inset 0 0 12px rgba(0, 240, 255, 0.4);
}

/* Botões de Direção (Esquerda e Direita) */
.btn-steer-left, .btn-steer-right {
  width: 66px;
  height: 60px;
  color: #00f0ff;
  border-color: rgba(0, 240, 255, 0.35);
}

/* Botão de Pulo (Jump) */
.btn-action-jump {
  width: 72px;
  height: 62px;
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.25), rgba(16, 185, 129, 0.15));
  border-color: rgba(0, 230, 118, 0.45);
  color: #00e676;
}

.btn-action-jump:active, .btn-action-jump.pressed {
  background: rgba(0, 230, 118, 0.4);
  border-color: #00e676;
  box-shadow: 0 0 22px rgba(0, 230, 118, 0.7);
}

/* Botão de Nitro / Turbo */
.btn-action-boost {
  width: 64px;
  height: 60px;
  background: linear-gradient(135deg, rgba(255, 106, 42, 0.25), rgba(239, 68, 68, 0.15));
  border-color: rgba(255, 106, 42, 0.45);
  color: #ff6a2a;
}

.btn-action-boost:active, .btn-action-boost.pressed {
  background: rgba(255, 106, 42, 0.45);
  border-color: #ff6a2a;
  box-shadow: 0 0 24px rgba(255, 106, 42, 0.8);
}

/* Ajuste da HUD de Meta e Cash Out no mobile */
@media (max-width: 768px) {
  #bet-hud-overlay {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 0 10px !important;
  }

  /* ── 1. AJUSTES DA CORRIDA (IN-GAME HUD 100% ENQUADRADO NO MOBILE) ── */
  body.is-racing #bet-topbar {
    display: none !important;
  }

  /* Oculta totalmente do mobile qualquer elemento da engine antiga que polua a tela */
  body.is-racing #hud .hud-top .hud-score,
  body.is-racing #hud .hud-top .hud-right,
  body.is-racing #hud .hud-left .hud-dist,
  body.is-racing #hud .key-hints,
  body.is-racing #hud #start-guide,
  body.is-racing #hud #item-slot,
  body.is-racing #hud #touch-buttons,
  body.is-racing #hud #fever,
  body.is-racing #hud .meters,
  body.is-racing #hud .frame {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Overlay de HUD da Aposta: Enquadramento Preciso */
  body.is-racing #bet-hud-overlay {
    position: fixed !important;
    inset: 0 !important;
    pointer-events: none !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 0 10px !important;
    box-sizing: border-box !important;
  }

  /* Card da Meta de 500m & Recompensa */
  body.is-racing .bet-hud-target-card {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 360px !important;
    min-width: unset !important;
    padding: 8px 12px !important;
    border-radius: 14px !important;
    background: rgba(10, 14, 22, 0.88) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(0, 240, 255, 0.35) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8), 0 0 14px rgba(0, 240, 255, 0.2) !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
  }

  body.is-racing .bet-hud-target-title {
    font-size: 0.74rem !important;
    margin-bottom: 4px !important;
  }

  body.is-racing .bet-hud-target-badge {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
  }

  body.is-racing .bet-hud-progress-wrap {
    height: 10px !important;
    margin: 3px 0 5px 0 !important;
  }

  body.is-racing .bet-hud-target-stats {
    font-size: 0.82rem !important;
  }

  /* Barra de Vida / Combustível (Air) posicionada logo abaixo da meta */
  body.is-racing #hud .hud-bottom {
    position: fixed !important;
    top: calc(84px + env(safe-area-inset-top, 0px)) !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 32px) !important;
    max-width: 320px !important;
    z-index: 99990 !important;
  }

  body.is-racing #hud .hud-bottom .air {
    width: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
  }

  /* Botão de Cash Out (Sacar Agora) centralizado e flutuante */
  body.is-racing .bet-hud-cashout-wrap {
    position: fixed !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 24px) !important;
    max-width: 320px !important;
    z-index: 100000 !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  body.is-racing .bet-hud-cashout-btn {
    width: 100% !important;
    height: 50px !important;
    font-size: 1.15rem !important;
    border-radius: 14px !important;
    box-shadow: 0 0 25px rgba(0, 230, 118, 0.7), 0 8px 24px rgba(0, 0, 0, 0.8) !important;
    animation: cashoutPulseMobile 0.85s infinite alternate !important;
  }

  @keyframes cashoutPulseMobile {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(0, 230, 118, 0.5); }
    100% { transform: scale(1.03); box-shadow: 0 0 30px rgba(0, 230, 118, 0.85); }
  }

  .cashout-warning {
    font-size: 0.68rem !important;
    margin-top: 4px !important;
  }

  /* Controles Táteis na Base da Tela */
  body.is-racing .bet-mobile-touch-bar {
    position: fixed !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    left: 8px !important;
    right: 8px !important;
    width: calc(100% - 16px) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    pointer-events: none !important;
    z-index: 100000 !important;
    box-sizing: border-box !important;
  }

  .bet-touch-group {
    display: flex !important;
    gap: 6px !important;
    pointer-events: auto !important;
  }

  .btn-steer-left, .btn-steer-right {
    width: 58px !important;
    height: 54px !important;
    min-width: 58px !important;
    min-height: 54px !important;
    border-radius: 14px !important;
  }

  .btn-action-jump {
    width: 64px !important;
    height: 56px !important;
    min-width: 64px !important;
    min-height: 56px !important;
    border-radius: 14px !important;
  }

  .btn-action-boost {
    width: 56px !important;
    height: 54px !important;
    min-width: 56px !important;
    min-height: 54px !important;
    border-radius: 14px !important;
  }

  /* ── 2. VISIBILIDADE DO CARRO NO LOBBY NO MOBILE (SEM LETRAS NA FRENTE) ── */
  #menu {
    position: fixed !important;
    inset: 0 !important;
    top: calc(48px + env(safe-area-inset-top, 0px)) !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important; /* Doca tudo na base da tela */
    align-items: center !important;
    padding: 0 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px !important;
    pointer-events: none !important; /* Permite arrastar e interagir com o carro 3D no topo! */
    background: transparent !important;
    overflow: hidden !important;
    z-index: 20 !important;
  }

  .menu-left {
    width: 100% !important;
    max-width: 420px !important;
    margin-top: auto !important;
    pointer-events: auto !important; /* Reativa cliques nos botões */
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }

  /* Esconde textos desnecessários que ficavam em cima do carro no PC */
  .pilot, .best, #challenge, .menu-mute {
    display: none !important;
  }

  #bet-menu-panel {
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 10px 12px 8px 12px !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, rgba(14, 18, 30, 0.88) 0%, rgba(9, 11, 18, 0.98) 100%) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(0, 240, 255, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85) !important;
  }

  .bet-panel-header {
    margin-bottom: 6px !important;
  }

  .bet-target-banner-panel {
    padding: 6px 10px !important;
    margin-bottom: 6px !important;
    border-radius: 10px !important;
  }

  .bet-target-banner-title {
    font-size: 0.76rem !important;
  }

  .bet-target-banner-reward {
    font-size: 0.92rem !important;
  }

  .bet-amount-box {
    padding: 5px 10px !important;
    margin-bottom: 5px !important;
  }

  .bet-amount-input {
    font-size: 1.1rem !important;
  }

  .bet-quick-buttons {
    gap: 4px !important;
    margin-bottom: 5px !important;
  }

  .bet-quick-btn {
    padding: 6px 2px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
  }

  .bet-modifier-buttons {
    gap: 4px !important;
    margin-bottom: 6px !important;
  }

  .bet-mod-btn {
    padding: 4px 2px !important;
    font-size: 0.68rem !important;
  }

  .btn-bet-play {
    height: 48px !important;
    font-size: 1.05rem !important;
    padding: 8px !important;
    border-radius: 12px !important;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.5) !important;
  }

  .menu-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    width: 100% !important;
    margin-top: 4px !important;
  }

  .menu-row button {
    padding: 8px 2px !important;
    font-size: 0.68rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-radius: 10px !important;
  }

  #settings-btn, #help-btn {
    display: none !important;
  }

  /* Modais com altura máxima segura e scroll fluido */
  .bet-modal-box {
    max-height: calc(92dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    padding: 16px 14px !important;
    border-radius: 18px !important;
  }

  /* QR Code ajustado para telas mobile */
  .bet-deposit-qr-wrap img, .bet-deposit-qr-wrap canvas {
    max-width: 200px !important;
    height: auto !important;
  }

  /* Copia e Cola em mobile */
  .bet-pix-emv-box {
    font-size: 0.72rem !important;
    padding: 8px 10px !important;
    max-height: 70px !important;
  }
}
