/* Block: game — the fixed 256 x 240 game area, centred and scaled */

.game {
  --game-scale: 1;

  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--game-width);
  height: var(--game-height);
  overflow: hidden;
  background: var(--color-black);
  color: var(--color-white);
  font-family: "DotGothic16", monospace;
  font-size: 12px;
  line-height: 16px;
  transform: translate(-50%, -50%) scale(var(--game-scale));
  transform-origin: center;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

/* White flash over the whole game when a monster is defeated */
.game__flash {
  position: absolute;
  z-index: 30;
  inset: 0;
  background: var(--color-white);
  opacity: 0;
  pointer-events: none;
}

.game__flash--active {
  animation: game-flash 0.3s steps(1, end);
}

@keyframes game-flash {
  0%,
  33% {
    opacity: 0.9;
  }

  16%,
  50%,
  100% {
    opacity: 0;
  }
}
