:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --card-bg: #171a21;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent: #5865f2;
  --green: #3ba55d;
  --red: #ed4245;
  --border: #2a2e37;
}

* {
  box-sizing: border-box;
}

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

.card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.card-header h1 {
  font-size: 1.25rem;
  margin: 0;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-online {
  background: rgba(59, 165, 93, 0.15);
  color: var(--green);
}

.badge-offline {
  background: rgba(237, 66, 69, 0.15);
  color: var(--red);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.history canvas {
  width: 100%;
  height: 100px;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.error-message {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--red);
}
