* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  background: #0a1208;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: system-ui, Segoe UI, sans-serif;
}
#wrap {
  position: relative;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
#game {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #4aa3d8;
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
}
#overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
}
#overlay.active { display: block; }
.touch-zone {
  position: absolute;
  bottom: 0;
  height: 42%;
  width: 42%;
  pointer-events: auto;
  touch-action: none;
}
#joyZone { left: 0; }
#fireZone { right: 0; display: flex; align-items: center; justify-content: center; }
#joyBase {
  position: absolute;
  left: 50%; top: 55%;
  width: 110px; height: 110px;
  margin-left: -55px; margin-top: -55px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 3px solid rgba(255,255,255,0.35);
  pointer-events: none;
}
#joyKnob {
  position: absolute;
  left: 50%; top: 50%;
  width: 48px; height: 48px;
  margin-left: -24px; margin-top: -24px;
  border-radius: 50%;
  background: rgba(255,230,80,0.75);
  border: 2px solid rgba(40,30,0,0.6);
  pointer-events: none;
  transform: translate(0,0);
}
#fireBtn {
  position: relative;
  z-index: 1;
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 4px solid #2a1a00;
  background: radial-gradient(circle at 35% 30%, #ffe066, #e0a020 60%, #a06010);
  color: #2a1a00;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 6px 0 #5a3a00, inset 0 2px 0 rgba(255,255,255,0.4);
}
#fireBtn:active, #fireBtn.held {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #5a3a00;
}
#chargeRing {
  position: absolute;
  width: 130px; height: 130px;
  pointer-events: none;
  z-index: 0;
}
#uiBtns {
  position: absolute;
  left: 50%; top: 62%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}
.bigBtn {
  pointer-events: auto;
  min-width: 160px;
  min-height: 56px;
  padding: 14px 28px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  border-radius: 12px;
  border: 4px solid #1a2a0a;
  background: linear-gradient(#c8f060, #6aaa20);
  color: #1a2a0a;
  box-shadow: 0 6px 0 #3a5a10;
  touch-action: manipulation;
  cursor: pointer;
}
.bigBtn:active { transform: translateY(3px); box-shadow: 0 3px 0 #3a5a10; }
.bigBtn.hidden { display: none; }
@media (min-width: 900px) and (pointer: fine) {
  #overlay.active { display: none; }
}
