/* Styles propres à Hex Breaker.
   Les couleurs néon (rose/cyan/jaune) sont fonctionnelles — elles
   permettent d'associer un projectile à l'arc qu'il détruit — donc
   elles restent fixes et ne suivent pas le thème clair/sombre du
   site. Seul l'habillage (panneau, barre de ralenti) suit le thème. */

.hb-panel {
  padding: 0;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 82vh;
  min-height: 420px;
  max-height: 860px;
  background: #07080c;
  cursor: crosshair;
}

kbd {
  background: var(--cell-alt);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
  font-size: 0.85em;
  color: var(--accent);
}

.hb-slow-stat {
  min-width: 150px;
}

.hb-slow-bar-container {
  display: block;
  width: 100%;
  height: 8px;
  background: var(--cell-alt);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.hb-slow-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: #00ffcc;
  transition: width 0.1s linear;
}

/* ---------- Commandes tactiles (téléphone, tablette) ---------- */
#gameCanvas { touch-action: none; }

.hb-touch {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #07080c;
  border-top: 2px solid #2a2c35;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.hb-swatches { display: flex; gap: 12px; }

.hb-swatch {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 4px solid #07080c;
  border-radius: 0;
  outline: 2px solid #2a2c35;
  opacity: 0.45;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.12s, transform 0.12s;
}

.hb-swatch.is-current {
  opacity: 1;
  outline: 3px solid #ffffff;
  transform: scale(1.08);
}

.hb-slow-btn {
  flex: 0 1 auto;
  min-height: 56px;
  padding: 0 18px;
  border: 3px solid #ffffff;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  touch-action: none;
}

.hb-slow-btn:active { background: #ffffff; color: #07080c; }

@media (hover: none) and (pointer: coarse) {
  .hb-touch { display: flex; }
  #gameCanvas { height: 58vh; min-height: 300px; }
}
