/* ── probe.css ─────────────────────────────────────────────── */

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

:root {
  --bg-from:    #e8edf8;
  --bg-to:      #f0e8f5;
  --surface:    rgba(255,255,255,.72);
  --surface2:   rgba(255,255,255,.92);
  --surface-hd: rgba(255,255,255,.55);
  --border:     rgba(120,100,180,.13);
  --border2:    rgba(120,100,180,.22);
  --text:       #1e1b2e;
  --muted:      #7b7a99;
  --bar-low:    #4ade80;
  --bar-mid:    #fb923c;
  --bar-high:   #f43f5e;
  --bar-track:  rgba(120,100,180,.12);
  --online:     #22c55e;
  --offline:    #f43f5e;
  --radius:     12px;
  --radius-sm:  7px;
}

body {
  background: linear-gradient(135deg, var(--bg-from) 0%, var(--bg-to) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", ui-monospace, monospace;
  font-size: 13px;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────── */

.header {
  border-bottom: 1px solid var(--border);
  padding: 13px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-hd);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
}
.header-inner {
  max-width: 960px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--online);
  animation: ping 2.4s ease-in-out infinite;
}
@keyframes ping {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.title-main {
  font-size: 15px; font-weight: 700; letter-spacing: .03em;
  background: linear-gradient(90deg, #5b4fcf, #9b59d0);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.title-sub { font-size: 10px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 1px; }
.header-right { display: flex; align-items: center; gap: 22px; }
.stats { display: flex; gap: 18px; }
.stat  { text-align: right; }
.stat-num {
  font-size: 18px; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #5b4fcf, #c65bcf);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 10px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }

.view-toggle {
  display: flex;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255,255,255,.4);
}
.view-btn {
  background: transparent; border: none; color: var(--muted);
  padding: 6px 11px; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-family: inherit; letter-spacing: .04em;
  transition: background .15s, color .15s;
}
.view-btn + .view-btn { border-left: 1px solid var(--border2); }
.view-btn.active, .view-btn:hover { background: rgba(255,255,255,.8); color: var(--text); }

/* ── Wrapper ─────────────────────────────────────── */

.wrapper { max-width: 960px; margin: auto; padding: 20px 20px 48px; }

/* ── Grid view ───────────────────────────────────── */

#node-list.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 12px;
}

/* ── List view ───────────────────────────────────── */

#node-list.list { display: flex; flex-direction: column; gap: 5px; }

.list-header {
  display: none;
  grid-template-columns: 140px 78px 1fr 1fr 1fr 156px 106px;
  gap: 10px;
  padding: 5px 14px;
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
}
#node-list.list .list-header { display: grid; }

/* ── Card ────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: background .2s, border-color .2s, box-shadow .2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card:hover {
  background: var(--surface2);
  border-color: var(--border2);
  box-shadow: 0 4px 20px rgba(91,79,207,.08);
}

.grid .card-title { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.grid .card-status {
  display: flex; align-items: center; gap: 6px;
  margin: 5px 0 13px;
  font-size: 11px; color: var(--muted);
}

.list .card {
  display: grid;
  grid-template-columns: 140px 78px 1fr 1fr 1fr 156px 106px;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}
.list .card-title  { font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.list .card-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%; flex-shrink: 0; position: relative;
}
.dot.online  { background: var(--online); }
.dot.offline { background: var(--offline); }
.dot.online::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%; background: var(--online);
  animation: ping 2s ease-in-out infinite;
}

/* ── Metric ──────────────────────────────────────── */

.metric-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.metric-label { font-size: 10px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.metric-val   { font-size: 12px; font-weight: 700; }

.progress {
  height: 4px; background: var(--bar-track);
  border-radius: 4px; overflow: hidden; margin-bottom: 3px;
}
.bar { height: 100%; border-radius: 4px; transition: width .5s cubic-bezier(.4,0,.2,1); }

.metric-sub { font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.list .metric { min-width: 0; }
.list .metric-row { margin-bottom: 3px; }
.list .metric-sub { display: none; }

/* ── Net / uptime ────────────────────────────────── */

.net-block {
  margin-top: 8px; border-top: 1px solid var(--border);
  padding-top: 8px; display: flex; flex-direction: column; gap: 4px;
}
.net-row   { display: flex; justify-content: space-between; align-items: center; }
.net-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.net-val   { font-size: 11px; font-weight: 700; }

.list .net-block  { border: none; padding: 0; margin: 0; gap: 2px; text-align: right; }
.net-spd { font-size: 10px; color: var(--muted); text-align: right; }
.list .net-label  { display: none; }
.list .net-val    { font-size: 11px; }
.list-uptime { font-size: 11px; text-align: right; color: var(--muted); }