:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --border: #222222;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-muted: #555555;
  --accent: #2cc970;
  --accent-dim: rgba(44, 201, 112, 0.1);
  --red: #ff4444;
  --red-dim: rgba(255, 68, 68, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
  flex: 1;
  width: 100%;
}

header {
  margin-bottom: 48px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.logo-icon {
  font-size: 28px;
  color: var(--accent);
}

.logo h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo h1 span {
  color: var(--accent);
  font-weight: 300;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value.green { color: var(--accent); }
.stat-value.red { color: var(--red); }

.last-updated {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 40px;
}

.refresh-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.refresh-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.section-badge {
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.3s;
}

.card.online { border-left: 3px solid var(--accent); }
.card.offline { border-left: 3px solid var(--red); }

.card-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.card-indicator.online {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.card-indicator.offline {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-meta span { color: var(--text-secondary); }

.card-status {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.card-status.online { color: var(--accent); }
.card-status.offline { color: var(--red); }

.card-latency {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

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

.card.loading .card-indicator {
  animation: pulse 1.5s ease-in-out infinite;
  background: var(--text-muted);
  box-shadow: none;
}

@media (max-width: 600px) {
  .container { padding: 24px 16px; }
  .stats-bar { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 22px; }
  .card { padding: 14px 16px; gap: 12px; }
}
