/* ══════════════════════════════════════════════════════════════
   🎨 baseLINE Codex Overlay — PCMedicalist Design System
   Twitch transaction visualization overlay.
   Tokens mirror src/client/styles/tokens.css (Void Black base,
   Diagnostic Blue → Cyber Purple, glass morphism).
   ══════════════════════════════════════════════════════════════ */

:root {
  --bl-bg: #05070B;
  --bl-surface: #121821;
  --bl-blue: #00CFFF;
  --bl-purple: #7A5CFF;
  --bl-gradient: linear-gradient(135deg, #00CFFF 0%, #7A5CFF 100%);
  --bl-text: #E6EDF7;
  --bl-text-dim: #AABAC3;
  --bl-glass: rgba(10, 15, 23, 0.72);
  --bl-glass-border: rgba(160, 186, 195, 0.14);
  --bl-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --bl-display: 'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: radial-gradient(circle at 50% 30%, #0A0F17 0%, #05070B 70%);
  font-family: var(--bl-display);
  color: var(--bl-text);
  overflow: hidden;
}

#codex-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ── The transaction alert card ── */
#codex {
  position: relative;
  width: min(440px, 92vw);
  padding: 1.75rem 2rem;
  background: var(--bl-glass);
  border: 1px solid var(--bl-glass-border);
  border-radius: 14px;
  backdrop-filter: blur(16px) saturate(120%);
  box-shadow: 0 8px 40px -8px rgba(0, 207, 255, 0.22),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 220ms ease;
}

/* Scan-line sweep */
.scan-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 207, 255, 0.08) 50%, transparent 100%);
  transform: translateY(-100%);
  animation: scan 3.2s linear infinite;
  pointer-events: none;
}
@keyframes scan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* Guardian / agent label */
#guardian {
  font-family: var(--bl-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bl-blue);
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

/* Amount — the hero number */
#tx-amount {
  font-family: var(--bl-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1;
  background: var(--bl-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(0, 207, 255, 0.35));
}

#tx-address {
  font-family: var(--bl-mono);
  font-size: 0.9rem;
  color: var(--bl-text-dim);
  margin-top: 0.4rem;
}

.tx-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.9rem;
  font-family: var(--bl-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bl-text-dim);
}
#tx-network {
  color: var(--bl-purple);
  font-weight: 600;
}

/* Pulse on new transaction */
.pulse { animation: pulse 0.6s ease; }
@keyframes pulse {
  0%   { transform: scale(0.94); opacity: 0.5; }
  60%  { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scan-line, .pulse { animation: none; }
}
