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

body {
  background: #0a0a0f;
  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;
  border: 3px solid #333;
  border-radius: 2px;
  box-shadow: 
    0 0 20px rgba(180, 50, 255, 0.3),
    0 0 60px rgba(180, 50, 255, 0.1),
    inset 0 0 30px rgba(0,0,0,0.5);
  max-width: 100vw;
  max-height: calc(100vh - 120px);
}

#mobile-controls {
  display: none;
  width: 100%;
  max-width: 600px;
  padding: 8px 16px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

#mobile-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#mobile-right {
  display: flex;
  align-items: center;
}

.mobile-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  padding: 14px 22px;
  border: 2px solid #b432ff;
  background: rgba(180, 50, 255, 0.2);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: background 0.1s;
}

.mobile-btn:active {
  background: rgba(180, 50, 255, 0.6);
}

.fire-btn {
  padding: 28px 32px;
  font-size: 16px;
  border-color: #ff4444;
  background: rgba(255, 50, 50, 0.2);
}

.fire-btn:active {
  background: rgba(255, 50, 50, 0.6);
}

@media (max-width: 768px), (pointer: coarse) {
  #mobile-controls {
    display: flex;
  }
}

footer {
  margin-top: 12px;
  padding: 8px;
}

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

footer a:hover {
  color: #b432ff;
}

/* Scanline overlay */
#canvas::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.1) 0px,
    rgba(0,0,0,0.1) 1px,
    transparent 1px,
    transparent 3px
  );
}