:root {
  --bg: #000000;
  --surface: #0d0d0d;
  --surface2: #111111;
  --fg: #e0e0e0;
  --text: #e0e0e0;
  --muted: #555566;
  --border-dim: #1a1a2a;
  --cyan: #00ffff;
  --green: #00ff41;
  --magenta: #ff00ff;
  --yellow: #f0e040;
  --orange: #ff8c00;
  --purple: #cc00ff;
  --red: #ff4444;
  --accent: #00ffff;
  --accent-fg: #000000;
}

* { box-sizing: border-box; }

body {
  font-family: 'Courier New', Courier, monospace;
  background: var(--bg);
  color: var(--fg);
}

/* ── 1. Blinking cursor ─────────────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.cursor-blink {
  display: inline-block;
  animation: blink 1.1s step-end infinite;
  color: var(--cyan);
}

/* ── 2. Scanline overlay scroll animation ───────────────────── */
@keyframes scanlineScroll {
  0%   { background-position: 0 0; }
  100% { background-position: 0 200px; }
}

/* ── 3. SVG dash-flow (edge animation) ──────────────────────── */
@keyframes dashFlow {
  to { stroke-dashoffset: -24; }
}
.edge-path {
  stroke-dasharray: 8 6;
  animation: dashFlow 0.8s linear infinite;
}

/* ── 4. Node entrance ───────────────────────────────────────── */
@keyframes nodeIn {
  from { opacity: 0; transform: scale(0.5) translateY(10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}
.node-enter {
  animation: nodeIn 0.35s cubic-bezier(.4,0,.2,1) both;
}

/* ── 5. Button glow pulse ───────────────────────────────────── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 6px var(--cyan), 0 0 14px var(--cyan); }
  50%       { box-shadow: 0 0 14px var(--cyan), 0 0 36px var(--cyan), 0 0 60px rgba(0,255,255,0.4); }
}
.btn-glow {
  animation: glowPulse 2.5s ease-in-out infinite;
  transition: box-shadow 0.2s ease;
}
.btn-glow:hover {
  animation: none;
  box-shadow: 0 0 16px var(--cyan), 0 0 40px var(--cyan), 0 0 64px rgba(0,255,255,0.5);
}

/* ── Header scanline gradient overlay ───────────────────────── */
.header-scanline {
  background: linear-gradient(
    135deg,
    rgba(0,255,255,0.04) 0%,
    rgba(0,255,65,0.02) 40%,
    rgba(255,0,255,0.03) 100%
  );
}

/* ── Canvas dot grid ────────────────────────────────────────── */
.canvas-grid {
  background-image:
    radial-gradient(circle, rgba(0,255,255,0.12) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: 0 0;
}

/* ── Canvas CRT scanlines (static stripes + slow scroll) ────── */
.canvas-scanlines {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0.18) 4px
  );
  animation: scanlineScroll 8s linear infinite;
}

/* ── SQL textarea ───────────────────────────────────────────── */
#sql-input {
  caret-color: var(--cyan);
  color: var(--green);
}
#sql-input::placeholder { color: var(--muted); }
#sql-input:focus {
  box-shadow: 0 0 10px var(--cyan), inset 0 0 8px rgba(0,255,255,0.05);
}

/* ── Graph node base ────────────────────────────────────────── */
.graph-node {
  position: absolute;
  min-width: 160px;
  max-width: 240px;
  background: #0d0d0d;
  border-radius: 10px;
  border: 2px solid;
  padding: 10px 14px;
  cursor: grab;
  user-select: none;
  will-change: transform;
  transition: box-shadow 0.2s, border-color 0.2s;
  z-index: 10;
}
.graph-node:active { cursor: grabbing; }
.graph-node:hover  { z-index: 20; }

.node-type-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 4px;
}
.node-main-label {
  font-size: 12px;
  font-weight: bold;
  word-break: break-word;
  line-height: 1.4;
}
.node-hub {
  min-width: 180px;
  padding: 14px 18px;
}
.node-hub .node-main-label {
  font-size: 14px;
}

/* Info panel border color set dynamically via JS */
