/* Air Hockey. Panels, buttons, the top bar and toasts come from
   ../shared/arcade.css, linked first in index.html. */

html, body { overflow: hidden; }

#game { position: fixed; inset: 0; }

#view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;   /* the whole table is the control surface */
  cursor: crosshair;
}

/* The HUD floats over the table, so none of it may swallow a drag. */
.hud, .hud-banner { pointer-events: none; }
.hud .hud-btn { pointer-events: auto; }

.topbar.hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  gap: 10px;
}

.scores { display: flex; gap: 8px; }
.sc {
  display: flex;
  align-items: baseline;
  gap: 7px;
  background: rgba(20, 14, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 13px;
}
.sc i { font-style: normal; font-size: 0.82rem; color: #cbbfe0; }
.sc b { font-size: 1.25rem; color: #ffd23f; font-variant-numeric: tabular-nums; }
.sc.me { border-color: rgba(255, 208, 118, 0.55); }

.target { margin-left: auto; font-size: 0.8rem; color: #b9a8cf; white-space: nowrap; }

.hud-banner {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hud-banner b {
  font-size: clamp(2rem, 9vw, 3.4rem);
  color: #ffd23f;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.75);
}
.hud-banner span { font-size: 0.95rem; color: #f3ecdf; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }

.final { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.final-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.final-row b { font-size: 1.3rem; color: #ffd076; }

@media (max-width: 430px) {
  #game .topbar { flex-wrap: wrap; }
}
