/* =========================================================
   PARKING MASTER — ENHANCED EDITION
   Gameplay In-Game HUD & Cockpit Styles
   ========================================================= */

.game-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  pointer-events: none;
}

.game-hud > * {
  pointer-events: auto;
}

/* =========================================================
   Top Left: Level Badge & Vehicle Damage Wireframe
   ========================================================= */
.hud-top-left {
  position: absolute;
  top: 12px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 36;
}

.screen-fx {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 25;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.damage-flash {
  box-shadow: inset 0 0 120px rgba(255, 56, 56, 0.75);
  background: radial-gradient(circle, transparent 60%, rgba(255, 56, 56, 0.35) 100%);
}

.damage-flash.active {
  opacity: 1;
}

.speed-vignette {
  background: radial-gradient(circle, transparent 50%, rgba(0, 210, 211, 0.18) 85%, rgba(10, 15, 25, 0.6) 100%);
}

.hud-combo-badge {
  background: linear-gradient(135deg, #ff4757, #ffa502);
  color: #fff;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 16px;
  box-shadow: 0 0 12px rgba(255, 107, 129, 0.6);
  width: fit-content;
  animation: pulse-combo 1.2s infinite alternate ease-in-out;
}

@keyframes pulse-combo {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 107, 129, 0.5); }
  100% { transform: scale(1.08); box-shadow: 0 0 20px rgba(255, 165, 2, 0.85); }
}

.hud-level-badge {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 5px 12px;
  border-radius: 6px;
  box-shadow: var(--box-shadow-card);
  width: fit-content;
}

.hud-damage-container {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 140px;
}

.car-wireframe-icon {
  font-size: 20px;
}

.damage-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.damage-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.damage-percent {
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.damage-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 3px;
}

.damage-bar-fill {
  height: 100%;
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
  transition: width 0.3s ease;
}

/* =========================================================
   Top Center: Timer & Target
   ========================================================= */
.hud-top-center {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 36;
}

.hud-timer-badge {
  background: rgba(12, 17, 28, 0.85);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--box-shadow-card);
}

.timer-icon {
  font-size: 12px;
}

.timer-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.timer-value {
  font-family: var(--font-tech);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1.5px;
}

.hud-target-time {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.8px;
}

/* =========================================================
   Top Right: Radio, Action Chips, Coins & Pause
   ========================================================= */
.hud-top-right {
  position: absolute;
  top: 10px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 36;
}

.hud-radio-chip {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.hud-radio-chip:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}
.radio-icon { font-size: 13px; }
.radio-info { display: flex; flex-direction: column; }
.radio-station-title {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.radio-status {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
}

/* Radio Equalizer Audio Spectrum Bars */
.radio-eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  padding-left: 2px;
}
.eq-bar {
  width: 2.5px;
  height: 4px;
  background: var(--accent-cyan);
  border-radius: 1px;
  transition: height 0.08s ease-out;
  box-shadow: 0 0 4px var(--accent-cyan);
}
.eq-bar:nth-child(1) { animation: eq-pulse 0.4s infinite alternate ease-in-out; }
.eq-bar:nth-child(2) { animation: eq-pulse 0.55s infinite alternate ease-in-out 0.1s; }
.eq-bar:nth-child(3) { animation: eq-pulse 0.48s infinite alternate ease-in-out 0.2s; }
.eq-bar:nth-child(4) { animation: eq-pulse 0.62s infinite alternate ease-in-out 0.05s; }

@keyframes eq-pulse {
  0% { height: 3px; }
  100% { height: 13px; }
}

/* Floating Drift & Style Multiplier Popup */
.hud-drift-popup {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%) scale(1);
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.95), rgba(255, 165, 2, 0.95));
  border: 1.5px solid #fff;
  border-radius: 24px;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 25px rgba(255, 165, 2, 0.8), 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 50;
  pointer-events: none;
  animation: pop-bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hud-drift-popup.hidden {
  display: none;
}

