/* ============================================ */
/* HUD (Heads-Up Display) */
/* ============================================ */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}

/* ============================================ */
/* TOP BAR */
/* ============================================ */
.hud-top-bar {
  position: absolute;
  top: 2%;
  left: 2%;
  right: 2%;
  display: flex;
  justify-content: space-between;
  gap: 2em;
}

.hud-resource {
  background: rgba(26, 26, 46, 0.85);
  border: 2px solid #6C5CE7;
  border-radius: 0.5em;
  padding: 0.8em 1.2em;
  min-width: 180px;
  box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

.resource-label {
  font-size: 0.8em;
  color: #A0A0B8;
  margin-bottom: 0.3em;
  letter-spacing: 0.05em;
}

.resource-bar {
  width: 100%;
  height: 12px;
  background: rgba(61, 52, 96, 0.8);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.3em;
  border: 1px solid #3D3460;
}

.resource-bar-fill {
  height: 100%;
  background: #6C5CE7;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.6);
}

.resource-text {
  font-size: 0.9em;
  color: #EAEAEA;
  font-weight: bold;
}

.resource-value {
  font-size: 1.3em;
  color: #F9CA24;
  font-weight: bold;
}

/* ============================================ */
/* BOTTOM BAR */
/* ============================================ */
.hud-bottom-bar {
  position: absolute;
  bottom: 2%;
  left: 2%;
  right: 2%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2em;
}

/* HP Container */
.hud-hp-container {
  flex: 1;
  max-width: 400px;
  background: rgba(26, 26, 46, 0.85);
  border: 2px solid #2ecc71;
  border-radius: 0.5em;
  padding: 0.8em 1.2em;
  box-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
}

.hp-label {
  font-size: 0.8em;
  color: #A0A0B8;
  margin-bottom: 0.3em;
}

.hp-bar {
  width: 100%;
  height: 16px;
  background: rgba(61, 52, 96, 0.8);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.3em;
  border: 1px solid #3D3460;
}

.hp-bar-fill {
  height: 100%;
  background: #2ecc71;
  transition: width 0.3s ease, background 0.3s ease;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.6);
}

.hp-text {
  font-size: 1em;
  color: #EAEAEA;
  font-weight: bold;
}

/* Rune Slots */
.hud-rune-slots {
  display: flex;
  gap: 1em;
  align-items: center;
}

.rune-slot-label {
  font-size: 0.7em;
  color: #A0A0B8;
  text-align: center;
  margin-bottom: 0.3em;
}

.rune-slot {
  width: 120px;
  height: 90px;
  background: rgba(26, 26, 46, 0.85);
  border: 3px solid #6C5CE7;
  border-radius: 0.5em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5em;
  box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
  transition: border-color 0.3s;
}

.rune-empty {
  color: #555;
  font-size: 0.8em;
  text-align: center;
}

.rune-element {
  font-size: 1.2em;
  font-weight: bold;
  color: #F9CA24;
  margin-bottom: 0.2em;
}

.rune-rarity {
  font-size: 0.8em;
  font-weight: bold;
}

/* ============================================ */
/* COMBO FRAME */
/* ============================================ */
.combo-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(26, 26, 46, 0.95);
  border: 4px solid #F9CA24;
  border-radius: 0.5em;
  padding: 1em 2em;
  font-size: 2em;
  font-weight: bold;
  color: #F9CA24;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px rgba(249, 202, 36, 0.9);
  box-shadow: 0 0 30px rgba(249, 202, 36, 0.6);
  opacity: 0;
  pointer-events: none;
}

.combo-frame.active {
  animation: comboReveal 2s forwards;
}

@keyframes comboReveal {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  20% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  80% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 768px) {
  .hud-top-bar {
    flex-direction: column;
    gap: 0.5em;
  }
  
  .hud-resource {
    min-width: 0;
  }
  
  .hud-bottom-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hud-hp-container {
    max-width: 100%;
  }
  
  .hud-rune-slots {
    justify-content: center;
  }
  
  .rune-slot {
    width: 100px;
    height: 80px;
  }
  
  .combo-frame {
    font-size: 1.5em;
  }
}