/* Odd One Out — game stage, HUD, feedback and toast animation styles. */

#gameStage {
  position: relative;
  width: min(92vw, 900px);
  height: min(70vh, 700px);
  min-height: 380px;
  margin: 10px auto 6px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Fullscreen mode: the stage expands to fill the whole screen. Browsers
   don't do this automatically for an arbitrary fullscreened element, so
   it's spelled out explicitly here. */
#gameStage:fullscreen,
#gameStage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
}
#gameStage:fullscreen #board,
#gameStage:-webkit-full-screen #board {
  border-radius: 0;
}

#board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

#hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-hi);
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
#hud .hud-group { display: flex; align-items: center; gap: 14px; }
#hud .hud-item { display: flex; flex-direction: column; align-items: center; min-width: 40px; }
#hud .hud-item .hud-label { font-size: 9px; color: var(--text-dim); letter-spacing: 0.08em; }
#hudCombo { color: var(--accent-pink); }
#hudLives { color: var(--danger); letter-spacing: 2px; }
#hudTimer { color: var(--accent-cyan); }

.feedback-text {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(20px, 5vw, 32px);
  letter-spacing: 0.08em;
  color: var(--text-hi);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.feedback-text.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.1s ease, transform 0.1s ease;
}
.feedback-text.good { color: var(--good); text-shadow: 0 0 24px rgba(88, 255, 176, 0.6); }
.feedback-text.bad { color: var(--danger); text-shadow: 0 0 24px rgba(255, 93, 108, 0.6); }

@media (prefers-reduced-motion: reduce) {
  .feedback-text { transition: opacity 0.1s linear; }
  .feedback-text.show { transform: translate(-50%, -50%) scale(1); }
}

#countdownOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 64px;
  color: var(--accent-cyan);
  background: rgba(4, 6, 13, 0.55);
  z-index: 4;
  text-shadow: 0 0 30px rgba(79, 216, 255, 0.6);
}

/* Start / Game Over / Leaderboard overlays — sit on top of the canvas
   itself, inside #gameStage, so their buttons are always visible on
   screen together with the board instead of requiring a scroll past an
   empty canvas to reach them. */
.screen-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
  background: rgba(4, 6, 13, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  width: min(90vw, 380px);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(16, 22, 42, 0.92);
  border: 1px solid var(--panel-border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast .toast-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 3px;
}
#toast .toast-body { font-size: 13px; color: var(--text-hi); }

@media (max-width: 600px) {
  #hud { font-size: 11px; padding: 10px 12px; }
  #hud .hud-group { gap: 10px; }
}
