/* === intermission.css ===
 * The between-events "waiting room" overlay (see js/ui/intermission.js).
 * A dark scrim lets the animated gradient stage bleed through (colorful but
 * legible in a dim theater); the popcorn mascot rises from the ground line.
 *
 * Sits just below the points counter so the running score + 3-dot menu stay
 * visible on top during the wait.
 */

.intermission {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-counter) - 1); /* over feed cards, under points counter */

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;

  /* Dark vignette scrim — the gradient stage shows through the translucency. */
  background: radial-gradient(120% 85% at 50% 62%, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.84));
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
}

.intermission__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

/* The "stage": sprite is anchored to the bottom (the ground line). */
.intermission__stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: min(46vh, 280px);
}

.intermission__sprite {
  height: 100%;
  width: auto;
  max-width: 80vw;
  object-fit: contain;
  transform-origin: bottom center; /* rise/flatten grow from the ground */
  will-change: transform, opacity;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55));
}

.intermission__label {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 5vw, 26px);
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
  /* Gentle idle pulse so the wait feels alive (transform/opacity only). */
  animation: intermission-pulse 1.6s var(--ease-smooth) infinite;
}

@keyframes intermission-pulse {
  0%, 100% { opacity: 0.85; transform: translateY(0); }
  50%      { opacity: 1; transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .intermission {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .intermission__label { animation: none; }
}