@keyframes pop-bounce {
  0% { transform: translateX(-50%) scale(0.6); opacity: 0; }
  70% { transform: translateX(-50%) scale(1.1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.drift-fire-icon { font-size: 16px; animation: flame-wobble 0.3s infinite alternate; }
.drift-score-title {
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
}
.drift-score-val {
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 900;
  color: #ffd32a;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.hud-action-chip {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.hud-action-chip:hover {
  background: var(--primary-gold);
  color: #000;
  border-color: var(--primary-gold);
}

.hud-pause-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.hud-pause-btn:hover {
  background: var(--primary-gold);
  color: #000;
  border-color: var(--primary-gold);
}

/* =========================================================
   Center Parking Alignment Guidance Banner & Radial Dwell Meter
   ========================================================= */
.hud-parking-guide {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 17, 28, 0.92);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border-neon);
  border-radius: 14px;
  padding: 6px 14px;
  max-width: 340px;
  box-shadow: 0 0 20px rgba(46, 213, 115, 0.25);
  transition: all 0.3s ease;
  pointer-events: auto;
  z-index: 34;
}

.hud-parking-guide.inside {
  border-color: var(--accent-neon-green);
  box-shadow: 0 0 35px rgba(46, 213, 115, 0.55);
}

.hud-parking-guide.holding {
  border-color: #ffd32a;
  box-shadow: 0 0 45px rgba(255, 211, 42, 0.7);
  animation: pulse-holding 0.8s infinite alternate ease-in-out;
}

@keyframes pulse-holding {
  0% { transform: translateX(-50%) scale(1); }
  100% { transform: translateX(-50%) scale(1.04); }
}

.guide-top-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Radial SVG Dwell Meter */
.radial-dwell-box {
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dwell-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.dwell-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 5;
}

.dwell-circle {
  fill: none;
  stroke: var(--accent-neon-green);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 163.36; /* 2 * PI * 26 */
  stroke-dashoffset: 163.36; /* 100% hidden initially */
  transition: stroke-dashoffset 0.1s linear, stroke 0.2s ease;
  filter: drop-shadow(0 0 6px var(--accent-neon-green));
}

.dwell-center-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.guide-icon {
  font-size: 16px;
  line-height: 1;
}

.dwell-timer-text {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-top: 2px;
}

.guide-info-block {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.guide-text {
  font-family: var(--font-tech);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
}

.guide-subtext {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-neon-green);
  margin-top: 2px;
}

.accuracy-indicator-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}

.acc-fill {
  height: 100%;
  background: var(--accent-neon-green);
  box-shadow: 0 0 6px var(--accent-neon-green);
  transition: width 0.2s ease;
}

/* 4-Wheel Corner Indicators */
.wheel-corner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.corner-dot {
  font-family: var(--font-tech);
  font-size: 8px;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(255, 56, 56, 0.3);
  color: #ff7675;
  text-align: center;
  transition: all 0.2s ease;
}

.corner-dot.inside {
  background: rgba(46, 213, 115, 0.4);
  color: #2ed573;
  box-shadow: 0 0 6px rgba(46, 213, 115, 0.6);
}

/* =========================================================
   Bottom Left: Speedometer, Tachometer & Steering Wheel
   ========================================================= */
.hud-bottom-left {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.hud-speedometer {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 16px;
  text-align: center;
  box-shadow: var(--box-shadow-card);
  min-width: 100px;
}

.tach-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.tach-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2ed573, #ffa502, #ff4757);
  transition: width 0.08s ease;
}

.speed-number {
  font-family: var(--font-tech);
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.speed-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.speed-unit {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--primary-gold);
}

.gear-badge {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
  color: var(--accent-cyan);
  background: rgba(0, 210, 211, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Electric Cyan Nitro NOS Bar */
.nitro-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 210, 211, 0.4);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
  position: relative;
}

.nitro-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d2d3, #0984e3);
  box-shadow: 0 0 8px rgba(0, 210, 211, 0.8);
  transition: width 0.05s linear;
}

.nitro-bar-fill.active {
  background: linear-gradient(90deg, #00ffff, #70a1ff);
  box-shadow: 0 0 14px #00ffff;
  animation: pulse-nitro 0.3s infinite alternate ease-in-out;
}

@keyframes pulse-nitro {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.5); }
}

