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

body {
  background: #0a0a12;
  overflow: hidden;
  font-family: 'Press Start 2P', cursive;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

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

#canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  max-width: 100%;
  max-height: 100%;
}

#touch-controls {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  padding: 20px;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 100;
}

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

#joystick-zone {
  pointer-events: auto;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#joystick-base {
  width: 100px;
  height: 100px;
  background: rgba(255, 0, 255, 0.2);
  border: 3px solid #ff00ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

#joystick-stick {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
  transition: transform 0.05s ease-out;
}

#action-btn {
  pointer-events: auto;
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #00ffff, #ff00ff);
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
  text-shadow: 0 0 5px #000;
}

#action-btn:active {
  transform: scale(0.9);
  box-shadow: 0 0 40px rgba(255, 0, 255, 0.9);
}