@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@500;700&display=swap');

:root {
  --hud-primary: #00ff88;
  --hud-secondary: #00e5ff;
  --hud-accent: #ffcc00;
  --hud-danger: #ff2a2a;
  --hud-bg-trans: rgba(0, 0, 0, 0.75);
  --hud-text: #ffffff;
  --hud-glow: rgba(0, 255, 136, 0.5);
  --margin-x: 32px;
  --margin-y: 24px;
  --hud-scale: 1;
}

/* OLED Pure Black Rule: #000000 is 100% transparent in RayNeo AR */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #000000 !important;
  color: var(--hud-text);
  font-family: 'Rajdhani', 'Orbitron', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
}

/* Fullscreen HUD Container */
.rayneo-hud-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--margin-y) var(--margin-x);
  transform: scale(var(--hud-scale));
  transform-origin: center center;
  transition: transform 0.2s ease;
}

/* Top Bar: Compass Tape + Location + Wanted Stars */
.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  z-index: 10;
  pointer-events: none;
}

/* Compass Ribbon (Center Top) */
.compass-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 4px;
  padding: 4px 16px;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.compass-tape {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--hud-primary);
  text-shadow: 0 0 8px var(--hud-glow);
}

.compass-degrees {
  font-size: 11px;
  color: #88ffbb;
  margin-top: 2px;
}

/* Top Right: Clock, Street, Wanted */
.hud-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 4px;
}

.hud-clock {
  font-family: 'Orbitron', monospace;
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.hud-location-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--hud-accent);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
}

.hud-wanted-stars {
  display: flex;
  gap: 4px;
  font-size: 18px;
  cursor: pointer;
  pointer-events: auto;
  margin-top: 2px;
}

.star-active {
  color: #ff2a2a;
  text-shadow: 0 0 10px #ff2a2a, 0 0 15px #ff2a2a;
  animation: pulse-star 0.8s infinite alternate ease-in-out;
}

.star-inactive {
  color: rgba(255, 255, 255, 0.2);
}

@keyframes pulse-star {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 1; }
}

/* Center Area (Empty to preserve real-world vision through RayNeo AR) */
.hud-center-sight {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

/* Subtle crosshair in center (toggleable) */
.hud-crosshair {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(0, 255, 136, 0.25);
  border-radius: 50%;
  position: relative;
}

.hud-crosshair::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: rgba(0, 255, 136, 0.4);
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

/* Bottom Bar: Minimap Radar (Left) + Telemetry / Speed (Right) */
.hud-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  z-index: 10;
}

/* GTA 6 Minimap Radar */
.gta6-radar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.gta6-radar-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: #00f0ff;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
  padding-left: 4px;
}

.radar-badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff007f;
  box-shadow: 0 0 8px #ff007f;
  animation: pulse-star 1s infinite alternate;
}

.radar-zoom-label {
  color: #ff007f;
  font-weight: 900;
  margin-left: auto;
}

.gta-radar-canvas-box {
  width: 210px;
  height: 210px;
  position: relative;
  border-radius: 32px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25), inset 0 0 15px rgba(255, 0, 127, 0.15);
}

.gta-radar-canvas {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  display: block;
}

/* Floating Zoom Buttons */
.radar-zoom-controls {
  position: absolute;
  right: 6px;
  top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0.3;
  transition: opacity 0.2s ease;
}

.gta-radar-canvas-box:hover .radar-zoom-controls {
  opacity: 1;
}

.radar-zoom-btn {
  width: 22px;
  height: 22px;
  background: rgba(5, 15, 20, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.6);
  color: #00f0ff;
  font-size: 13px;
  font-weight: bold;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.radar-zoom-btn:hover {
  background: #00f0ff;
  color: #000;
}

/* GTA Status Bars under Radar */
.gta-status-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 210px;
}

.gta-bar-row {
  display: flex;
  gap: 4px;
  width: 100%;
}

.gta-bar-track {
  height: 8px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.gta-health-track {
  flex: 1;
}

.gta-armor-track {
  flex: 1;
}

.gta-stamina-track {
  width: 100%;
  height: 5px;
}

.gta-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.health-fill {
  background: linear-gradient(90deg, #00aa44, #00ff66);
  box-shadow: 0 0 6px #00ff66;
}

.armor-fill {
  background: linear-gradient(90deg, #0088ff, #00d5ff);
  box-shadow: 0 0 6px #00d5ff;
}

.stamina-fill {
  background: linear-gradient(90deg, #cc9900, #ffcc00);
  box-shadow: 0 0 6px #ffcc00;
}

.gta-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #aaaaaa;
  font-family: 'Orbitron', monospace;
  padding: 0 2px;
}

/* Speedometer & Stats (Bottom Right) */
.speedometer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 4px;
  pointer-events: auto;
}

.speed-display-box {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.speed-number {
  font-family: 'Orbitron', monospace;
  font-size: 58px;
  font-weight: 900;
  color: var(--hud-text);
  line-height: 1;
  text-shadow: 0 0 15px var(--hud-secondary);
}

.speed-unit {
  font-size: 16px;
  font-weight: 700;
  color: var(--hud-secondary);
  letter-spacing: 1px;
}

.speed-rev-bar {
  width: 160px;
  height: 6px;
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.speed-rev-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--hud-secondary), var(--hud-accent), var(--hud-danger));
  box-shadow: 0 0 8px var(--hud-secondary);
  transition: width 0.15s ease;
}

.hud-gps-telemetry {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
  color: #99bbcc;
  font-family: 'Orbitron', monospace;
  gap: 2px;
}

/* Floating Action Controls (Top or Bottom corner) */
.hud-quick-actions {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
  z-index: 50;
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.hud-quick-actions:hover,
.hud-quick-actions:focus-within {
  opacity: 1;
}

.hud-btn {
  background: rgba(10, 20, 15, 0.8);
  border: 1px solid var(--hud-primary);
  color: var(--hud-primary);
  padding: 6px 10px;
  font-size: 12px;
  font-family: 'Orbitron', sans-serif;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 6px var(--hud-glow);
  outline: none;
}

.hud-btn:hover {
  background: var(--hud-primary);
  color: #000000;
}

/* Modal Settings for RayNeo AR Calibration */
.hud-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.hud-modal-card {
  background: #080d0a;
  border: 2px solid var(--hud-primary);
  box-shadow: 0 0 25px var(--hud-glow);
  border-radius: 8px;
  padding: 24px;
  width: 90%;
  max-width: 460px;
  color: #ffffff;
}

.hud-modal-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  color: var(--hud-primary);
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.3);
  padding-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.setting-group {
  margin-bottom: 14px;
}

.setting-label {
  font-size: 13px;
  color: #cccccc;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.setting-slider {
  width: 100%;
  accent-color: var(--hud-primary);
}

.theme-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.theme-chip {
  background: rgba(20, 30, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}

.theme-chip.active {
  border-color: var(--hud-primary);
  background: rgba(0, 255, 136, 0.2);
  color: var(--hud-primary);
}
