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

html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

/* HUD Styles */
.hud {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.health-bar,
.energy-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 200px;
}

.health-bar-label,
.energy-bar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 4px rgba(0, 0, 0, 0.6);
}

.health-bar-container,
.energy-bar-container {
  position: relative;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 1.5);
  border-radius: 4px;
  overflow: hidden;
}

.health-bar-background,
.energy-bar-background {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.health-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(to bottom, #ac1717, #710606);
  transition: width 0.3s ease-out;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 1;
}

.energy-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(to bottom, #2a5aa9, #051d51);
  transition: width 0.3s ease-out;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 1;
}

.health-bar-segments,
.energy-bar-segments {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  z-index: 2;
  pointer-events: none;
}

.health-bar-segments .segment,
.energy-bar-segments .segment {
  flex: 1;
  border-right: 1px solid rgba(0, 0, 0, 0.3);
}

.health-bar-segments .segment:nth-child(10n),
.energy-bar-segments .segment:nth-child(10n) {
  border-right: 1px solid rgba(0, 0, 0, 0.6);
}

.health-bar-segments .segment:last-child,
.energy-bar-segments .segment:last-child {
  border-right: none;
}

.health-bar-text,
.energy-bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 1),
    0 0 4px rgba(0, 0, 0, 0.8);
  z-index: 3;
  white-space: nowrap;
}