/* 
 * BASE: design tokens, reset, body chrome, shared components
 */

/* Design tokens */
:root {
  --bg:          #0a0e1a;
  --bg-panel:    #1a1f35;
  --bg-item:     rgba(26, 31, 53, 0.6);
  --cyan:        #22d3ee;
  --cyan-dim:    rgba(34, 211, 238, 0.12);
  --cyan-glow:   0 0 12px rgba(34, 211, 238, 0.35), 0 0 40px rgba(34, 211, 238, 0.12);
  --purple:      #c084fc;
  --purple-dim:  rgba(192, 132, 252, 0.12);
  --green:       #4ade80;
  --green-dim:   rgba(74, 222, 128, 0.12);
  --red:         #f87171;
  --orange:      #fb923c;
  --text:        #f3f4f6;
  --muted:       #6b7280;
  --border:      rgba(255, 255, 255, 0.07);
  --font-mono:    'JetBrains Mono', 'Courier New', Consolas, monospace;
  --font-ui:      'Space Grotesk', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --radius:      12px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* Base */
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

/* Ambient glow orbs: sit above the canvas, below the app */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 70% at -5% 5%,  rgba(34, 211, 238, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 105% 95%, rgba(192, 132, 252, 0.07) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* Animations */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Shared: loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Shared: empty / error state */
.state-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  flex: 1;
}

/* Shared: refresh button */
.refresh-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--cyan);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px 9px;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.refresh-btn:hover:not(:disabled) {
  background: var(--cyan-dim);
  border-color: rgba(34, 211, 238, 0.4);
}

.refresh-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

.refresh-btn.spinning {
  animation: spin 0.7s linear infinite;
}

/* Shared: live indicator dot */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  flex-shrink: 0;
  animation: blink 2.4s ease-in-out infinite;
}
