/* Minimal, readable HUD + fullscreen canvas */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: #0f1020; color: #f7f7f7; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
#game { width: 100vw; height: 100vh; display: block; image-rendering: pixelated; }

#hud { position: fixed; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 8px; }
#hud .row { display: flex; align-items: center; gap: 12px; }
#hud .top { justify-content: space-between; }
#hud .bottom { justify-content: space-between; align-items: flex-end; }

.hud-group { pointer-events: auto; background: rgba(0,0,0,0.35); padding: 6px 10px; border-radius: 12px; backdrop-filter: blur(4px); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.hud-group .label { opacity: 0.8; margin-right: 6px; }
.hud-group .small { font-size: 12px; opacity: 0.7; margin-left: 6px; }

/* Ammo bars */
.ammo { min-width: 320px; }
.ammo-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin: 4px 0; }
.bar { width: 100%; height: 12px; background: #2a2f4a; border-radius: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 100%; transform-origin: left center; background: linear-gradient(90deg, #7ee081, #2bd4c5); transition: transform 160ms ease-out; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; margin-right: 6px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #4a4d70; transition: .2s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .2s; border-radius: 50%; }
input:checked + .slider { background-color: #2bd4c5; }
input:checked + .slider:before { transform: translateX(20px); }

/* Subtitles */
#subtitles { min-height: 24px; padding: 6px 10px; background: rgba(0,0,0,0.35); border-radius: 12px; }

/* Tutorial panel */
.panel { max-width: 520px; pointer-events: auto; background: rgba(10, 13, 30, 0.85); padding: 14px 18px; border-radius: 14px; margin: 0 auto; }
.panel h2 { margin: 6px 0 6px; }
.panel ol { margin: 6px 0; padding-left: 18px; }
.panel li { margin: 4px 0; }
