/* ============================================================
   Helix Games — Shared Canvas Theme
   Common styling for any game's main <canvas>. Add class="game-canvas"
   to the canvas element; per-game overrides (custom background gradients,
   different sizes) can still target the canvas by id with higher specificity.
   ============================================================ */

.game-canvas {
  background: #000000;
  border: 3px solid var(--helix-primary);
  display: block;
  margin: 20px auto;
  box-shadow: 0 0 20px rgba(60, 210, 165, 0.1);
  max-width: 100%;
}

@media (max-width: 768px) {
  .game-canvas {
    height: auto;
  }
}

/* ── Shared mobile touch controls ─────────────────────────────
   Several action games (star-fleet, star-invaders, etc.) render a
   touch-control bar on mobile. Keep the styling here so it is consistent;
   games can still add game-specific buttons by extending `.mobile-btn`.
   ============================================================ */

.mobile-controls {
  display: none;
  margin: 20px auto 0;
  padding: 20px;
  background: var(--helix-bg-card);
  border-radius: 12px;
  max-width: 400px;
}

.mobile-controls-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.mobile-btn {
  background: var(--helix-primary);
  color: #000;
  border: none;
  padding: 20px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  box-shadow: 0 4px 10px rgba(60, 210, 165, 0.3);
  transition: transform 0.1s, box-shadow 0.1s;
  min-width: 80px;
  min-height: 80px;
}

.mobile-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 5px rgba(60, 210, 165, 0.5);
}

.mobile-btn-move {
  background: rgba(60, 210, 165, 0.3);
  color: var(--helix-primary);
  border: 2px solid var(--helix-primary);
}

.mobile-btn-fire {
  background: var(--helix-primary);
  color: #000;
  font-size: 18px;
  flex: 1;
  max-width: 150px;
}

@media (max-width: 768px) {
  .mobile-controls {
    display: block;
  }
}
