* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  gap: 12px;
}

#hud {
  width: 100%;
  max-width: 960px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 18px 40px rgba(0,0,0,0.75);
}

.title {
  font-size: 16px;
  letter-spacing: 0.12em;
  color: #facc15;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.bars {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  margin-bottom: 6px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #111827;
  overflow: hidden;
  border: 1px solid #1f2937;
}

.bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #a3e635);
  transition: width 0.18s ease-out;
}

.bar-fill.enemy {
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.bar-label.enemy {
  text-align: right;
}

#status {
  font-size: 11px;
  color: #e5e7eb;
  min-height: 16px;
}

#game {
  width: 100%;
  max-width: 960px;
  border-radius: 16px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: radial-gradient(circle at top, #0f172a 0, #020617 45%, #020617 100%);
  box-shadow: 0 26px 60px rgba(0,0,0,0.85);
}

/* Mobile controls */
#mobileControls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

#mobileControls .row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

#mobileControls button {
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 8px 16px;
  font-size: 18px;
  cursor: pointer;
  min-width: 56px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.75);
}

#mobileControls button:active {
  transform: translateY(1px) scale(0.97);
  background: rgba(30, 64, 175, 0.9);
}

#help {
  font-size: 10px;
  color: #9ca3af;
  text-align: center;
}

@media (min-width: 900px) {
  #mobileControls {
    display: none;
  }
}
