:root {
  --neon-primary: #00f0ff;
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff007f;
  --neon-purple: #9d00ff;
  --neon-green: #39ff14;
  --neon-yellow: #ffea00;
  
  --bg-deep: #030108;
  --bg-card: rgba(8, 5, 20, 0.92);
  --border-subtle: rgba(0, 240, 255, 0.15);
  --border-highlight: var(--neon-primary);
  
  --text-pure: #ffffff;
  --text-dim: #8b92b0;
  
  --font-display: 'Orbitron', -apple-system, sans-serif;
  --font-body: 'Rajdhani', -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-pure);
  font-family: var(--font-body);
}

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

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #03010a;
  outline: none;
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none;
}

#tap-interaction-plane {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
  pointer-events: none;
  background: transparent;
}

/* =========================================
   GLANCEABLE IN-GAME HUD
   ========================================= */
.hud-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 32px;
  transition: opacity 0.2s ease;
}

.hud-layer * {
  pointer-events: none;
}

.hud-layer.hidden {
  opacity: 0;
  pointer-events: none !important;
}

.hud-top-bar {
  position: relative;
  z-index: 20;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.hud-action-btns,
.hud-icon-btn {
  position: relative;
  z-index: 21;
  pointer-events: auto;
}

.hud-stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-stat-box.right {
  align-items: flex-end;
  gap: 8px;
}

.hud-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.hud-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
}

.hud-best-row, .hud-energy-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-value-small {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.energy-icon {
  color: var(--neon-cyan);
  font-size: 0.85rem;
}

.hud-action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-icon-btn {
  background: rgba(12, 16, 32, 0.85);
  border: 1px solid var(--neon-cyan);
  color: #ffffff;
  padding: 6px 12px;
  min-width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-family: var(--font-display);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
  transition: all 0.15s ease;
}

.hud-icon-btn.cam-btn {
  border-color: #ff007f;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.35);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  gap: 5px;
}

.hud-icon-btn.cam-btn:hover {
  border-color: #ffffff;
  background: rgba(255, 0, 127, 0.3);
  transform: scale(1.05);
}

.hud-icon-btn:hover {
  border-color: #fff;
  background: rgba(0, 240, 255, 0.25);
  transform: scale(1.08);
}

.hud-dist-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: -2px;
}

.hud-sub-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.hud-dist-val {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

/* Center Combo Badge & Power-Up Indicators */
.hud-center-zone {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.hud-powerups-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-powerup-badge {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid #fff;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hud-powerup-badge.shield {
  color: #00f0ff;
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
  animation: pulseShield 1.2s infinite alternate;
}

.hud-powerup-badge.magnet {
  color: #ffea00;
  border-color: #ffea00;
  box-shadow: 0 0 12px rgba(255, 234, 0, 0.6);
}

.hud-powerup-badge.boost {
  color: #ff7700;
  border-color: #ff7700;
  box-shadow: 0 0 15px rgba(255, 119, 0, 0.8);
  animation: pulseBoost 0.4s infinite alternate;
}

@keyframes pulseShield {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.08); box-shadow: 0 0 18px rgba(0, 240, 255, 0.9); }
}

@keyframes pulseBoost {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.12); box-shadow: 0 0 22px rgba(255, 119, 0, 1.0); }
}

.hud-powerup-badge.hidden {
  display: none !important;
}

.hud-floating-score {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--neon-primary);
  text-shadow: 0 0 12px rgba(255, 234, 0, 0.8);
  opacity: 0;
  transform: translateY(10px) scale(0.8);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hud-floating-score.show {
  opacity: 1;
  transform: translateY(0px) scale(1.15);
}

.hud-floating-score.perfect {
  color: var(--neon-cyan);
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.9);
}

.hud-floating-score.nearmiss {
  color: #ff0055;
  text-shadow: 0 0 14px rgba(255, 0, 85, 0.9);
}

.hud-combo-badge {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--neon-primary);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--neon-primary);
  padding: 4px 16px;
  border-radius: 20px;
  box-shadow: 0 0 14px rgba(255, 234, 0, 0.3);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
}

.hud-combo-badge.hidden {
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
}

.hud-combo-badge.pulse {
  transform: scale(1.25);
  color: #fff;
  border-color: #fff;
}

