:root {
  --bg: #0f1116;
  --panel: #1a1d24;
  --text: #e6e8ec;
  --muted: #9aa0a6;
  --accent: #5b8def;
  --green: #1ea54d;
  --yellow: #d4a017;
  --red: #d04a3a;
  --gray: #5a6168;
  --border: #2a2e36;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 1.5rem 2rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

header h1 {
  font-size: 2.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

header p {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 960px;
}

.region-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.region-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.region-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.flag {
  font-size: 2rem;
  line-height: 1;
}

.label {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 500;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray);
  flex-shrink: 0;
}

.status-dot[data-status="operational"] { background: var(--green); }
.status-dot[data-status="degraded"]    { background: var(--yellow); }
.status-dot[data-status="outage"]      { background: var(--red); }
.status-dot[data-status="loading"] {
  background: var(--gray);
  animation: pulse 1.4s ease-in-out infinite;
}
.status-dot[data-status="unknown"] { background: var(--gray); }

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

footer {
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fa;
    --panel: #ffffff;
    --text: #1f2329;
    --muted: #5a6168;
    --border: #e5e7eb;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  }
}
