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

:root {
  --bg: #0d0f14;
  --surface: #161b27;
  --surface-raised: #1e2535;
  --border: #2a3148;
  --accent: #e8a020;
  --accent-dim: #b87c18;
  --online: #4ade80;
  --offline: #f87171;
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --radius: 12px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}

.container {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

/* ── Header ─────────────────────────────────────────── */
header {
  text-align: center;
}

.logo {
  height: 56px;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent);
}

/* ── Status badge ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.badge.checking {
  background: var(--surface-raised);
  border-color: var(--border);
  color: var(--text-muted);
}

.badge.online {
  background: rgba(74, 222, 128, 0.12);
  border-color: var(--online);
  color: var(--online);
}

.badge.offline {
  background: rgba(248, 113, 113, 0.12);
  border-color: var(--offline);
  color: var(--offline);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.badge.online .dot {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Info grid ───────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  width: 100%;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--accent-dim);
}

.card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Error box ───────────────────────────────────────── */
.error-box {
  width: 100%;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--offline);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--offline);
  text-align: center;
  font-size: 0.95rem;
}

/* ── Footer ──────────────────────────────────────────── */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.last-checked {
  color: var(--text-muted);
}

.btn {
  margin-top: 0.25rem;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--accent);
  color: #000;
}

/* ── Utilities ───────────────────────────────────────── */
.hidden {
  display: none !important;
}