/* Contextual Banners (PERFECT / NEAR MISS / BOOST / SHIELD / CAM) */
.contextual-alerts-container {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.contextual-banner {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 3px;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contextual-banner.perfect {
  color: var(--neon-cyan);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.8);
}

.contextual-banner.nearmiss {
  color: var(--neon-primary);
  text-shadow: 0 0 18px rgba(255, 234, 0, 0.8);
}

.contextual-banner.boost {
  color: #ff7700;
  text-shadow: 0 0 20px rgba(255, 119, 0, 0.9);
}

.contextual-banner.shield {
  color: #00f0ff;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.9);
}

.contextual-banner.cam {
  color: #ff007f;
  text-shadow: 0 0 18px rgba(255, 0, 127, 0.8);
}

.contextual-banner.show {
  opacity: 1;
  transform: scale(1.08);
}

/* Flow Meter (Lower Edge Bar) */
.flow-meter-container {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flow-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.flow-pct {
  color: var(--neon-primary);
}

.flow-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.flow-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f0ff 0%, #00f0ff 40%, #ff007f 75%, #ff007f 100%);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.8), 0 0 16px rgba(255, 0, 127, 0.8);
  border-radius: 3px;
  transition: width 0.15s ease-out;
}

/* Tutorial Hint */
.tutorial-tip {
  position: absolute;
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.tutorial-tip.hidden {
  opacity: 0;
}

.key-indicator {
  color: var(--neon-primary);
  border-bottom: 1px solid var(--neon-primary);
  padding-bottom: 1px;
}

/* Countdown */
.countdown-overlay {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 15;
}

.countdown-overlay.hidden {
  display: none;
}

.countdown-text {
  font-family: var(--font-display);
  font-size: 5.5rem;
  font-weight: 900;
  color: var(--neon-primary);
  text-shadow: 0 0 35px rgba(255, 234, 0, 0.85);
  animation: cdScale 0.75s ease forwards;
}

@keyframes cdScale {
  0% { transform: scale(0.4); opacity: 0; }
  35% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1.0); opacity: 0.9; }
}

/* =========================================
   CLEAN MINIMALIST MENUS
   ========================================= */
.menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#main-menu.menu-overlay {
  background: radial-gradient(circle at center, rgba(3, 2, 12, 0.35) 0%, rgba(3, 2, 12, 0.65) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.menu-overlay.hidden {
  opacity: 0;
  pointer-events: none !important;
  transform: scale(0.98);
}

.menu-card {
  background: rgba(8, 11, 24, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 16px;
  padding: 36px 40px;
  max-width: 440px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 240, 255, 0.15);
}

.menu-card.compact {
  max-width: 360px;
}

.brand-header {
  text-align: center;
}

.game-logo {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--neon-cyan);
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.7), 0 0 50px rgba(255, 0, 127, 0.4);
  line-height: 1;
}

.game-tagline {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text-dim);
  margin-top: 6px;
}

.menu-stats-strip {
  display: flex;
  gap: 10px;
  width: 100%;
}

.stat-cell {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cell-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.cell-val {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.neon-accent {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.cyan-accent {
  color: var(--neon-cyan);
}

.menu-nav-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary-action {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, #0099ff 100%);
  color: #030814;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 3px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.4);
  transition: all 0.15s ease;
}

.btn-primary-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-primary-action:active {
  transform: translateY(1px);
}

.menu-sub-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.btn-sub-nav {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sub-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.input-hint-legend {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-align: center;
}

.kbd-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
}

/* Results Menu */
.results-header {
  text-align: center;
}

.results-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--neon-primary);
}

.badge-new-record {
  background: var(--neon-primary);
  color: #000;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 12px;
  margin-top: 4px;
  display: inline-block;
}

.badge-new-record.hidden {
  display: none;
}

.results-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.res-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.res-stat-card.primary {
  grid-column: span 2;
  background: rgba(255, 234, 0, 0.06);
  border-color: rgba(255, 234, 0, 0.3);
}

.res-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.res-num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
}

.modal-card-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
}

/* =========================================
   MODAL DIALOGS (GARAGE, CHALLENGES, STATS, SETTINGS)
   ========================================= */
.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 580px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}

.modal-dialog.compact {
  max-width: 420px;
}

.modal-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.dialog-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
}

