/* ==========================================================================
   COMBAT HUD LAYOUT
   ========================================================================== */

.combat-hud {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: #1e1e1e;
  border: 2px solid #404040;
  border-radius: 6px;
  padding: 12px;
  margin: 8px 0;
  color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  max-width: 700px;
}

.hud-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 300px;
  max-width: 300px;
}

/* ==========================================================================
   HP PERCENTAGE CLASSES - UNIFIED SYSTEM
   ========================================================================== */

/* Critical (0-30%) - Red */
.hp-0::after, .hp-10::after, .hp-20::after, .hp-30::after {
  background: rgba(255, 136, 136, 0.35) !important;
}

.hp-0, .hp-10, .hp-20, .hp-30 {
  background: #5a1a1a !important;
  color: #ff8888 !important;
  border-color: #cc4444 !important;
}

/* Warning (40-60%) - Yellow */
.hp-40::after, .hp-50::after, .hp-60::after {
  background: rgba(221, 221, 136, 0.35) !important;
}

.hp-40, .hp-50, .hp-60 {
  background: #4a4a1a !important;
  color: #dddd88 !important;
  border-color: #cccc44 !important;
}

/* Partial (70-90%) - Green */
.hp-70::after, .hp-80::after, .hp-90::after {
  background: rgba(136, 221, 136, 0.35) !important;
}

.hp-70, .hp-80, .hp-90 {
  background: #1a4a1a !important;
  color: #88dd88 !important;
  border-color: #44cc44 !important;
}

/* Full (100%) - Gray */
.hp-100::after {
  background: rgba(187, 187, 187, 0.12) !important;
}

.hp-100 {
  background: #3a3a3a !important;
  color: #bbbbbb !important;
  border-color: #777 !important;
}

/* HP Bar Fill Widths */
.hp-100::after { width: 100%; }
.hp-90::after { width: 90%; }
.hp-80::after { width: 80%; }
.hp-70::after { width: 70%; }
.hp-60::after { width: 60%; }
.hp-50::after { width: 50%; }
.hp-40::after { width: 40%; }
.hp-30::after { width: 30%; }
.hp-20::after { width: 20%; }
.hp-10::after { width: 10%; }
.hp-0::after { width: 0%; }

/* ==========================================================================
   STAT BOX BASE STYLES
   ========================================================================== */

.hud-stat-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  border: 1px solid #555;
  min-height: 28px;
  position: relative;
  overflow: hidden;
  background: #3a3a3a;
  color: #bbbbbb;
}

/* HP Bar Background and Fill */
.hud-stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
  border-radius: 3px;
}

.hud-stat-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(187,187,187,0.12);
  transition: width 0.3s ease;
  z-index: 2;
  border-radius: 3px;
}

.hud-stat-box > * {
  position: relative;
  z-index: 3;
}

/* ==========================================================================
   HULL HP DISPLAY
   ========================================================================== */

.hull-hp-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #777;
  background: #3a3a3a;
  color: #bbbbbb;
  min-height: 24px;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.hull-hp-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
  border-radius: 3px;
}

.hull-hp-display::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(187,187,187,0.12);
  transition: width 0.3s ease;
  z-index: 2;
  border-radius: 3px;
}

.hull-hp-display > * {
  position: relative;
  z-index: 3;
}

.hull-critical {
  background: #5a1a1a !important;
  color: #ff8888 !important;
  border-color: #cc4444 !important;
}

.hull-critical::after {
  background: rgba(255,136,136,0.35) !important;
}

.hull-warning {
  background: #4a4a1a !important;
  color: #dddd88 !important;
  border-color: #cccc44 !important;
}

.hull-warning::after {
  background: rgba(221,221,136,0.35) !important;
}

/* ==========================================================================
   AURA BOXES
   ========================================================================== */

.hud-aura-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  border: 1px solid #555;
  min-height: 24px;
  background: #3a3a3a;
  color: #bbbbbb;
}

.aura-wood, .aura-fire, .aura-earth, .aura-metal, .aura-water {
  background: #3a3a3a;
  border: 1px solid #777;
}

.aura-wood .aura-icon, .aura-fire .aura-icon, .aura-earth .aura-icon,
.aura-metal .aura-icon, .aura-water .aura-icon {
  color: #bbbbbb;
}

.aura-wood.active {
  background: #3a6a3a;
  border-color: #66bb66;
  box-shadow: 0 0 8px rgba(102, 187, 102, 0.4);
}
.aura-wood.active .aura-icon, .aura-wood.active .aura-value { color: #aaffaa; }

.aura-fire.active {
  background: #6a3a3a;
  border-color: #bb6666;
  box-shadow: 0 0 8px rgba(187, 102, 102, 0.4);
}
.aura-fire.active .aura-icon, .aura-fire.active .aura-value { color: #ffaaaa; }

.aura-earth.active {
  background: #6a6a3a;
  border-color: #bbbb66;
  box-shadow: 0 0 8px rgba(187, 187, 102, 0.4);
}
.aura-earth.active .aura-icon, .aura-earth.active .aura-value { color: #ffffaa; }

.aura-metal.active {
  background: #555555;
  border-color: #999999;
  box-shadow: 0 0 8px rgba(153, 153, 153, 0.4);
}
.aura-metal.active .aura-icon, .aura-metal.active .aura-value { color: #dddddd; }

.aura-water.active {
  background: #3a3a6a;
  border-color: #6666bb;
  box-shadow: 0 0 8px rgba(102, 102, 187, 0.4);
}
.aura-water.active .aura-icon, .aura-water.active .aura-value { color: #aaaaff; }

/* ==========================================================================
   WEAPON BOXES
   ========================================================================== */

.hud-weapon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid #555;
  background: #333333;
  color: #888888;
  min-height: 28px;
}

.hud-weapon-box.active {
  background: #1a4a1a;
  color: #88dd88;
  border-color: #44cc44;
  box-shadow: 0 0 8px rgba(68, 204, 68, 0.3);
}

/* ==========================================================================
   ECTOMETER BOOSTS
   ========================================================================== */

.ecto-boost {
  position: relative;
}

.ecto-flame {
  animation: ecto-pulse 2s ease-in-out infinite;
  color: #ffaa00;
  text-shadow: 0 0 6px rgba(255, 170, 0, 0.6);
}

@keyframes ecto-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 680px) {
  .combat-hud {
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
  }

  .hud-side {
    max-width: 100%;
    flex-basis: 100%;
  }
}