.nitro-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-tech);
  font-size: 7px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  pointer-events: none;
}

/* PC Keyboard Controls Reference Strip */
.pc-controls-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 18, 28, 0.85);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: var(--box-shadow-card);
  pointer-events: none;
  user-select: none;
}

.pc-key-pill {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  color: #c8d6e5;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pc-key-pill kbd {
  background: #222f3e;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 2px solid var(--primary-gold);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   Radar Minimap in Bottom Right Corner (PC Layout)
   ========================================================= */
.hud-minimap-box {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 120px;
  height: 120px;
  background: rgba(10, 14, 22, 0.88);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border-subtle);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.minimap-label {
  position: absolute;
  top: 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  pointer-events: none;
}

/* =========================================================
   Digital Rearview Camera PIP & Ultrasonic Sonar Monitor
   ========================================================= */
.hud-rev-pip {
  position: absolute;
  top: 80px;
  right: 24px;
  width: 220px;
  background: rgba(10, 16, 26, 0.94);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--accent-cyan);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 18px rgba(0, 210, 211, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 45;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.hud-rev-pip.hidden {
  display: none;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}

.rev-pip-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0, 210, 211, 0.12);
  border-bottom: 1px solid rgba(0, 210, 211, 0.25);
}

.pip-rec-dot {
  width: 8px;
  height: 8px;
  background: #ff3838;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff3838;
  animation: blink-rec 1s infinite alternate;
}