.dialog-currency-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 4px 12px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--neon-cyan);
}

.btn-close-dialog {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

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

.modal-dialog.garage-dialog {
  max-width: 860px;
  width: 95%;
  max-height: 90vh;
  padding: 24px 28px;
  gap: 14px;
}

.garage-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.garage-header-subtitle {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.garage-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* =========================================
   GRAND LIVE SHOWCASE STAGE (CINEMATIC VIEW)
   ========================================= */
.garage-showcase-stage {
  position: relative;
  width: 100%;
  height: 250px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 240, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #03040a;
}

.showcase-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 75% 25%, rgba(157, 0, 255, 0.45) 0%, transparent 55%),
    radial-gradient(circle at 20% 70%, rgba(0, 240, 255, 0.35) 0%, transparent 50%),
    linear-gradient(180deg, #020108 0%, #08031e 50%, #160630 100%);
  transition: background 0.4s ease;
}

.showcase-stars-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 40px 50px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 120px 180px, #00f0ff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 220px 80px, #ff007f, rgba(0,0,0,0)),
    radial-gradient(2.5px 2.5px at 340px 200px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 480px 60px, #00f0ff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 620px 160px, #ffea00, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 740px 100px, #9d00ff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 800px 300px;
  animation: starsDrift 60s linear infinite;
  opacity: 0.85;
}

@keyframes starsDrift {
  0% { background-position: 0 0; }
  100% { background-position: 800px 0; }
}

.showcase-nebula-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.18) 0%, rgba(157, 0, 255, 0.12) 45%, transparent 75%);
  filter: blur(20px);
  pointer-events: none;
}

.showcase-skyline {
  position: absolute;
  bottom: 42px;
  left: 0;
  width: 100%;
  height: 50px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0px,
    rgba(255, 255, 255, 0.08) 20px,
    transparent 20px,
    transparent 36px
  );
  mask-image: linear-gradient(to top, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 40%, transparent 100%);
  opacity: 0.6;
}

.showcase-road {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) perspective(300px) rotateX(40deg);
  width: 440px;
  height: 90px;
  background: linear-gradient(180deg, #050714 0%, #0d122b 100%);
  border-left: 4px solid var(--neon-primary);
  border-right: 4px solid var(--neon-primary);
  box-shadow: 0 0 30px var(--neon-primary), inset 0 0 20px rgba(0, 240, 255, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
}

.showcase-road-dashes {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: repeating-linear-gradient(
    180deg,
    #ffffff 0px,
    #ffffff 22px,
    transparent 22px,
    transparent 44px
  );
  animation: roadDashMove 0.75s linear infinite;
}

@keyframes roadDashMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 44px; }
}

.showcase-core-rig {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin-bottom: 24px;
  animation: orbBob 3.5s ease-in-out infinite alternate;
}

@keyframes orbBob {
  0% { transform: translateY(-8px); }
  100% { transform: translateY(6px); }
}

.showcase-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #0a1128 75%);
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 35px var(--neon-cyan), inset 0 0 16px #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.showcase-orb-inner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
  transition: all 0.3s ease;
}

.showcase-orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 2.5px solid var(--neon-cyan);
  pointer-events: none;
  display: none;
}

.showcase-orb-ring.ring-1 {
  width: 114px;
  height: 114px;
  transform: rotateX(68deg) rotateY(25deg);
  animation: gyroSpin1 4s linear infinite;
}

.showcase-orb-ring.ring-2 {
  width: 124px;
  height: 124px;
  transform: rotateX(25deg) rotateY(68deg);
  animation: gyroSpin2 5s linear infinite reverse;
}

@keyframes gyroSpin1 {
  0% { transform: rotateX(68deg) rotateZ(0deg); }
  100% { transform: rotateX(68deg) rotateZ(360deg); }
}

@keyframes gyroSpin2 {
  0% { transform: rotateX(25deg) rotateZ(0deg); }
  100% { transform: rotateX(25deg) rotateZ(360deg); }
}

.showcase-glyph-hologram {
  position: absolute;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 16px var(--neon-cyan);
  display: none;
  animation: glyphSpin 4s linear infinite;
}

@keyframes glyphSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}

.showcase-lasers-rig {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 16px;
}

