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

body {
  background: #0a0a0a;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: monospace;
  overflow: hidden;
}

#game-container {
  position: relative;
  border: 2px solid #333;
  box-shadow: 0 0 30px rgba(0, 255, 100, 0.15);
}

canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* モバイル対応：画面に収まるようスケール */
@media (max-width: 520px) {
  canvas {
    width: 100vw;
    height: auto;
  }
}

/* タッチコントロール */
#touch-controls {
  display: none;
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
}

@media (pointer: coarse) {
  #touch-controls {
    display: flex;
  }
}

#touch-dpad {
  display: flex;
  gap: 12px;
}

.touch-btn {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.touch-btn:active {
  background: rgba(255, 255, 255, 0.25);
}

.touch-shoot-btn {
  background: rgba(0, 255, 136, 0.15);
  border-color: #00ff88;
  color: #00ff88;
  font-size: 13px;
  font-family: monospace;
  letter-spacing: 1px;
}
