/* Atomobrik – only what is special to this game (the shared box is css/game-stage.css). */

/* The playfield is tall like the original's, so on a phone held upright the box is taller
   than the usual 16:9 and the field gets bigger (see "Game pages = ONE SCREEN" in CLAUDE.md). */
@media (max-aspect-ratio: 1 / 1) {
  .stage {
    --aspect: 3 / 4;
  }
}

#game {
  outline: none;                 /* the canvas takes keyboard focus; no blue ring on the first click */
  -webkit-tap-highlight-color: transparent;
  cursor: none;                  /* the bat is the pointer */
}

.stage .overlay p {
  white-space: pre-line;         /* the result screen writes its lines with \n */
}

/* The drawn title on the start screen. It is pixel art with hard edges (alpha is only 0 or
   255), so it is never smoothed - the same rule as the sprites, docs/ATOMOBRICK_SPRITES.md.
   20rem is its own 256 px x 1.25: the overlay's zoom (--ui) goes down to 0.8 in a low box, so
   even there it is drawn at least pixel for pixel. Scaled DOWN, nearest neighbour would drop
   rows and eat the thin neon outlines. */
#overlay-logo {
  width: min(20rem, 86%);
  height: auto;
  margin-bottom: 0.7rem;
  image-rendering: pixelated;
}

/* The hidden test menu: one small button per level, ten to a row. */
.level-menu-note {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--yellow, #ffe94d);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(10, 2.3rem);
  gap: 0.3rem;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.level-grid button {
  height: 2rem;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: #eef4ff;
  background: rgba(79, 232, 255, 0.14);
  border: 1px solid rgba(79, 232, 255, 0.6);
  cursor: pointer;
}

.level-grid button:hover,
.level-grid button:focus-visible {
  background: rgba(79, 232, 255, 0.35);
  outline: none;
}

.level-grid button.has-bubbles {
  border-color: #ffe94d;             /* the rounds with the bubble stand out a little */
}

/* A phone held upright: five to a row. */
@media (max-width: 480px) {
  .level-grid {
    grid-template-columns: repeat(5, 2.3rem);
  }
}

/* Test mode's pause screen: the nine capsules as buttons, low in the box (the middle says
   "Paus"). The box is placed by us, so only its contents zoom with the box (--ui). */
.test-capsules {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: calc(0.35rem * var(--ui, 1));
  justify-content: center;
}

.test-capsules[hidden] {
  display: none;
}

.test-capsules button {
  padding: calc(0.4rem * var(--ui, 1)) calc(0.6rem * var(--ui, 1));
  font: inherit;
  font-size: calc(0.85rem * var(--ui, 1));
  font-weight: 700;
  color: #eef4ff;
  background: #10062a;
  border: calc(2px * var(--ui, 1)) solid var(--capsule);
  cursor: pointer;
}

.test-capsules button:hover,
.test-capsules button:focus-visible {
  background: #2a1450;
  outline: none;
}
