/* Neon dark theme. Works on desktop and phone. */

:root {
  --bg: #05060a;
  --panel: #0a0e1a;
  --neon-cyan: #00f5ff;
  --neon-pink: #ff2d95;
  --neon-amber: #ffd84d;
  --text: #c8d4ff;
  --text-dim: #7f8db8;
}

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

html, body {
  height: 100%;
  background: radial-gradient(circle at 50% 0%, #0c1226 0%, var(--bg) 70%);
  color: var(--text);
  font-family: "Courier New", monospace;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  padding: 8px;
}

#stage {
  position: relative;
}

canvas#game {
  display: block;
  background: #05060a;
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: 8px;
  box-shadow:
    0 0 24px rgba(0, 245, 255, 0.25),
    0 0 60px rgba(255, 45, 149, 0.12);
  image-rendering: pixelated;
}

/* Touch controls overlay (phone) */
#touch-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
}

body.touch #touch-controls {
  display: block;
}

.tc-btn {
  position: absolute;
  pointer-events: auto;
  border: 1px solid rgba(0, 245, 255, 0.6);
  background: rgba(0, 20, 30, 0.4);
  color: var(--neon-cyan);
  font-family: "Courier New", monospace;
  font-size: 18px;
  font-weight: bold;
  border-radius: 10px;
  min-width: 56px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.4);
  user-select: none;
  -webkit-user-select: none;
}

.tc-btn:active {
  background: rgba(0, 245, 255, 0.25);
}

.tc-up    { top: 12px;    left: 50%; transform: translateX(-50%); }
.tc-left  { top: 50%;      left: 12px;  transform: translateY(-50%); }
.tc-right { top: 50%;      right: 12px; transform: translateY(-50%); }
.tc-down  { bottom: 12px;  left: 50%; transform: translateX(-50%); }
.tc-fire  { bottom: 12px;  right: 12px; width: 72px; height: 56px; }
.tc-pause { top: 12px;     right: 12px; width: 48px; height: 40px; }

/* footer hint */
#hint {
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
  text-align: center;
}

#hint b { color: var(--neon-cyan); }

/* make sure small phones still get a playable size */
@media (max-width: 600px) {
  canvas#game {
    border-radius: 6px;
  }
  .tc-btn {
    min-width: 50px;
    min-height: 50px;
    font-size: 16px;
  }
}
