* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background: #0a0a1a;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

#touch-controls {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.touch-zone {
  pointer-events: auto;
}

#touch-joystick {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 140px;
  height: 140px;
}

#joystick-base {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(0,240,255,0.1);
  border: 2px solid rgba(0,240,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#joystick-thumb {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0,240,255,0.4);
  border: 2px solid rgba(0,240,255,0.7);
  position: absolute;
  transition: none;
}

#touch-buttons {
  position: absolute;
  bottom: 20px;
  right: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.touch-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,0,170,0.6);
  background: rgba(255,0,170,0.15);
  color: #ff00aa;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 14px;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.touch-btn.special {
  border-color: rgba(255,215,0,0.7);
  background: rgba(255,215,0,0.15);
  color: #ffd700;
  font-size: 20px;
  grid-column: span 3;
  width: 100%;
  border-radius: 25px;
  height: 44px;
}

.touch-btn:active {
  background: rgba(255,0,170,0.4);
  transform: scale(0.93);
}

.touch-btn.special:active {
  background: rgba(255,215,0,0.4);
}

@media (pointer: coarse), (max-width: 768px) {
  #touch-controls {
    display: block;
  }
}