/* =========================================================
   SPK Arcade Game & Switcher Stylesheet
   Theme: "SPK Rush / Toyota Sales Racer" Cyberpunk Arcade
   ========================================================= */

/* ── Mode Switcher Card ───────────────────────────────── */
.input-mode-switcher-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color, #e2e8f0);
  margin-bottom: 20px;
}

.input-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
}

.mode-toggle-btn {
  border: none;
  background: transparent;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.mode-toggle-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mode-toggle-btn#btnModeGame.active {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fbbf24;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.25);
}

.mode-badge-new {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

/* ── Arcade Wrapper ───────────────────────────────────── */
.spk-arcade-wrapper {
  background: #090d16;
  border-radius: 20px;
  padding: 16px;
  color: #ffffff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

/* Arcade Header & HUD */
.arcade-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.arcade-speed-gauge {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
}

.arcade-score-display {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
}

/* Target Badges HUD */
.arcade-hud-chips-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.arcade-hud-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.arcade-hud-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
}

.arcade-hud-chip.chip-active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Nitro Bar */
.arcade-nitro-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.arcade-nitro-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width 0.15s ease-out;
}

/* Canvas Container */
.arcade-canvas-box {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: #090d16;
}

#spkArcadeCanvas {
  width: 100%;
  height: 420px;
  display: block;
}

/* Mobile Controls D-Pad */
.arcade-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 10px;
}

.btn-arcade-ctrl {
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.btn-arcade-ctrl:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0.95);
}

.btn-arcade-steer {
  flex: 1;
  font-size: 20px;
}

.btn-arcade-nitro {
  flex: 1.5;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  font-size: 13px;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

/* Pop Floating Text */
.arcade-pop-text {
  position: absolute;
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
  animation: popFloat 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  z-index: 10;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

@keyframes popFloat {
  0% { transform: translateY(0) scale(0.8); opacity: 1; }
  50% { transform: translateY(-25px) scale(1.1); }
  100% { transform: translateY(-50px) scale(1); opacity: 0; }
}

/* Modal Overlay: Pitstop & Bonnet Signature */
.arcade-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.3s ease-out forwards;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.arcade-modal-box {
  background: #1e293b;
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}

.arcade-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #fbbf24;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.arcade-modal-sub {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.arcade-input {
  width: 100%;
  height: 46px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  color: #ffffff;
  outline: none;
  margin-bottom: 12px;
}

.arcade-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.btn-arcade-submit {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

/* Bonnet Canvas */
.arcade-hood-box {
  background: #0f172a;
  border: 2px dashed rgba(251, 191, 36, 0.4);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 12px;
}

#hoodSignatureCanvas {
  width: 100%;
  height: 170px;
  display: block;
  border-radius: 8px;
  touch-action: none;
  cursor: crosshair;
}
