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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a1a0a;
  font-family: 'JetBrains Mono', monospace;
}

#canvas {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#mobile-controls {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 100;
  opacity: 0.5;
}

.dpad-mid {
  display: flex;
  gap: 4px;
}

.dpad-btn {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

.dpad-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

#footer {
  position: fixed;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
}

#footer a {
  color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

#footer a:hover {
  color: rgba(255, 255, 255, 0.5);
}

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