/* RABLA — css/minigames.css (Phase 5, L3): the MINIGAME results overlay (PHASE5_SPEC §4).
   The minigames themselves draw on #game through WM.minigame.draw (render.js branch); only the
   results card is DOM. `#screen-minigame` is created lazily by js/minigames/minigame.js inside #ui
   (before #toasts) — not a `.screen`, like the galaxy overlay, so WM.ui.current stays null. */

.minigame-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 16, 48, .42);
  font-family: var(--font);
  color: var(--text);
}
.minigame-overlay.hidden { display: none !important; }

.panel.mg-results {
  width: 520px;
  gap: 10px;
  text-align: center;
  animation: mg-pop .35s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes mg-pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.panel.mg-results > h2 { margin: 0; color: var(--yellow); letter-spacing: 2px; }
.panel.mg-results .sub { margin: -6px 0 4px; color: var(--muted); font-size: 14px; }

.mg-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .25);
  border: 2px solid rgba(255, 255, 255, .08);
}
.mg-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  padding: 2px 4px;
}
.mg-row .label { color: var(--muted); letter-spacing: 1px; }
.mg-row .value { color: var(--text); font-weight: bold; }
.mg-row .tag { color: var(--dim); font-size: 12px; margin-left: 8px; font-weight: normal; }
.mg-row.hi .value { color: var(--cyan); }

.mg-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 16px;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--muted);
}
.mg-total .score { font-size: 40px; color: var(--yellow); text-shadow: 0 3px 0 var(--ink); }

.mg-best { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 28px; font-size: 14px; color: var(--muted); }
.mg-best .newbest {
  background: var(--green);
  color: var(--green-ink);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 2px 10px;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 1px;
  animation: mg-wiggle .6s ease-in-out infinite alternate;
}
@keyframes mg-wiggle { from { transform: rotate(-3deg) scale(1); } to { transform: rotate(3deg) scale(1.06); } }

.mg-cores {
  font-size: 16px;
  font-weight: bold;
  color: var(--cyan);
  min-height: 22px;
}
.mg-cores.capped { color: var(--orange-lt); font-size: 13px; font-weight: normal; }

.panel.mg-results .buttons { display: flex; justify-content: center; gap: 12px; margin-top: 4px; }
.panel.mg-results .hint { margin: 0; font-size: 12px; color: var(--dim); }

/* the canvas cursor while a minigame runs (drag to aim / hold to charge) */
body.minigame-active #game { cursor: crosshair; }
