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

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

#canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#fullscreen-btn {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 2px solid rgba(0, 229, 255, 0.8);
  background: rgba(10, 14, 39, 0.9);
  color: #00e5ff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  font-family: 'Press Start 2P', monospace;
  box-shadow: 0 2px 8px rgba(0, 229, 255, 0.3);
}

#fullscreen-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
}

#fullscreen-btn:active {
  transform: scale(0.9);
}

#controls {
  display: none;
}

#auth-status {
  display: none;
}

#touch-controls {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 100;
}

#joystick-zone {
  position: absolute;
  left: 20px;
  bottom: 20px;
  width: 140px;
  height: 140px;
  pointer-events: auto;
}

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

#joystick-knob {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.5);
  border: 2px solid rgba(0, 229, 255, 0.8);
  position: absolute;
  transition: none;
}

#action-buttons {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.action-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 109, 0, 0.8);
  background: rgba(255, 109, 0, 0.25);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.action-btn:active {
  background: rgba(255, 109, 0, 0.6);
  transform: scale(0.9);
}

.sprint-btn {
  border-color: rgba(255, 214, 0, 0.8);
  background: rgba(255, 214, 0, 0.2);
}

.pass-btn {
  border-color: rgba(0, 230, 118, 0.8);
  background: rgba(0, 230, 118, 0.2);
  width: 52px;
  height: 52px;
  font-size: 18px;
}

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