/* Base Styles & Mobile Enhancements */
* {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  touch-action: manipulation;
  overflow: hidden;
  background-color: #0d0f12;
}

/* Custom HUD Action Button */
.hud-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(20, 22, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hud-btn:active {
  transform: scale(0.92);
  background: rgba(30, 34, 44, 0.9);
  border-color: rgba(245, 158, 11, 0.4);
}

/* Touch Control Steering & Action Buttons */
.control-touch-btn {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border-width: 2px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.08s ease, background-color 0.08s ease;
}

@media (min-width: 640px) {
  .control-touch-btn {
    width: 76px;
    height: 76px;
  }
}

/* Pedals (Gas / Brake) */
.pedal-btn {
  width: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  border-width: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: transform 0.08s ease;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .pedal-btn {
    width: 72px;
  }
}

/* Subtle glow pulse for multipliers */
@keyframes glow-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.9));
  }
}

.active-multiplier {
  animation: glow-pulse 1.2s infinite;
}

/* Quick Radio Voice Shouts */
.radio-shout-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f3f4f6;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.radio-shout-btn:active {
  transform: scale(0.92);
  background: rgba(16, 185, 129, 0.3);
  border-color: rgba(16, 185, 129, 0.6);
  color: #6ee7b7;
}

/* Multiplayer Server Card */
.server-card {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}

.server-card:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.4);
}

.server-card.active {
  background: rgba(16, 185, 129, 0.16);
  border-color: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

/* Garage Tab and Items Styling */
.garage-tab-btn {
  padding: 8px 14px;
  border-radius: 12px;
  color: #9ca3af;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.garage-tab-btn.active {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.car-card {
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.car-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.06);
}

.car-card.active,
.tint-btn.active,
.rim-style-btn.active,
.stance-btn.active,
.smoke-btn.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.28);
  transform: translateY(-1px);
}

.color-btn,
.rim-color-btn {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.1s ease, border-color 0.1s ease;
}

.color-btn.active,
.rim-color-btn.active {
  border-color: #f59e0b;
  transform: scale(1.06);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6);
}

/* Custom Scrollbar for Garage */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.4);
  border-radius: 4px;
}

/* Fuel Gauge Flashing Animation */
@keyframes fuel-alert {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.15); }
}

.fuel-critical {
  animation: fuel-alert 0.8s infinite;
}