/* ==========================================================================
   SIGMATECH // GUARDIAN — 07 STATS scene styles
   Decrypt pulse + cipher-state styling. Base panel/grid styles in style.css.
   ========================================================================== */

/* smooth hand-off from dim cipher to full phosphor green */
.stat-value { transition: color 0.25s ease-out; }

/* value while still encrypted (pre-reveal cipher state) */
.stat-value.is-scrambled {
  color: rgba(0, 255, 136, 0.38);
  text-shadow: none;
}

/* 1px green border-glow pulse while a stat is mid-decrypt */
.stat-panel.is-decrypting {
  border-color: var(--green);
  animation: stat-decrypt-pulse 0.55s ease-in-out infinite;
}
@keyframes stat-decrypt-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(0, 255, 136, 0),
      inset 0 0 0 0 rgba(0, 255, 136, 0);
  }
  50% {
    box-shadow:
      0 0 10px 1px rgba(0, 255, 136, 0.3),
      inset 0 0 9px 0 rgba(0, 255, 136, 0.1);
  }
}

/* quick amber pop on the LED when a locked stat is re-keyed */
.stat-panel .stat-led.is-flash {
  animation: stat-led-flash 0.38s ease-out;
}
@keyframes stat-led-flash {
  0%   { background: var(--amber); box-shadow: 0 0 16px 4px rgba(255, 176, 0, 0.95); }
  100% { background: var(--amber); box-shadow: 0 0 8px 0 rgba(255, 176, 0, 0.7); }
}

/* value pops once each time its panel locks green */
.stat-panel.is-locked .stat-value {
  animation: stat-value-lock 0.32s ease-out;
}
@keyframes stat-value-lock {
  0%   { text-shadow: 0 0 18px rgba(0, 255, 136, 0.85); }
  100% { text-shadow: 0 0 0 rgba(0, 255, 136, 0); }
}

/* honor reduced motion (main.js sets html.reduced-motion in static mode) */
.reduced-motion .stat-panel.is-decrypting,
.reduced-motion .stat-panel .stat-led.is-flash,
.reduced-motion .stat-panel.is-locked .stat-value {
  animation: none;
}
.reduced-motion .stat-value { transition: none; }
