:root {
  --accent: #58e1ff;
  --danger: #ff5b6e;
  --good: #7cffb2;
  --warn: #ffd166;
  --bg: #04060c;
  --panel: rgba(8, 12, 24, 0.78);
  --panel-border: rgba(88, 225, 255, 0.35);
  --font: 'Orbitron', 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: radial-gradient(ellipse at center, #0b1124 0%, #04060c 60%, #000 100%);
  color: var(--accent);
  font-family: var(--font);
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: 0 0 80px rgba(88, 225, 255, 0.15),
              0 0 0 1px rgba(88, 225, 255, 0.2);
}

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px;
  z-index: 10;
  font-family: var(--font);
  letter-spacing: 0.08em;
}

.hud-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hud-row.bottom { justify-content: center; }

.hud-pill {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 0 8px rgba(88, 225, 255, 0.6);
  white-space: nowrap;
}

.hud-pill strong {
  color: #fff;
  margin-left: 6px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

#hud-powerups {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
}

.powerup-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  box-shadow: 0 0 12px currentColor;
  animation: chip-pulse 1.2s ease-in-out infinite;
}

.powerup-chip .icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: currentColor;
  color: #000;
}

@keyframes chip-pulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.35); }
}

.flash-damage { animation: flash-damage 0.18s ease-out 2; }
@keyframes flash-damage {
  0%, 100% { background-color: transparent; }
  50%      { background-color: rgba(255, 91, 110, 0.25); }
}
