/* ═══════════════════════════════════════════════════════════════
   Scanner background — minimal, matches dashboard aesthetic
   ═══════════════════════════════════════════════════════════════ */

.scanner-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* NO solid background — let the global network-constellation canvas + aurora show through.
     Only the subtle grid overlay (via ::before) renders on top of the canvas. */
}

/* Same grid as dashboard .soft-grid */
.scanner-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  transform: translateZ(0);
}

/* ─── Status bar (bottom-left) ───────────────────────────────── */
.scanner-bg__status {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 5;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
  color: rgba(239, 68, 68, 0.55);
  letter-spacing: 0.04em;
  user-select: none;
  white-space: nowrap;
  pointer-events: none;
}

.scan-dot {
  animation: blink 1.2s infinite;
  color: #ef4444;
}

@keyframes blink {
  0%,  50%  { opacity: 1;   }
  51%, 100% { opacity: 0.2; }
}

#pair-cycle {
  transition: opacity 0.2s ease;
  display: inline-block;
  min-width: 90px;
}

/* ─── Content elevation above background ────────────────────── */
.scanner-content {
  position: relative;
  z-index: 10;
}

/* ─── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .scan-dot { animation: none; }
}

/* ─── Rocket easter egg ──────────────────────────────────────── */
.rocket-easter-egg {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9;
  display: flex;
  align-items: center;
  opacity: 0;
  animation-duration: 4.2s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}

.rocket-trail {
  display: inline-block;
  width: 52px;
  height: 3px;
  border-radius: 2px;
  margin-right: 3px;
  align-self: center;
  background: linear-gradient(to left, rgba(255,100,0,0.55), transparent);
}

.rocket-easter-egg > span:last-child {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255,120,0,0.75));
}

.rocket-easter-egg--bl-tr { animation-name: rocket-bl-to-tr; }
.rocket-easter-egg--tl-br { animation-name: rocket-tl-to-br; }
.rocket-easter-egg--br-tl { animation-name: rocket-br-to-tl; }
.rocket-easter-egg--tr-bl { animation-name: rocket-tr-to-bl; }

@keyframes rocket-bl-to-tr {
  0%   { opacity: 0;    transform: translate(-128px, calc(100vh + 64px)) rotate(45deg);  }
  10%  { opacity: 0.42; transform: translate(8vw, calc(100vh - 22vh))    rotate(45deg);  }
  90%  { opacity: 0.42; transform: translate(calc(100vw - 12vw), 22vh)   rotate(45deg);  }
  100% { opacity: 0;    transform: translate(calc(100vw + 128px), -64px) rotate(45deg);  }
}

@keyframes rocket-tl-to-br {
  0%   { opacity: 0;    transform: translate(-128px, -64px)                            rotate(-45deg); }
  10%  { opacity: 0.42; transform: translate(8vw, 22vh)                                rotate(-45deg); }
  90%  { opacity: 0.42; transform: translate(calc(100vw - 12vw), calc(100vh - 22vh))   rotate(-45deg); }
  100% { opacity: 0;    transform: translate(calc(100vw + 128px), calc(100vh + 64px))  rotate(-45deg); }
}

@keyframes rocket-br-to-tl {
  0%   { opacity: 0;    transform: translate(calc(100vw + 128px), calc(100vh + 64px)) rotate(135deg); }
  10%  { opacity: 0.42; transform: translate(calc(100vw - 12vw), calc(100vh - 22vh))  rotate(135deg); }
  90%  { opacity: 0.42; transform: translate(8vw, 22vh)                               rotate(135deg); }
  100% { opacity: 0;    transform: translate(-128px, -64px)                           rotate(135deg); }
}

@keyframes rocket-tr-to-bl {
  0%   { opacity: 0;    transform: translate(calc(100vw + 128px), -64px)             rotate(-135deg); }
  10%  { opacity: 0.42; transform: translate(calc(100vw - 12vw), 22vh)               rotate(-135deg); }
  90%  { opacity: 0.42; transform: translate(8vw, calc(100vh - 22vh))                rotate(-135deg); }
  100% { opacity: 0;    transform: translate(-128px, calc(100vh + 64px))             rotate(-135deg); }
}
