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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: #1a202c;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
  padding: 2.5rem 2rem;
  max-width: 560px;
  width: 100%;
  text-align: center;
}

/* ── Status section ── */
.status-section { margin-bottom: 2rem; }

.checkmark-wrap {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
}

.checkmark-circle {
  fill: none;
  stroke: #22c55e;
  stroke-width: 3;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  animation: draw-circle .5s ease forwards;
}

.checkmark-check {
  fill: none;
  stroke: #22c55e;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw-check .4s ease .45s forwards;
}

@keyframes draw-circle {
  to { stroke-dashoffset: 0; }
}
@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

/* Offline state */
.card.offline .checkmark-circle { stroke: #ef4444; animation: none; stroke-dashoffset: 0; }
.card.offline .checkmark-check  { display: none; }
.cross-path {
  display: none;
  fill: none;
  stroke: #ef4444;
  stroke-width: 4;
  stroke-linecap: round;
}
.card.offline .cross-path { display: block; }

.status-label {
  font-size: 1.6rem;
  font-weight: 700;
  color: #22c55e;
}
.card.offline .status-label { color: #ef4444; }

.status-sub {
  font-size: .95rem;
  color: #718096;
  margin-top: .25rem;
}

/* ── Info grid ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 1rem;
  text-align: left;
  margin-bottom: 2rem;
}

.info-item {
  background: #f7fafc;
  border-radius: 10px;
  padding: .75rem 1rem;
}

.info-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #a0aec0;
  margin-bottom: .25rem;
}

.info-value {
  font-size: .95rem;
  font-weight: 500;
  color: #2d3748;
  word-break: break-all;
}

/* ── Timestamps ── */
.timestamps {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.ts-row {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: #718096;
}

.ts-label { font-weight: 600; }

/* ── Version credit ── */
.version-credit {
  text-align: right;
  font-size: .7rem;
  color: #a0aec0;
  margin-top: 1rem;
}

/* ── Latency quality labels ── */
.quality-good { color: #22c55e; }
.quality-fair { color: #f59e0b; }
.quality-poor { color: #ef4444; }

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  body {
    background: #0f172a;
    color: #e2e8f0;
  }

  .card {
    background: #1e293b;
    box-shadow: 0 4px 24px rgba(0,0,0,.4);
  }

  .status-sub { color: #94a3b8; }

  .info-item { background: #0f172a; }

  .info-label { color: #64748b; }

  .info-value { color: #cbd5e1; }

  .timestamps { border-top-color: #334155; }

  .ts-row { color: #94a3b8; }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .info-grid { grid-template-columns: 1fr; }
  .ts-row { flex-direction: column; gap: .1rem; }
}
