/* 4 i rad page – the game box itself is in css/game-stage.css, the look shared with the other robot games
   (names at the top, bubbles, menus, big text, back button) in css/holo-games.css. The board is drawn on the canvas. */

/* Phones held upright: a taller box, so the board can be bigger */
@media (max-aspect-ratio: 1/1) {
  .stage {
    --aspect: 4 / 5;
  }
}

/* Upp och ner: the board turns within 2 discs – the mode label turns yellow and pulses */
.fir-mode-label.is-soon {
  color: var(--yellow);
  opacity: 1;
  animation: fir-soon 0.8s ease-in-out infinite alternate;
}

@keyframes fir-soon {
  from { text-shadow: 0 0 0 transparent; }
  to { text-shadow: 0 0 10px rgba(255, 233, 77, 0.9); }
}

/* ---------- Superbrickor: the buttons under each name ---------- */

.fir-powers {
  display: flex;
  gap: 0.3rem;
  pointer-events: auto;
}

.fir-powers[hidden] {
  display: none;
}

.fir-power {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  color: var(--magenta);
  background: rgba(14, 10, 36, 0.75);
  border: 2px solid currentColor;
  cursor: pointer;
}

#powers-2 .fir-power {
  color: var(--yellow);
}

.fir-power svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.fir-power:disabled {
  cursor: default;
  opacity: 0.45;
}

/* Used up: very faint, crossed out */
.fir-power.is-used {
  opacity: 0.15;
  background: linear-gradient(to top right, transparent 47%, currentColor 47% 53%, transparent 53%), rgba(14, 10, 36, 0.75);
}

/* Picked for the next drop */
.fir-power.is-armed {
  color: #0e0a24;
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(94, 240, 255, 0.8);
  opacity: 1;
}

/* With buttons under the names, the speech bubbles move down */
.stage.is-super .holo-bubble-1,
.stage.is-super .holo-bubble-2 {
  top: calc(7.2rem * var(--ui, 1) + var(--safe-top));
}

@media (max-width: 560px) {
  .fir-powers {
    gap: 0.2rem;
  }
  .fir-power {
    width: 1.7rem;
    height: 1.7rem;
  }
  .fir-power svg {
    width: 1.1rem;
    height: 1.1rem;
  }
  .stage.is-super .holo-bubble-1,
  .stage.is-super .holo-bubble-2 {
    top: calc(8.6rem + var(--safe-top));
  }
}

/* You chose yellow: the power buttons swap colours too (the names' dots: css/holo-games.css) */
.colors-swapped #powers-1 .fir-power {
  color: var(--yellow);
}

.colors-swapped #powers-2 .fir-power {
  color: var(--magenta);
}
