@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

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

:root {
  --bg:        #080C14;
  --surface:   rgba(10, 18, 36, 0.7);
  --border:    rgba(59, 158, 232, 0.15);
  --accent:    #3B9EE8;
  --accent-dim: rgba(59, 158, 232, 0.08);
  --text:      #E0E8F4;
  --text-dim:  #6B7E99;
  --ok:        #2ECC71;
  --warn:      #F1C40F;
  --orange:    #E67E22;
  --err:       #E74C3C;
  --info:      #3498DB;
}

html { background: var(--bg); color: var(--text); font-family: 'Montserrat', sans-serif; font-size: 15px; line-height: 1.6; min-height: 100vh; }

body { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }

/* ── Header ──────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-link {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.header-link:hover { color: var(--accent); }

/* ── Overall banner ──────────────────────────────────── */
.overall-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  margin-bottom: 36px;
  transition: border-color 0.3s;
}

.overall-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.overall-updated {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ── Section ─────────────────────────────────────────── */
.section-header {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}

/* ── Services ────────────────────────────────────────── */
.services {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
  margin-bottom: 36px;
}

.service-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.service-row:last-child { border-bottom: none; }
.service-row:hover { background: var(--accent-dim); }

.service-info { flex: 1; min-width: 0; }

.service-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.service-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.service-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.service-latency {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  width: 48px;
  text-align: right;
}

.status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Status colours ──────────────────────────────────── */
.status-operational  { color: var(--ok);     background: rgba(46, 204, 113, 0.12); }
.status-degraded     { color: var(--warn);   background: rgba(241, 196, 15, 0.12); }
.status-partial_outage { color: var(--orange); background: rgba(230, 126, 34, 0.12); }
.status-major_outage { color: var(--err);    background: rgba(231, 76, 60, 0.12); }
.status-maintenance  { color: var(--info);   background: rgba(52, 152, 219, 0.12); }
.status-unknown      { color: var(--text-dim); background: rgba(255, 255, 255, 0.06); }

.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-operational  { background: var(--ok); }
.dot-degraded     { background: var(--warn); }
.dot-partial_outage { background: var(--orange); }
.dot-major_outage { background: var(--err); box-shadow: 0 0 6px var(--err); }
.dot-maintenance  { background: var(--info); }
.dot-unknown      { background: var(--text-dim); }

.dot-operational.pulse {
  animation: pulse-ok 2s ease-in-out infinite;
}
@keyframes pulse-ok {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(46, 204, 113, 0); }
}

/* ── Incidents ───────────────────────────────────────── */
.incidents { margin-bottom: 36px; }

.no-incidents {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  color: var(--text-dim);
}

.incident-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  padding: 18px 20px;
  margin-bottom: 10px;
}

.incident-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.incident-title {
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
}

.incident-updates { border-left: 2px solid var(--border); padding-left: 14px; }

.incident-update {
  margin-bottom: 10px;
  font-size: 0.78rem;
}

.update-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 2px;
}

.update-status {
  font-weight: 600;
  text-transform: capitalize;
  font-size: 0.72rem;
  color: var(--accent);
}

.update-time { color: var(--text-dim); font-size: 0.7rem; }
.update-message { color: var(--text); }

/* ── Loading / error ─────────────────────────────────── */
.loading {
  text-align: center;
  padding: 48px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.error-banner {
  padding: 16px 20px;
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 10px;
  background: rgba(231, 76, 60, 0.07);
  color: var(--err);
  font-size: 0.82rem;
  margin-bottom: 20px;
}

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
  body { padding: 28px 16px 60px; }
  .service-desc { display: none; }
  .service-latency { display: none; }
}
