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

html, body {
  height: 100%;
  background: #1b1530;
  color: #fff;
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#game-container {
  position: relative;
  height: min(92vh, 600px);
  aspect-ratio: 400 / 600;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(#cfeffd, #eaf6ff);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  image-rendering: optimizeQuality;
}

#hint {
  font-size: 13px;
  opacity: 0.7;
  text-align: center;
}

#mute-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
#mute-btn:hover { background: rgba(0, 0, 0, 0.4); }

/* Touch controls */
#touch-controls {
  position: absolute;
  inset: auto 0 0 0;
  display: none;
  justify-content: space-between;
  padding: 0 12px 14px;
  pointer-events: none;
}
.touch-btn {
  pointer-events: auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.28);
  color: #233;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.touch-btn:active { background: rgba(255, 255, 255, 0.55); }
.touch-btn.shoot { background: rgba(120, 200, 255, 0.42); color: #fff; }
.touch-btn.shoot:active { background: rgba(120, 200, 255, 0.7); }

/* Show touch controls only on coarse pointers (phones/tablets) */
@media (pointer: coarse) {
  #touch-controls { display: flex; }
  #hint { display: none; }
}
