/* Custom arcade retro-future styling for Star Racers */
:root {
  --font-display: 'Chakra Petch', sans-serif;
  --font-ui: 'Rajdhani', sans-serif;
  --color-asphalt: #070b14;
}

body {
  font-family: var(--font-display);
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  background-color: var(--color-asphalt);
}

/* Garage Deep Asphalt Field with subtle perspective highway cues */
#modal-garage {
  background-color: #070b14;
  background-image: 
    radial-gradient(ellipse 900px 380px at 50% 0%, rgba(6, 182, 212, 0.16), transparent 75%),
    linear-gradient(to bottom, rgba(7, 11, 20, 0.5) 0%, rgba(7, 11, 20, 0.98) 100%),
    repeating-linear-gradient(0deg, rgba(34, 211, 238, 0.02) 0px, rgba(34, 211, 238, 0.02) 1px, transparent 1px, transparent 40px);
}

.garage-perspective-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.35;
  background-image: 
    linear-gradient(90deg, transparent 0%, transparent 14%, rgba(6, 182, 212, 0.15) 14%, rgba(6, 182, 212, 0.15) 15%, transparent 15%, transparent 34%, rgba(217, 70, 239, 0.12) 34%, rgba(217, 70, 239, 0.12) 35%, transparent 35%, transparent 65%, rgba(217, 70, 239, 0.12) 65%, rgba(217, 70, 239, 0.12) 66%, transparent 66%, transparent 85%, rgba(6, 182, 212, 0.15) 85%, rgba(6, 182, 212, 0.15) 86%, transparent 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.05) 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.05) 85%);
}

/* Arcade Touch Buttons */
.arcade-touch-btn {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, background-color 0.08s ease, border-color 0.08s ease;
}

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

.weapon-action-btn {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.weapon-action-btn:disabled {
  opacity: 0.35;
  filter: grayscale(0.8);
  pointer-events: none;
}

/* Animations */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spinSlow 8s linear infinite;
}

/* Custom scrollbars for garage modals */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.4);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.8);
}

/* Outlined muted-gold buttons with real interactive pressed state */
.btn-muted-gold-outline {
  border: 2px solid rgba(245, 158, 11, 0.55);
  background: rgba(120, 53, 15, 0.18);
  color: #fde68a;
  transition: all 0.12s ease;
  box-shadow: inset 0 1px 0 rgba(254, 240, 138, 0.15), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.btn-muted-gold-outline:hover {
  border-color: rgba(251, 191, 36, 0.85);
  background: rgba(180, 83, 9, 0.28);
  color: #fef08a;
}

.btn-muted-gold-outline:active {
  transform: scale(0.96);
  border-color: rgba(245, 158, 11, 0.95);
  background: rgba(217, 119, 6, 0.4);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Consistent soft shadows & 16px radius for showroom & shop cards */
.garage-showcase-card {
  border-radius: 16px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.65), 0 2px 6px -1px rgba(0, 0, 0, 0.4);
}

/* Online multiplayer lobby enhancements */
.online-pulse-radar {
  animation: radarPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPing {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Opponent floating nameplate in Phaser canvas */
.multiplayer-nametag {
  background: rgba(8, 51, 68, 0.85);
  border: 1px solid #22d3ee;
  color: #a5f3fc;
  font-family: var(--font-display);
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.car-card-active {
  border-color: #22d3ee !important;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35), 0 8px 28px -4px rgba(0, 0, 0, 0.7) !important;
}
/* Keep Start in view on phones while the car list scrolls behind it. */
#modal-garage footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding-bottom: 12px;
  background: linear-gradient(to top, #070b14 80%, rgba(7, 11, 20, 0));
}
