/* ═══════════════════════════════════════════════════════════
   CYBER_OPS — ANIMATIONS & KEYFRAMES
   ═══════════════════════════════════════════════════════════ */

/* ─── Radar Sweep ─── */
@keyframes radar-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── Radar Blip ─── */
@keyframes blip-pulse {
  0%, 100% { opacity: 0.9; }
  40%       { opacity: 0.15; }
  70%       { opacity: 0.8; }
}
.radar-blip {
  animation: blip-pulse 2.5s ease-in-out infinite;
}

/* ─── Glitch Text ─── */
@keyframes glitch-main {
  0%,  87%, 100% { clip-path: none; transform: none; }
  88%  { clip-path: inset(18% 0 52% 0); transform: translateX(-5px) skewX(-3deg); }
  89%  { clip-path: inset(65% 0 8%  0); transform: translateX(5px)  skewX(2deg);  }
  90%  { clip-path: inset(40% 0 30% 0); transform: translateX(-2px); }
  91%  { clip-path: none; transform: none; }
  94%  { clip-path: inset(22% 0 44% 0); transform: translateX(3px); }
  95%  { clip-path: none; transform: none; }
}
@keyframes glitch-before {
  0%, 87%, 100% { opacity: 0; }
  88%  { opacity: 0.7; clip-path: inset(65% 0 8%  0); transform: translateX(6px); }
  89%  { opacity: 0.5; clip-path: inset(18% 0 52% 0); transform: translateX(-4px); }
  90%  { opacity: 0; }
  94%  { opacity: 0.6; clip-path: inset(40% 0 30% 0); transform: translateX(-5px); }
  95%  { opacity: 0; }
}
@keyframes glitch-after {
  0%, 88%, 100% { opacity: 0; }
  89%  { opacity: 0.5; clip-path: inset(30% 0 45% 0); transform: translateX(4px); }
  90%  { opacity: 0; }
  95%  { opacity: 0.4; clip-path: inset(60% 0 12% 0); transform: translateX(-3px); }
  96%  { opacity: 0; }
}

.glitch-text          { animation: glitch-main   10s infinite; }
.glitch-text::before  { animation: glitch-before 10s 0.08s infinite; }
.glitch-text::after   { animation: glitch-after  10s 0.16s infinite; }

/* Faster glitch on admin title */
.glitch-text.glitch-fast          { animation-duration: 4s; }
.glitch-text.glitch-fast::before  { animation-duration: 4s; }
.glitch-text.glitch-fast::after   { animation-duration: 4s; }

/* ─── DOT Pulse (live indicator, threat, status) ─── */
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

/* ─── Node Active Pulse ─── */
@keyframes node-active-pulse {
  0%, 100% { box-shadow: 0 0  6px rgba(255, 26, 26, 0.4); border-color: #ff1a1a; }
  50%       { box-shadow: 0 0 18px rgba(255, 26, 26, 0.9); border-color: #ff5555; }
}

/* ─── Button Ready Pulse ─── */
@keyframes btn-ready-pulse {
  0%, 100% { box-shadow: 0 0  8px rgba(255, 26, 26, 0.3); }
  50%       { box-shadow: 0 0 28px rgba(255, 26, 26, 0.7); }
}

/* ─── Warning Pulse (admin page) ─── */
@keyframes warning-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255,26,26,0.3), inset 0 0 20px rgba(255,26,26,0.04);
    border-color: rgba(255,26,26,0.5);
  }
  50% {
    box-shadow: 0 0 60px rgba(255,26,26,0.7), inset 0 0 40px rgba(255,26,26,0.1);
    border-color: #ff1a1a;
  }
}

/* ─── Shake (wrong code) ─── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%  { transform: translateX(-8px); }
  30%  { transform: translateX(8px); }
  45%  { transform: translateX(-5px); }
  60%  { transform: translateX(5px); }
  75%  { transform: translateX(-2px); }
  90%  { transform: translateX(2px); }
}

/* ─── Flash Overlay ─── */
@keyframes flash-in {
  0%   { opacity: 0; }
  12%  { opacity: 0.45; }
  100% { opacity: 0; }
}

/* ─── Panel Slide In (level reveal) ─── */
@keyframes panel-slide-in {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: brightness(0.2) drop-shadow(0 0 0 rgba(255,26,26,0));
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1) drop-shadow(0 0 10px rgba(255,26,26,0.15));
  }
}

/* ─── Mission Complete Entry ─── */
@keyframes complete-entry {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* ─── Badge Appear ─── */
@keyframes badge-appear {
  from { opacity: 0; transform: translateY(24px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ─── Ring Expand (complete background ring) ─── */
@keyframes ring-expand {
  0%   { transform: scale(0.5); opacity: 0.7; }
  100% { transform: scale(4);   opacity: 0; }
}

/* ─── Particle Fly ─── */
@keyframes particle-fly {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0.2); opacity: 0; }
}

/* ─── Typing Cursor ─── */
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #ff1a1a;
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.75s step-end infinite;
}

/* ─── Admin terminal cursor ─── */
@keyframes terminal-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.terminal-cursor-blink {
  font-family: 'Share Tech Mono', monospace;
  color: #ff1a1a;
  animation: terminal-cursor 1s step-end infinite;
}

/* ─── Status bar subtle flicker ─── */
@keyframes bar-flicker {
  0%, 94%, 100% { opacity: 1; }
  95%            { opacity: 0.65; }
  97%            { opacity: 0.9; }
}
.bar-fill {
  animation: bar-flicker 4s ease-in-out infinite;
}