.laser-ray {
  width: 3px;
  height: 38px;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  border-radius: 2px;
  animation: laserPulse 1.2s ease-in-out infinite alternate;
}

@keyframes laserPulse {
  0% { opacity: 0.5; height: 30px; }
  100% { opacity: 1; height: 44px; }
}

.showcase-trail-anim {
  position: absolute;
  right: 50%;
  width: 220px;
  height: 16px;
  transform: translateX(-35px);
  pointer-events: none;
  z-index: 1;
}

.showcase-info-tag {
  position: absolute;
  bottom: 14px;
  left: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(4, 7, 20, 0.82);
  backdrop-filter: blur(10px);
  padding: 6px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

.showcase-info-pill {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
}

.showcase-cat {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
}

.showcase-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff;
}

/* Garage Tab Grid Cards */
.garage-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.g-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.g-tab-btn.active {
  color: var(--neon-primary);
  background: rgba(255, 234, 0, 0.12);
}

.garage-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 4px 2px 14px 2px;
  max-height: 38vh;
}

.g-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.g-item-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--neon-primary);
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 1px 5px;
  border-radius: 4px;
}

.g-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.g-card.equipped {
  border-color: var(--neon-primary);
  background: rgba(255, 234, 0, 0.08);
  box-shadow: inset 0 0 12px rgba(255, 234, 0, 0.15);
}

.g-preview-orb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.g-preview-orb::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.4);
  animation: orbDashSpin 6s linear infinite;
}

@keyframes orbDashSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.g-card-name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.g-card-desc {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text-dim);
  line-height: 1.25;
  height: 28px;
  overflow: hidden;
}

/* =========================================
   RICH ANIMATED TRAIL PREVIEWS
   ========================================= */
