/* =========================================================================
   FREEEXILE MODERN ARPG HUD & DUAL FLUID ORBS STYLESHEET (2026.1)
   Domain: Combat HUD, Life/Mana Fluid Globes, Cooldowns & Action Console
   Standard: <= 350 lines (Soft Cap), Grimdark Aesthetics
   ========================================================================= */

/* --- DUAL FLUID ORBS CONTAINER --- */
#hud-orbs-container {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 24;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 12px 10px 12px;
}

/* --- ORB WRAPPER & INTERACTIVE GLOBE --- */
.orb-wrapper {
  position: relative;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.orb-globe {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, #09090b 40%, #000000 100%);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.95),
    0 2px 6px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(39, 39, 42, 0.6),
    inset 0 0 16px rgba(0, 0, 0, 0.9);
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}

.orb-wrapper:hover .orb-globe {
  transform: scale(1.04);
}

.orb-wrapper:active .orb-globe {
  transform: scale(0.96);
}

/* Life Orb Specific Theme */
.orb-life {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.95),
    0 0 14px rgba(185, 28, 28, 0.25),
    0 0 0 1px rgba(127, 29, 29, 0.5),
    inset 0 0 16px rgba(0, 0, 0, 0.9);
}

/* Mana / Qi Orb Specific Theme */
.orb-mana {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.95),
    0 0 14px rgba(37, 99, 235, 0.25),
    0 0 0 1px rgba(30, 58, 138, 0.5),
    inset 0 0 16px rgba(0, 0, 0, 0.9);
}

/* --- ORB CANVAS (180x180 High-DPI Procedural Fluid) --- */
.orb-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  pointer-events: none;
}

/* --- SPECULAR SHEEN & BEZEL OVERLAYS --- */
.orb-sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 28%,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.06) 35%,
    rgba(255, 255, 255, 0) 65%
  );
  pointer-events: none;
}

.orb-bezel {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* --- NUMERIC OVERLAY VALUES --- */
.orb-label-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  font-family: 'Cinzel', 'Noto Serif', monospace;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: #f8fafc;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.98),
    0 0 4px rgba(0, 0, 0, 0.95),
    0 0 1px #000;
  z-index: 2;
}

.orb-cur-val {
  color: #ffffff;
  font-weight: 800;
}

.orb-divider {
  color: #94a3b8;
  font-size: 9px;
  opacity: 0.8;
  margin: 0 1px;
}

.orb-max-val {
  color: #cbd5e1;
  font-size: 10px;
}

/* --- TYPE TAG BADGE (HP / QI) --- */
.orb-type-tag {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5px 5px;
  border-radius: 4px;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.orb-life .orb-type-tag {
  background: rgba(69, 10, 10, 0.92);
  color: #fca5a5;
  border: 1px solid rgba(185, 28, 28, 0.7);
}

.orb-mana .orb-type-tag {
  background: rgba(10, 25, 65, 0.92);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.7);
}

/* --- LOW HP CRIMSON HEARTBEAT PULSE (< 25% HP) --- */
.orb-low-pulse {
  animation: crimsonHeartbeat 0.95s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes crimsonHeartbeat {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.7));
  }
  14% {
    transform: scale(1.07);
    filter: drop-shadow(0 0 22px rgba(239, 68, 68, 1));
  }
  28% {
    transform: scale(1.01);
    filter: drop-shadow(0 0 12px rgba(220, 38, 38, 0.8));
  }
  42% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 18px rgba(239, 68, 68, 0.95));
  }
  70% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.7));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.7));
  }
}

.orb-pulse-warning {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.9);
  pointer-events: none;
  animation: pulseRing 1.1s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.96);
    opacity: 1;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

/* --- FULL VIEWPORT LOW HP CRIMSON VIGNETTE --- */
#hud-low-hp-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 18;
  background: radial-gradient(
    circle at center,
    transparent 62%,
    rgba(127, 29, 29, 0.35) 86%,
    rgba(185, 28, 28, 0.65) 100%
  );
  animation: vignetteBreathe 1.2s ease-in-out infinite alternate;
}

@keyframes vignetteBreathe {
  0% {
    opacity: 0.55;
  }
  100% {
    opacity: 1;
  }
}

/* --- RESPONSIVE MOBILE ADJUSTMENTS --- */
@media (max-width: 640px) {
  #hud-orbs-container {
    padding: 0 6px 6px 6px;
  }
  .orb-globe {
    width: 74px;
    height: 74px;
  }
  .orb-label-overlay {
    font-size: 9.5px;
  }
  .orb-type-tag {
    font-size: 7.5px;
    padding: 0px 4px;
  }
}
