*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #04040f;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  color: #e4e4f0;
}

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

#canvas {
  display: block;
  image-rendering: pixelated;
}

/* Mobile controls */
#mobile-controls {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  pointer-events: none;
  z-index: 10;
}

.dpad {
  position: absolute;
  bottom: 20px;
  left: 24px;
  width: 120px;
  height: 120px;
  pointer-events: all;
}

.dpad button {
  position: absolute;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.dpad .d-up    { top: 0;  left: 41px; }
.dpad .d-down  { bottom: 0; left: 41px; }
.dpad .d-left  { top: 41px; left: 0; }
.dpad .d-right { top: 41px; right: 0; }

.shoot-btn {
  position: absolute;
  bottom: 28px;
  right: 28px;
  width: 72px;
  height: 72px;
  background: rgba(124,58,237,.35);
  border: 2px solid rgba(124,58,237,.6);
  border-radius: 50%;
  color: #a78bfa;
  font-size: 26px;
  cursor: pointer;
  pointer-events: all;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (pointer: coarse) {
  #mobile-controls { display: block; }
}

/* Toast */
#toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: rgba(15,15,28,.92);
  border: 1px solid rgba(167,139,250,.35);
  color: #a78bfa;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}
#toast.show { transform: translateX(-50%) translateY(0); }
