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

body {
  background: #0a0a0a;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  font-family: 'Creepster', cursive;
  touch-action: none;
}

#canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: none;
}

#footer-link {
  position: fixed;
  bottom: 6px;
  right: 10px;
  z-index: 100;
  opacity: 0.25;
  transition: opacity 0.3s;
}

#footer-link:hover {
  opacity: 0.7;
}

#footer-link a {
  color: #4a6fa5;
  text-decoration: none;
  font-family: 'Griffy', cursive;
  font-size: 12px;
}

#mobile-controls {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}

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

.dpad-btn {
  width: 58px;
  height: 58px;
  background: rgba(74, 111, 165, 0.25);
  border: 2px solid rgba(74, 111, 165, 0.5);
  border-radius: 12px;
  color: rgba(200, 210, 230, 0.7);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.dpad-btn:active {
  background: rgba(74, 111, 165, 0.5);
  border-color: rgba(74, 111, 165, 0.8);
}

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

@media (max-width: 600px) {
  #mobile-controls {
    display: flex;
  }
}