/* Shugur Relay — Dark Techy Theme */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ── Palette ────────────────────────────────────────────── */
:root {
  --bg:        #0a0a0a;
  --bg-card:   #111111;
  --bg-raised: #1a1a1a;
  --border:    #222222;
  --border-hi: #333333;
  --text:      #e0e0e0;
  --text-dim:  #888888;
  --text-mute: #555555;
  --accent:    #00e599;
  --accent-dim:rgba(0,229,153,.15);
  --accent-glow:rgba(0,229,153,.25);
  --red:       #ef4444;
  --mono:      "JetBrains Mono", "Fira Code", monospace;
  --sans:      "Inter", -apple-system, system-ui, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Container ──────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2.5rem 2rem;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,153,.25);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent-glow); }
  50%      { opacity: .4; box-shadow: 0 0 12px var(--accent-glow); }
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 0.5rem;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.hero-endpoint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.hero-endpoint code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  user-select: all;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color .15s;
}
.copy-btn:hover { color: var(--accent); }

.hero-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-mute);
  font-family: var(--mono);
}

.hero-meta a { color: var(--text-mute); }
.hero-meta a:hover { color: var(--accent); text-decoration: none; }

.sep { color: var(--border-hi); }

/* ── Stats ──────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 2rem;
}

.stat {
  background: var(--bg-card);
  padding: 1rem 0.5rem;
  text-align: center;
  transition: background .15s;
}

.stat:hover { background: var(--bg-raised); }

.stat-val {
  display: block;
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: color .3s, text-shadow .5s;
}

.stat-lbl {
  display: block;
  font-size: 0.7rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* stat update flash */
.stat-updating {
  color: var(--accent) !important;
  text-shadow: 0 0 8px var(--accent-glow) !important;
}

/* legacy class compat for script.js */
.stat-value {
  transition: color .3s, text-shadow .5s;
}

/* ── Panels ─────────────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── NIPs ───────────────────────────────────────────────── */
.nip-count {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.7rem;
}

.nips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}

.nip-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
  box-shadow: 0 0 8px var(--accent-glow);
}

.nip-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.nip-desc {
  font-size: 0.68rem;
  color: var(--text-mute);
  border-left: 1px solid var(--border-hi);
  padding-left: 0.35rem;
}

.nip-item:hover .nip-desc {
  color: var(--text-dim);
}

/* ── Config Grid ────────────────────────────────────────── */
.config-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.cfg {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 0.6rem 0.9rem;
}

.cfg:hover { background: var(--bg-raised); }

.cfg-k {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.cfg-v {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.val-on  { color: var(--accent); }
.val-off { color: var(--text-mute); }

/* ── Footer ─────────────────────────────────────────────── */
.foot {
  text-align: center;
  padding: 2rem 0 1rem;
  font-size: 0.8rem;
  color: var(--text-mute);
  font-family: var(--mono);
}

.foot a {
  color: var(--text-dim);
  transition: color .15s;
}

.foot a:hover { color: var(--accent); text-decoration: none; }

.heart { color: var(--red); font-size: 0.7rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .container { padding: 2rem 1rem 1.5rem; }
  .hero-title { font-size: 1.5rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat-val { font-size: 1.25rem; }
  .hero-meta { flex-wrap: wrap; justify-content: center; }
  .nips-grid { gap: 0.3rem; }
}

/* ── Accessibility ──────────────────────────────────────── */
a:focus, button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }
