/* ============================================================
   Zeus Network — design tokens
   ============================================================ */
:root {
  --bg-void:        #08090d;
  --bg-void-2:      #0c0e14;
  --panel:          rgba(255, 255, 255, 0.035);
  --panel-hover:    rgba(255, 255, 255, 0.055);
  --border:         rgba(255, 255, 255, 0.08);
  --border-strong:  rgba(255, 255, 255, 0.16);

  --text-primary:   #e9eaef;
  --text-muted:     #8d8fa0;
  --text-faint:     #565866;

  --accent:         #7c9cff;
  --accent-dim:     rgba(124, 156, 255, 0.16);

  --status-online:  #5fe3a6;
  --status-offline: #ff6f70;
  --status-local:   #ffc55c;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;

  --ease: cubic-bezier(0.16, 0.8, 0.24, 1);
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ============================================================
   Reset & base
   ============================================================ */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: var(--accent-dim); color: var(--text-primary); }

/* subtle ambient glow, nod to the "Zeus" thunder theme without being literal */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 420px at 12% -8%, rgba(124, 156, 255, 0.14), transparent 60%),
    radial-gradient(500px 380px at 100% 0%, rgba(124, 156, 255, 0.07), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(95, 227, 166, 0.05), transparent 60%),
    var(--bg-void);
}

/* ============================================================
   Layout
   ============================================================ */
.page {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 32px 64px;
}

/* ============================================================
   Header
   ============================================================ */
.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bolt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--accent);
  flex-shrink: 0;
}
.bolt svg { width: 20px; height: 20px; }

.header-titles h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 2px;
}

.header-titles p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.summary-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.summary-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-online);
  box-shadow: 0 0 8px 1px rgba(95, 227, 166, 0.5);
}

.clock {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  min-width: 62px;
  text-align: right;
}

/* ============================================================
   Filters
   ============================================================ */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.filter:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.filter.active {
  color: var(--bg-void);
  background: var(--text-primary);
  border-color: var(--text-primary);
}

/* ============================================================
   Grid & Cards
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(10px);
  animation: card-in 0.6s var(--ease) forwards;
  animation-delay: var(--delay, 0ms);
  transition: transform 0.45s var(--ease), border-color 0.35s var(--ease),
              background 0.35s var(--ease), box-shadow 0.45s var(--ease);
}

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

.card:hover {
  transform: translateY(-3px);
  background: var(--panel-hover);
  border-color: var(--border-strong);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.65);
}

.card.is-hidden {
  display: none;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.icon-fallback {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.badge-local {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--status-local);
  background: rgba(255, 197, 92, 0.1);
  border: 1px solid rgba(255, 197, 92, 0.25);
  cursor: default;
}
.badge-local svg { width: 14px; height: 14px; }

.card-body {
  flex: 1;
}

.card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}

.card-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.card-link {
  color: var(--text-faint);
  transition: color 0.3s var(--ease);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-link:hover { color: var(--accent); }

.card-lastseen {
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color 0.3s var(--ease);
}

/* ============================================================
   Status dot — signature pulse
   ============================================================ */
.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-offline);
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  color: var(--status-offline);
}

.card[data-status="online"] .status-dot {
  background: var(--status-online);
  color: var(--status-online);
}

.card[data-status="online"] .status-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid currentColor;
  animation: pulse-ring 2.4s var(--ease) infinite;
}

@keyframes pulse-ring {
  0%   { opacity: 0.55; transform: scale(0.55); }
  75%  { opacity: 0;    transform: scale(1.9); }
  100% { opacity: 0;    transform: scale(1.9); }
}

.card[data-status="online"] .card-lastseen { color: var(--status-online); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  margin-top: 40px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  font-family: var(--font-mono);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .page { padding: 32px 18px 48px; }
  .header { gap: 16px; }
  .header-meta { width: 100%; justify-content: space-between; }
  .grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Accessibility
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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