/* TEXANS KOMBAT - Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
}

#gameContainer {
  position: relative;
  width: 1024px;
  height: 576px;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* === HUD OVERLAY === */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}

/* Player info (name + health + round dots) */
.player-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.player-name {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Health bar container */
.health-bar-bg {
  width: 100%;
  height: 20px;
  background: #1a1a2e;
  border: 2px solid #fff;
  position: relative;
  overflow: hidden;
}

.health-bar-bg.p2 {
  display: flex;
  justify-content: flex-end; /* P2 health bar drains from left toward center */
}

.health-bar {
  height: 100%;
  width: 100%;
  transition: width 0.3s ease;
}

#p1Health {
  background: linear-gradient(180deg, #0080c6, #005a8c);
}

#p2Health {
  background: linear-gradient(180deg, #ed0028, #a3001c);
}

/* Round indicators */
.round-dots {
  display: flex;
  gap: 6px;
}

.player-info.p2 .round-dots {
  flex-direction: row-reverse;
}

.round-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
}

.round-dot.won {
  background: #ed0028;
  border-color: #ed0028;
  box-shadow: 0 0 6px #ed0028;
}

/* Timer */
#timer {
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  background: #021018;
  border: 2px solid #fff;
  padding: 2px 14px;
  min-width: 70px;
  text-align: center;
  line-height: 1.1;
}

/* === CENTER OVERLAY TEXT === */
#overlayText {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 56px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow:
    0 0 20px rgba(237, 0, 40, 0.8),
    0 0 40px rgba(237, 0, 40, 0.4),
    2px 2px 0 #000;
  display: none;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

#overlaySubtext {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #aaa;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: none;
  pointer-events: none;
}

/* === CONTROLS LEGEND === */
#controls {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  text-align: center;
  pointer-events: none;
  letter-spacing: 1px;
}

/* === RESPONSIVE SCALING === */
@media (max-width: 1040px) {
  #gameContainer {
    width: 100vw;
    height: calc(100vw * 576 / 1024);
  }
}
