/* GTA Desert Open World Stylesheet */
html, body {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  background-color: #0c0a09;
}

::-webkit-scrollbar {
  display: none;
}

/* Speedometer & UI Transitions */
#speed-circle {
  transition: stroke-dashoffset 0.08s ease-out;
}

/* Touch Control Feedback & Sizing */
.touch-control {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  flex-shrink: 0;
}

.touch-control:active {
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Ensure controls dock never exceeds viewport */
#controls-dock {
  max-width: 100vw;
  box-sizing: border-box;
}

#gta-radar-panel {
  pointer-events: none;
}

#gta-radar-panel > * {
  pointer-events: auto;
}

/* Pop Animation for Drifting & Alerts */
@keyframes pop-bounce {
  0% { transform: translate(-50%, -50%) scale(0.4) rotate(-8deg); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.15) rotate(3deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); opacity: 1; }
}

.animate-pop {
  animation: pop-bounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* GTA Wanted Star Flash Animation */
@keyframes star-flash {
  0%, 100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 4px #ef4444); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.star-active {
  color: #ef4444 !important;
  animation: star-flash 0.6s infinite ease-in-out;
}

/* HUD Button Styling */
.hud-btn {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#btn-taftafah {
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-taftafah:active {
  box-shadow: 0 0 24px rgba(249, 115, 22, 0.9), inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* 3D Canvas Fill */
#game-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Radar Border Glass */
#radar-canvas {
  filter: contrast(1.1);
}

/* Cassette Deck & Rotating Reels Animation */
@keyframes spin-tape {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.tape-spinning {
  animation: spin-tape 2.2s linear infinite;
}

.tape-spinning-reverse {
  animation: spin-tape 2.2s linear infinite reverse;
}

/* Retro Cassette VU Meter Animation */
@keyframes vu-bar-1 { 0%, 100% { height: 25%; } 50% { height: 90%; } }
@keyframes vu-bar-2 { 0%, 100% { height: 40%; } 50% { height: 100%; } }
@keyframes vu-bar-3 { 0%, 100% { height: 20%; } 50% { height: 75%; } }
@keyframes vu-bar-4 { 0%, 100% { height: 50%; } 50% { height: 95%; } }

.vu-1 { animation: vu-bar-1 0.4s ease-in-out infinite; }
.vu-2 { animation: vu-bar-2 0.35s ease-in-out infinite; }
.vu-3 { animation: vu-bar-3 0.45s ease-in-out infinite; }
.vu-4 { animation: vu-bar-4 0.3s ease-in-out infinite; }

/* Cassette Body Texture */
.cassette-shell {
  background: radial-gradient(circle at 50% 20%, #292524 0%, #1c1917 100%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.8);
}