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

html, body { overflow: hidden; }

#game {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  padding-top: max(10px, env(safe-area-inset-top));
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
}

.timer {
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f3ecdf;
  min-width: 3.4ch;
}
.timer.urgent { color: #ff6b6b; animation: pulse 1s steps(2) infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

.keys { display: flex; gap: 5px; }
.keybit {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(127, 227, 196, 0.45);
}
.keybit.got { background: #7fe3c4; border-color: #7fe3c4; }

.round-no { margin-left: auto; font-size: 0.78rem; color: #9d8bb5; }

.role {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #b9a8cf;
}
/* The person actually in the maze gets the loud label, because they are the
   one who has to do what they are told. */
.role.runner { color: #ffd23f; }

.stage { position: relative; flex: 1; min-height: 0; }

#view {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 14px;
  background: #120d1c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  touch-action: none;
}

.hud-banner, .between {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}
.hud-banner { top: 16%; }
.hud-banner b { font-size: clamp(1.5rem, 7vw, 2.4rem); color: #ffd23f; text-shadow: 0 3px 16px rgba(0,0,0,0.8); }
.hud-banner span { font-size: 0.9rem; color: #f3ecdf; text-shadow: 0 2px 8px rgba(0,0,0,0.8); }

.between {
  inset: 0;
  transform: none;
  justify-content: center;
  border-radius: 14px;
  background: rgba(18, 13, 28, 0.9);
  pointer-events: auto;
  gap: 8px;
}
.between b { font-size: clamp(1.8rem, 8vw, 2.6rem); color: #ffd23f; }
.between span { font-size: 1rem; color: #cbbfe0; margin-bottom: 12px; }
.between .big { width: auto; padding: 13px 26px; }

.ping-note { text-align: center; font-size: 0.76rem; color: #8d7da5; }

/* thumb pad, shown to whoever is in the maze */
.pad {
  position: relative;
  width: 156px;
  height: 156px;
  margin: 0 auto;
  flex-shrink: 0;
}
.pad-btn {
  position: absolute;
  width: 52px;
  height: 52px;
  font-size: 1rem;
  color: #cbbfe0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  cursor: pointer;
}
.pad-btn:active { background: rgba(255, 210, 63, 0.35); color: #241a10; }
.pad-btn.up { top: 0; left: 52px; }
.pad-btn.down { bottom: 0; left: 52px; }
.pad-btn.left { top: 52px; left: 0; }
.pad-btn.right { top: 52px; right: 0; }

.rules { line-height: 1.55; }
.rules b { color: #ffd23f; }

.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.15rem; color: #ffd076; }

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