@keyframes blink-rec {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

.pip-title {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff;
  flex: 1;
}

.pip-sensor-badge {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 900;
  color: #2ed573;
  background: rgba(46, 213, 115, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.pip-sensor-badge.warn {
  color: #ffa502;
  background: rgba(255, 165, 2, 0.2);
}

.pip-sensor-badge.danger {
  color: #ff3838;
  background: rgba(255, 56, 56, 0.25);
  animation: pulse-danger 0.4s infinite alternate;
}

@keyframes pulse-danger {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.rev-pip-canvas-wrap {
  position: relative;
  width: 220px;
  height: 125px;
  background: #000;
}

#rev-camera-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.rev-proximity-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.6);
}

.rev-proximity-fill {
  height: 100%;
  background: linear-gradient(90deg, #2ed573, #ffa502, #ff3838);
  box-shadow: 0 0 8px rgba(46, 213, 115, 0.8);
  transition: width 0.08s ease-out;
}

/* =========================================================
   360° Parktronic Directional Distance Radar Box
   ========================================================= */
.hud-parktronic-box {
  position: absolute;
  top: 80px;
  right: 24px;
  width: 210px;
  background: rgba(10, 16, 26, 0.94);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(0, 210, 211, 0.4);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 210, 211, 0.25);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 44;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.hud-parktronic-box.hidden {
  display: none;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
}

.parktronic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.parktronic-title {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff;
}

.parktronic-pill {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(46, 213, 115, 0.2);
  color: #2ed573;
}

.parktronic-pill.warn {
  background: rgba(255, 165, 2, 0.25);
  color: #ffa502;
}

.parktronic-pill.danger {
  background: rgba(255, 56, 56, 0.3);
  color: #ff3838;
  animation: blink-rec 0.4s infinite alternate;
}

.parktronic-car-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.parktronic-mid-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.parktronic-car-body {
  font-size: 26px;
  line-height: 1;
}

.sensor-arc {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.arc-front, .arc-rear {
  width: 90px;
  height: 18px;
}

.arc-front {
  border-radius: 12px 12px 4px 4px;
}

.arc-rear {
  border-radius: 4px 4px 12px 12px;
}

.arc-left, .arc-right {
  width: 28px;
  height: 38px;
}

.arc-left {
  border-radius: 10px 4px 4px 10px;
}

.arc-right {
  border-radius: 4px 10px 10px 4px;
}

.sensor-arc.clear {
  border-color: rgba(46, 213, 115, 0.6);
  background: rgba(46, 213, 115, 0.15);
  box-shadow: 0 0 8px rgba(46, 213, 115, 0.4);
}

.sensor-arc.warn {
  border-color: #ffa502;
  background: rgba(255, 165, 2, 0.3);
  box-shadow: 0 0 12px rgba(255, 165, 2, 0.6);
}

.sensor-arc.danger {
  border-color: #ff3838;
  background: rgba(255, 56, 56, 0.4);
  box-shadow: 0 0 16px rgba(255, 56, 56, 0.8);
  animation: pulse-danger 0.3s infinite alternate;
}

.arc-label {
  font-family: var(--font-tech);
  font-size: 8px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

/* =========================================================
   Mobile On-Screen Touch Driving Controls Overlay
   ========================================================= */
.mobile-controls-overlay {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  padding: 0 16px;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 40;
}

@media (max-width: 1024px), (pointer: coarse) {
  .mobile-controls-overlay {
    display: flex;
  }
  .pc-controls-strip {
    display: none;
  }
  /* Offset Speedometer above touch steer buttons so they NEVER overlap */
  .hud-bottom-left {
    bottom: 92px !important;
    left: 16px !important;
    gap: 8px;
  }
  /* Offset Minimap above touch pedals so they NEVER overlap */
  .hud-minimap-box {
    bottom: 96px !important;
    right: 16px !important;
    width: 105px !important;
    height: 105px !important;
  }
}

.mobile-left-group, .mobile-right-group {
  display: flex;
  gap: 10px;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.touch-steer-btn {
  width: 64px;
  height: 64px;
  background: rgba(18, 25, 38, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: transform 0.05s, background 0.05s;
}

.touch-steer-btn:active, .touch-steer-btn.pressed {
  background: rgba(0, 210, 211, 0.35);
  border-color: var(--accent-cyan);
  transform: scale(0.92);
}

.touch-pedal-btn {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: transform 0.05s, filter 0.05s;
}

.gas-pedal {
  background: linear-gradient(135deg, #2ed573, #10ac84);
  color: #000;
  border: 2px solid #2ed573;
}

.brake-pedal {
  background: linear-gradient(135deg, #ff4757, #ee5253);
  color: #fff;
  border: 2px solid #ff4757;
}

.touch-handbrake-btn {
  padding: 0 14px;
  height: 48px;
  background: rgba(255, 165, 2, 0.2);
  border: 1.5px solid #ffa502;
  border-radius: 8px;
  color: #ffa502;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.touch-nitro-btn {
  padding: 0 14px;
  height: 48px;
  background: rgba(0, 210, 211, 0.2);
  border: 1.5px solid #00d2d3;
  border-radius: 8px;
  color: #00d2d3;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.touch-pedal-btn:active, .touch-pedal-btn.pressed,
.touch-handbrake-btn:active, .touch-handbrake-btn.pressed,
.touch-nitro-btn:active, .touch-nitro-btn.pressed {
  transform: scale(0.92);
  filter: brightness(1.3);
}

/* =========================================================
   Ghost Delta Time Indicator Badge
   ========================================================= */
.hud-ghost-delta-pill {
  margin-top: 4px;
  background: rgba(14, 23, 38, 0.88);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(0, 210, 211, 0.4);
  border-radius: 14px;
  padding: 2px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(0, 210, 211, 0.25);
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  animation: ghost-glow 2s infinite alternate ease-in-out;
}

@keyframes ghost-glow {
  0% { border-color: rgba(0, 210, 211, 0.3); box-shadow: 0 0 6px rgba(0, 210, 211, 0.2); }
  100% { border-color: rgba(0, 210, 211, 0.8); box-shadow: 0 0 14px rgba(0, 210, 211, 0.5); }
}

.hud-ghost-delta-pill .ghost-icon {
  font-size: 12px;
}

.hud-ghost-delta-pill .ghost-label {
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.5px;
}

.hud-ghost-delta-pill .ghost-delta-val.ahead {
  color: #2ed573;
  text-shadow: 0 0 8px rgba(46, 213, 115, 0.6);
}

.hud-ghost-delta-pill .ghost-delta-val.behind {
  color: #ff4757;
  text-shadow: 0 0 8px rgba(255, 71, 87, 0.6);
}

/* =========================================================
   Luxury 360° Surround View Bird's Eye Monitor
   ========================================================= */
.hud-surround-box {
  position: absolute;
  top: 164px;
  right: 16px;
  width: 135px;
  background: rgba(10, 15, 24, 0.92);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid rgba(0, 210, 211, 0.35);
  border-radius: 12px;
  padding: 6px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 210, 211, 0.15);
  z-index: 34;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.surround-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.surround-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  animation: pulse-dot 1s infinite alternate;
}

.surround-title {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #cbd5e1;
}

.surround-distance {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
  color: #2ed573;
}

.surround-distance.warn {
  color: #ffa502;
}

.surround-distance.danger {
  color: #ff4757;
  animation: danger-flash 0.5s infinite alternate;
}

@keyframes danger-flash {
  0% { opacity: 0.6; }
  100% { opacity: 1; text-shadow: 0 0 8px #ff4757; }
}

.surround-canvas-wrap {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: radial-gradient(circle, #0f172a 0%, #060911 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.surround-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* =========================================================
   Interactive HUD Steering Wheel Container
   ========================================================= */
.hud-steering-wheel-container {
  position: absolute;
  bottom: 24px;
  left: 32px;
  width: 130px;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 38;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.wheel-angle-readout {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(10, 16, 26, 0.85);
  border: 1px solid rgba(0, 210, 211, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  box-shadow: 0 0 8px rgba(0, 210, 211, 0.2);
}

.virtual-steering-wheel {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, #1a2232 40%, #0d121c 100%);
  border: 7px solid #2b3548;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 2px 6px rgba(255, 255, 255, 0.15), 0 0 12px rgba(0, 210, 211, 0.2);
  position: relative;
  cursor: grab;
  transform-origin: center center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.virtual-steering-wheel:active, .virtual-steering-wheel.dragging {
  cursor: grabbing;
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.8), 0 0 18px rgba(0, 210, 211, 0.5);
}

.wheel-marker-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 10px;
  background: #ff4757;
  border-radius: 2px;
  box-shadow: 0 0 6px #ff4757;
}

.wheel-center-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #090e18;
  border: 2px solid #3d4a63;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.wheel-spoke {
  position: absolute;
  background: #252e40;
}

.spoke-left {
  top: 50%;
  left: 4px;
  width: 34px;
  height: 6px;
  transform: translateY(-50%);
}

.spoke-right {
  top: 50%;
  right: 4px;
  width: 34px;
  height: 6px;
  transform: translateY(-50%);
}

.spoke-bottom {
  bottom: 4px;
  left: 50%;
  width: 6px;
  height: 34px;
  transform: translateX(-50%);
}

/* =========================================================
   Victory Celebration Floating Bottom Bar
   ========================================================= */
.victory-celebration-hud {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 999;
  pointer-events: auto;
  animation: victoryBarFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes victoryBarFadeUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 30px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.victory-celebration-banner {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #00ff88;
  text-shadow: 0 0 16px rgba(0, 255, 136, 0.8), 0 2px 8px rgba(0, 0, 0, 0.9);
  background: rgba(10, 18, 28, 0.85);
  padding: 8px 24px;
  border-radius: 24px;
  border: 1px solid rgba(0, 255, 136, 0.4);
  backdrop-filter: blur(12px);
}

.btn-victory-bottom-continue {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 50%, #0984e3 100%);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 16px 42px;
  border-radius: 36px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 206, 201, 0.5), 0 0 20px rgba(0, 255, 136, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: victoryBtnPulse 1.8s infinite ease-in-out;
}

.btn-victory-bottom-continue:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 40px rgba(0, 206, 201, 0.8), 0 0 30px rgba(0, 255, 136, 0.7);
  border-color: #ffffff;
}

.btn-victory-bottom-continue:active {
  transform: scale(0.96);
}

@keyframes victoryBtnPulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(0, 206, 201, 0.5), 0 0 20px rgba(0, 255, 136, 0.4);
  }
  50% {
    box-shadow: 0 12px 38px rgba(0, 206, 201, 0.8), 0 0 35px rgba(0, 255, 136, 0.7);
  }
}

