/* ============================================================================
   SPACE MINER - DESKTOP HUD STYLES
   Paneles laterales flotantes, brújula superior y leyendas de teclado/ratón.
   ============================================================================ */

/* Contenedor desktop exclusivo */
#hud-desktop {
  display: block;
}

/* Base Compass / Waypoint */
#base-compass {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  text-align: center;
  background: var(--glass-bg);
  min-width: 150px;
  height: 40px;
  box-sizing: border-box;
  z-index: var(--z-hud-nav); /* Por encima del degradado del top-bar */
}

.compass-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--neon-amber);
  margin-bottom: 0;
  white-space: nowrap;
}

.compass-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.arrow-container {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#base-arrow {
  font-size: 16px;
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 1;
  transform-origin: center center;
  will-change: transform;
}

.dist-val {
  font-family: 'Orbitron', monospace, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  min-width: 60px;
  text-align: left;
}

/* Cargo Meter */
#cargo-hud {
  top: 66px;
  left: 20px;
  width: 260px;
}

.cargo-meter {
  position: relative;
  width: 100%;
  height: 20px;
  background: rgba(1, 10, 20, 0.85);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.cargo-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f5ff 0%, #39ff14 70%, #ffaa00 95%, #ff007f 100%);
  transition: width 0.25s ease-out;
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.7);
}

.cargo-counter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 0 4px #000;
}

/* Fuel Meter Desktop */
.fuel-meter {
  position: relative;
  width: 100%;
  height: 16px;
  background: rgba(1, 10, 20, 0.85);
  border: 1px solid rgba(255, 170, 0, 0.35);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.fuel-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff0055 0%, #ffaa00 35%, #00f5ff 100%);
  transition: width 0.2s ease-out;
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.5);
}

.fuel-fill.low {
  background: #ff0055 !important;
  box-shadow: 0 0 12px #ff0055;
  animation: fuel-pulse 0.8s infinite alternate;
}

@keyframes fuel-pulse {
  from { opacity: 0.6; }
  to { opacity: 1.0; }
}

.fuel-counter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 0 4px #000;
}

.minerals-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 2px;
}

.minerals-mini-grid::-webkit-scrollbar,
.minerals-grid::-webkit-scrollbar {
  width: 4px;
}

.minerals-mini-grid::-webkit-scrollbar-thumb,
.minerals-grid::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 2px;
}

.mineral-mini-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.mineral-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

/* Base Global Inventory HUD */
#base-hud {
  top: 66px;
  right: 20px;
  width: 250px;
}

.minerals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}

.mineral-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  border-left: 3px solid var(--neon-cyan);
}

.mineral-card .name {
  font-size: 10px;
  color: var(--text-dim);
}

.mineral-card .amount {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
}

/* Leyenda inferior (HUD Hints) en escritorio */
#hud-hints-desktop {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  z-index: var(--z-hud-panels);
  pointer-events: none;
  opacity: 0.85;
  white-space: nowrap;
}
