/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  background: #000;
  overflow: hidden;
  font-family: 'Press Start 2P', monospace;
  color: #00ff41;
}

/* Game container */
#game-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Canvas pixel-perfect rendering */
#game-container canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: 0 0 20px #00ff4140, 0 0 60px #00ff4120;
}

/* CRT scanline overlay on container */
#game-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 10;
}

/* Touch controls — hidden by default */
#touch-controls {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  justify-content: space-around;
  align-items: center;
  pointer-events: none;
  z-index: 20;
  background: rgba(0, 0, 0, 0.4);
}

/* Touch buttons */
#touch-controls button {
  width: 70px;
  height: 70px;
  background: #00ff4140;
  border: 2px solid #00ff41;
  color: #00ff41;
  border-radius: 50%;
  font-size: 24px;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
}

#touch-controls button:active {
  background: #00ff4180;
}

/* Show touch controls on mobile */
@media (max-width: 768px) {
  #touch-controls {
    display: flex;
  }
}

/* No-canvas fallback */
#no-canvas-fallback {
  color: #00ff41;
  text-align: center;
  padding: 40px;
  font-size: 14px;
  line-height: 2;
}