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

body {
  background: #0a0a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: 'Press Start 2P', monospace;
  overflow: hidden;
}

#game-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  background: #000;
  border: 3px solid #2a2a4a;
  box-shadow: 0 0 30px rgba(100, 60, 180, 0.3);
}

#touch-controls {
  display: none;
  width: 100%;
  max-width: 640px;
  padding: 10px;
  justify-content: space-between;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.touch-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #6a4aaa;
  background: rgba(40, 20, 80, 0.8);
  color: #c8a0ff;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.touch-btn:active {
  background: rgba(100, 60, 180, 0.9);
}

#touch-left, #touch-right {
  display: flex;
  gap: 10px;
}

footer {
  margin-top: 15px;
  padding: 10px;
}

footer a {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #6a4aaa;
  text-decoration: none;
}

footer a:hover {
  color: #c8a0ff;
}

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

@media (max-width: 680px) {
  #canvas {
    border-width: 2px;
  }
}