/* ui/hud.css */
* { box-sizing: border-box; margin: 0; padding: 0; }

#hud {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  font-family: 'Impact', sans-serif;
  z-index: 10;
}

#hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 20px;
  gap: 20px;
}

.player-hud {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-hud.p2 { align-items: flex-end; }

.player-name {
  font-size: 18px;
  font-weight: bold;
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 1px;
}

.hp-bar-bg {
  width: 100%;
  height: 22px;
  background: #333;
  border: 2px solid #000;
  border-radius: 4px;
  overflow: hidden;
}

.hp-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #22c55e, #86efac);
  transition: width 0.1s ease-out;
}

.hp-bar-fill.low    { background: linear-gradient(to right, #f59e0b, #fcd34d); }
.hp-bar-fill.danger { background: linear-gradient(to right, #ef4444, #fca5a5); }

.special-bar-bg {
  width: 100%;
  height: 10px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 2px;
  overflow: hidden;
}

.special-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #6366f1, #a78bfa);
  transition: width 0.15s ease-out;
}

.special-ready {
  font-size: 12px;
  color: #a78bfa;
  letter-spacing: 2px;
  animation: pulse 0.6s infinite alternate;
  display: none;
}

.special-ready.visible { display: block; }

@keyframes pulse {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

#timer-box {
  width: 80px;
  text-align: center;
  flex-shrink: 0;
}

#timer {
  font-size: 42px;
  font-weight: bold;
  color: #fff;
  text-shadow: 3px 3px 0 #000;
  line-height: 1;
}

#round-display {
  font-size: 13px;
  color: #aaa;
  text-align: center;
  margin-top: 2px;
}

.round-pip {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin: 0 2px;
}

.round-pip.won { background: #facc15; border-color: #facc15; }

#fight-flash {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  font-weight: bold;
  color: #fff;
  text-shadow: 4px 4px 0 #000, -2px -2px 0 #000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 20;
  letter-spacing: 4px;
}

#fight-flash.show { opacity: 1; }
