* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #0b1226; }
body { font-family: "Segoe UI", system-ui, sans-serif; color: #dfe8ff; }
#gl, #gl canvas { position: fixed; inset: 0; }
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#topbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px;
  background: linear-gradient(#0b1226cc, #0b122600); }
.stat { font-size: 15px; padding: 4px 10px; border-radius: 10px; background: #14203a99; border: 1px solid #2a4a6e; }
.hpwrap { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.hpname { font-weight: 700; }
.hive-c { color: #ffc95e; } .heart-c { color: #ff4f7e; }
.bar { width: 110px; height: 10px; border-radius: 6px; background: #0d1730; border: 1px solid #2a4a6e; overflow: hidden; }
.bar i { display: block; height: 100%; }
#bar-hive { background: #ffc95e; width: 100%; } #bar-heart { background: #ff4f7e; width: 100%; }
#msg { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); font-size: 14px;
  color: #aef7ff; text-shadow: 0 1px 4px #000; white-space: nowrap; }
#hud-buttons { position: fixed; bottom: 12px; right: 12px; display: flex; gap: 8px; pointer-events: auto; }
#hud-buttons button, #dpad button, .panel button {
  font: inherit; font-size: 14px; color: #eaf2ff; background: #1a2b4d; border: 1px solid #3b6497;
  border-radius: 10px; padding: 9px 13px; cursor: pointer; touch-action: none; }
#hud-buttons button:active { background: #2a4a7a; }
#btn-spawn b { color: #59e6ff; }
#btn-spawn.disabled { opacity: 0.45; }
#dpad { position: fixed; bottom: 12px; left: 12px; display: none; flex-direction: column;
  align-items: center; gap: 4px; pointer-events: auto; }
#dpad div { display: flex; gap: 34px; }
#dpad button { width: 46px; height: 40px; }
@media (pointer: coarse) { #dpad { display: flex; } #helpbar { display: none; } }
#helpbar { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 12px;
  color: #7d93bd; text-shadow: 0 1px 3px #000; }
#marquee { display: none; position: fixed; border: 1px solid #8ff0ff; background: #8ff0ff22;
  z-index: 6; pointer-events: none; }
#start-overlay, #end-overlay { position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; background: #050a18cc; z-index: 10; }
#end-overlay { display: none; }
.panel { max-width: 560px; margin: 16px; padding: 26px 30px; border-radius: 18px;
  background: #101a33ee; border: 1px solid #2a4a6e; box-shadow: 0 10px 40px #000a; text-align: center; }
.panel h1 { font-size: 34px; letter-spacing: 1px; }
.grad { color: #ffc95e; }
.lumen-c { color: #59e6ff; }
.tag { color: #9fb4dd; margin: 8px 0 14px; }
.howto { list-style: none; text-align: left; font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.howto b { color: #aef7ff; }
.panel button { font-size: 17px; padding: 11px 26px; border-radius: 12px;
  background: linear-gradient(#ff9a3d, #e0662a); border: none; font-weight: 700; color: #1a1005; }
