/* ==========================================================================
   THE REAL TOPS — Black & White Glow Theme Overlay for SourceBans++ 2026
   Non-invasive CSS override injected via Nginx (preserves all SB++ features)
   ========================================================================== */

@keyframes sbWhiteGlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

:root,
html.dark {
  --brand-50:  #fafafa;
  --brand-100: #f4f4f5;
  --brand-200: #e4e4e7;
  --brand-300: #d4d4d8;
  --brand-400: #ffffff;
  --brand-500: #f4f4f5;
  --brand-600: #ffffff;
  --brand-700: #e4e4e7;
  --brand-800: #a1a1aa;
  --brand-900: #27272a;
  --brand-950: #09090b;
}

html.dark {
  --bg-page: #050507;
  --bg-surface: rgba(12, 12, 16, 0.88);
  --bg-muted: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.13);
  --text: #f5f5f7;
  --text-muted: #9ca3af;
  --text-faint: #71717a;
  --accent: #ffffff;
  --accent-hover: #e5e7eb;
  --accent-soft: rgba(255, 255, 255, 0.10);
  --danger: #ff3b5c;
  --danger-bg: rgba(255, 59, 92, 0.16);
  --success: #4ade80;
  --success-bg: rgba(74, 222, 128, 0.14);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.14);
}

/* Animated Pure-Black + White-Glow Background */
html.dark body {
  background-color: #050507;
  background-image:
    radial-gradient(ellipse 75% 45% at 22% 0%, rgba(255, 255, 255, 0.10), transparent 55%),
    radial-gradient(ellipse 60% 42% at 86% 12%, rgba(255, 255, 255, 0.07), transparent 52%),
    radial-gradient(ellipse 65% 45% at 50% 100%, rgba(255, 255, 255, 0.06), transparent 58%);
  background-attachment: fixed;
  background-size: 165% 165%;
  animation: sbWhiteGlow 20s ease infinite;
}

/* Glass Sidebar */
html.dark .sidebar {
  background: rgba(5, 5, 7, 0.90) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.sidebar__brand {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.30);
}

.sidebar__link {
  border-radius: 9px !important;
  border: 1px solid transparent;
  transition: transform .15s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.sidebar__link:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.10);
}
html.dark .sidebar__link[aria-current="page"] {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #050507 !important;
  font-weight: 700;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.32);
}

/* Glass Topbar */
html.dark .topbar {
  background: rgba(5, 5, 7, 0.84) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Cards, Panels & Tables with White Glow Hover */
html.dark .card,
html.dark .panel,
html.dark .stat-card,
html.dark .table-container,
html.dark .surface,
html.dark [class*="card"] {
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.13);
  transition: border-color .18s ease, box-shadow .18s ease;
}
html.dark .card:hover,
html.dark .stat-card:hover {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.08);
}

html.dark table thead th {
  background: rgba(255, 255, 255, 0.045);
  color: #a1a1aa;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
html.dark table tbody tr {
  transition: background .14s ease;
}
html.dark table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Primary Buttons — Crisp White Glow */
html.dark .btn--primary {
  background: #ffffff !important;
  color: #050507 !important;
  font-weight: 700;
  border: 1px solid #ffffff !important;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.28);
  transition: transform .15s ease, box-shadow .18s ease;
}
html.dark .btn--primary:hover {
  background: #f4f4f5 !important;
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.48);
}

html.dark h1,
html.dark h2 {
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

/* Live Ping Pill injected in SourceBans++ Servers & Dashboard */
.sbpp-ping-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.10);
}
.sbpp-ping-pill .sbpp-ping-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.sbpp-ping-pill.is-low  { color: #4ade80; border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.10); }
.sbpp-ping-pill.is-mid  { color: #ffffff; border-color: rgba(255, 255, 255, 0.38); background: rgba(255, 255, 255, 0.09); }
.sbpp-ping-pill.is-high { color: #fbbf24; border-color: rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.12); }
.sbpp-ping-pill.is-bad  { color: #ff6b86; border-color: rgba(255, 59, 92, 0.50); background: rgba(255, 59, 92, 0.14); }
.sbpp-ping-pill.is-off  { display: none; }

/* Scrollbar */
html.dark ::-webkit-scrollbar { width: 9px; height: 9px; }
html.dark ::-webkit-scrollbar-track { background: #050507; }
html.dark ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 999px; }
html.dark ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.55); }

@media (prefers-reduced-motion: reduce) {
  html.dark body { animation: none !important; }
}
