/* Power — see power.js. */

/* The dark: above the canvas, below the console screens (5) and HUD (20). */
.pw-dark {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

/* The console's main screen, left bright while everything around it is
   darkened by this element's spread shadow (set in power.js). */
.pw-hole {
  position: fixed;
  z-index: 4;
  pointer-events: none;
  border-radius: 2.5%;
  display: none;
}

/* Pulsing glow on the main screen while the lab is dark. It sits on the
   glass itself and "screen"-blends, so it brightens what's under it:
   the glass glows from within and its light spills out over the bezel
   and the wall, rather than shining from behind the frame. */
.pw-halo {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  border-radius: 1.5%;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse at 50% 50%, rgba(120, 255, 255, 0.35), rgba(80, 220, 235, 0.12) 75%);
  box-shadow:
    inset 0 0 30px 6px rgba(160, 255, 255, 0.35),
    0 0 26px 6px rgba(110, 245, 255, 0.45),
    0 0 90px 30px rgba(70, 210, 235, 0.25);
  animation: pw-pulse 2.2s ease-in-out infinite;
}
@keyframes pw-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-halo { animation: none; opacity: 0.85; }
}

.pw-note {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  z-index: 21;
  max-width: min(90vw, 560px);
  padding: 10px 22px;
  border-radius: 999px;
  background: #0f0d19e0;
  border: 1.5px solid rgba(255, 233, 150, 0.45);
  color: #fff;
  font-family: "Londrina Solid", system-ui, sans-serif;
  font-size: clamp(16px, 2vw, 21px);
  letter-spacing: 0.04em;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.pw-note.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* While dark, the hub's own "Tap to walk" hint would sit under the
   note; the note says where to go instead. */
html.lab-dark .hub-hint {
  display: none;
}

/* Carrot's speech bubble (carrot.js): tail points down at his head. */
.carrot-bubble {
  position: absolute;
  z-index: 6;
  transform: translate(-50%, calc(-100% - 14px)) scale(0.85);
  transform-origin: 50% 100%;
  max-width: min(320px, 60vw);
  padding: 12px 18px;
  border-radius: 18px;
  background: #fff;
  border: 3px solid #1a1626;
  color: #1a1626;
  font-family: "Londrina Solid", system-ui, sans-serif;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.15;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.carrot-bubble.is-on {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 14px)) scale(1);
}
.carrot-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-right: 3px solid #1a1626;
  border-bottom: 3px solid #1a1626;
  transform: translateX(-50%) rotate(45deg) scaleY(0.75);
}