.g-preview-trail-box {
  width: 100%;
  height: 52px;
  border-radius: 8px;
  background: #070914;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Trail Animation 1: Stardust */
.trail-anim-stardust {
  width: 100%;
  height: 100%;
  position: relative;
}
.trail-anim-stardust::before, .trail-anim-stardust::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--trail-color, #ffea00);
  box-shadow: 0 0 10px var(--trail-color, #ffea00);
  animation: stardustFlow 1.4s ease-in-out infinite alternate;
}
.trail-anim-stardust::after {
  left: 60%;
  width: 6px;
  height: 6px;
  opacity: 0.6;
  animation-delay: 0.3s;
}
.trail-anim-stardust::before {
  left: 30%;
}
@keyframes stardustFlow {
  0% { transform: translateY(-50%) scale(0.7); opacity: 0.4; }
  100% { transform: translateY(-50%) scale(1.2); opacity: 1; }
}

/* Trail Animation 2: Sparks */
.trail-anim-sparks {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--trail-color, #ffea00) 10%, transparent 60%);
  animation: sparkFlicker 0.25s infinite alternate;
}
@keyframes sparkFlicker {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 8px var(--trail-color, #ffea00)); }
}

/* Trail Animation 3: Glitch */
.trail-anim-glitch {
  width: 24px;
  height: 24px;
  border: 2px solid var(--trail-color, #00f0ff);
  background: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 8px var(--trail-color, #00f0ff);
  animation: glitchBox 0.8s steps(4) infinite;
}
@keyframes glitchBox {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-3px, 2px) scale(1.1); }
  50% { transform: translate(3px, -2px) scale(0.9); }
  75% { transform: translate(-2px, -2px) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Trail Animation 4: Laser */
.trail-anim-laser {
  width: 80%;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 12px var(--trail-color, #ff0055), 0 0 4px #fff;
  animation: laserPulse 1s infinite alternate;
}
@keyframes laserPulse {
  0% { opacity: 0.7; transform: scaleX(0.85); }
  100% { opacity: 1; transform: scaleX(1.1); }
}

/* Trail Animation 5: Rings */
.trail-anim-rings {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--trail-color, #9d00ff);
  box-shadow: 0 0 10px var(--trail-color, #9d00ff);
  animation: ringExpand 1.2s ease-out infinite;
}
@keyframes ringExpand {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Trail Animation 6: Prism */
.trail-anim-prism {
  width: 75%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ff0055, #ffea00, #00f0ff, #9d00ff);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
  animation: prismWave 2s linear infinite;
  background-size: 200% 100%;
}
@keyframes prismWave {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* =========================================
   RICH THEME LANDSCAPE CARDS
   ========================================= */
.g-preview-theme-card {
  width: 100%;
  height: 60px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.theme-card-skyline {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  height: 22px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.12) 0px,
    rgba(255, 255, 255, 0.12) 12px,
    transparent 12px,
    transparent 20px
  );
  mask-image: linear-gradient(to top, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 60%, transparent 100%);
}

.theme-card-road {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 14px;
  background: #080910;
  border-left: 2px solid;
  border-right: 2px solid;
}

.theme-card-chip {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.g-action-btn {
  width: 100%;
  padding: 7px 0;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.g-action-btn.equipped {
  background: var(--neon-primary);
  color: #000;
  cursor: default;
  font-weight: 900;
}

.g-action-btn.owned {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.g-action-btn.owned:hover {
  background: var(--neon-primary);
  color: #000;
  font-weight: 900;
}

.g-action-btn.buy {
  background: var(--neon-cyan);
  color: #000;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.g-action-btn.locked {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  cursor: not-allowed;
}

/* Challenges Scroll List */
.challenges-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 50vh;
}

.ch-item-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ch-item-row.completed {
  border-color: rgba(57, 255, 20, 0.35);
  background: rgba(57, 255, 20, 0.04);
}

.ch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ch-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.ch-detail {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.ch-bounty {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Stats Table */
.stats-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.stat-row-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 600;
}

.stat-row-val {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

/* =========================================
   PAUSE MODAL & SUB ACTION BUTTONS
   ========================================= */
.menu-card.pause-card {
  max-width: 440px;
  width: 90%;
  padding: 32px 28px;
  background: rgba(8, 12, 28, 0.94);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 240, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pause-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pause-icon {
  font-size: 1.4rem;
}

.pause-run-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.pause-stat-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.chip-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.chip-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
}

.pause-actions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-resume-glow {
  padding: 16px 20px;
  font-size: 1.15rem;
  box-shadow: 0 6px 25px rgba(0, 240, 255, 0.5);
}

.pause-secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.btn-sub-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 12px 6px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-sub-action:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.btn-sub-action.danger {
  border-color: rgba(255, 23, 68, 0.35);
  color: #ff5252;
}

.btn-sub-action.danger:hover {
  background: rgba(255, 23, 68, 0.18);
  border-color: #ff1744;
  color: #ffffff;
}

.results-actions-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  width: 100%;
}

/* =========================================
   SETTINGS DIALOG & CONTROLS
   ========================================= */
.settings-dialog {
  max-width: 480px;
}

.settings-scroll-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.settings-group-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--neon-cyan);
  margin-top: 6px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 4px;
}

.settings-group-label.danger-label {
  color: #ff5252;
  border-bottom-color: rgba(255, 23, 68, 0.3);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  gap: 12px;
}

.setting-item.danger-item {
  background: rgba(255, 23, 68, 0.04);
  border-color: rgba(255, 23, 68, 0.25);
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
}

.setting-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.btn-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-toggle:hover {
  border-color: var(--neon-cyan);
  color: #fff;
}

.btn-toggle.active {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.btn-danger-action {
  background: rgba(255, 23, 68, 0.18);
  border: 1px solid #ff1744;
  color: #ff5252;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-danger-action:hover {
  background: #ff1744;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 23, 68, 0.5);
  transform: translateY(-1px);
}

/* =========================================
   CONFIRM RESET MODAL
   ========================================= */
.confirm-card {
  max-width: 380px;
  padding: 28px 24px;
  background: rgba(14, 6, 16, 0.96);
  border: 1px solid rgba(255, 23, 68, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 23, 68, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.confirm-icon {
  font-size: 2.2rem;
}

.danger-text {
  color: #ff1744;
  font-size: 1.15rem;
}

.confirm-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.confirm-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.contextual-banner.danger {
  border-color: #ff1744;
  color: #ff5252;
  box-shadow: 0 0 24px rgba(255, 23, 68, 0.5);
}

@media (max-width: 480px) {
  .game-logo {
    font-size: 2.6rem;
  }
  .hud-value {
    font-size: 1.5rem;
  }
  .menu-card {
    padding: 24px 20px;
  }
  .pause-secondary-grid {
    grid-template-columns: 1fr;
  }
  .garage-items-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
