/* ─── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0b0d14;
  --surface:     #13151f;
  --surface-2:   #1c1f2e;
  --border:      rgba(255,255,255,.07);
  --text:        #e8eaf0;
  --muted:       #6b7280;
  --accent:      #7c3aed;
  --accent-glow: rgba(124,58,237,.18);

  --up:          #22c55e;
  --up-bg:       rgba(34,197,94,.10);
  --down:        #ef4444;
  --down-bg:     rgba(239,68,68,.10);
  --unknown:     #f59e0b;
  --unknown-bg:  rgba(245,158,11,.10);

  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 4px 32px rgba(0,0,0,.45);
}

html { font-size: 16px; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── Page layout ──────────────────────────────────────────────────────── */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

.main { flex: 1; padding: 32px 0 48px; }

/* ─── Header ───────────────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.02em;
  color: var(--text);
  transition: opacity .15s;
}
.logo:hover { opacity: .8; }

.header-sub {
  margin-left: auto;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ─── Overall banner ───────────────────────────────────────────────────── */
.overall-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 36px;
  box-shadow: var(--shadow);
  transition: background .3s, border-color .3s;
}

.overall-banner.all-up    { background: linear-gradient(135deg, var(--surface), rgba(34,197,94,.07)); border-color: rgba(34,197,94,.2); }
.overall-banner.has-down  { background: linear-gradient(135deg, var(--surface), rgba(239,68,68,.07)); border-color: rgba(239,68,68,.2); }
.overall-banner.has-issue { background: linear-gradient(135deg, var(--surface), rgba(245,158,11,.07)); border-color: rgba(245,158,11,.2); }

.banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  background: var(--surface-2);
  transition: background .3s;
}
.overall-banner.all-up    .banner-icon { background: var(--up-bg); }
.overall-banner.has-down  .banner-icon { background: var(--down-bg); }
.overall-banner.has-issue .banner-icon { background: var(--unknown-bg); }

.banner-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.banner-sub {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── Spinner ──────────────────────────────────────────────────────────── */
.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Section title ────────────────────────────────────────────────────── */
.section-title {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ─── Services grid ────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ─── Service card ─────────────────────────────────────────────────────── */
.service-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color .25s, transform .15s;
  animation: fadeUp .3s ease both;
}

.service-card:hover { transform: translateY(-1px); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* skeleton */
.service-card.skeleton {
  height: 68px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border: 1px solid var(--border);
  pointer-events: none;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* status dot */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.status-dot.up      { background: var(--up);      box-shadow: 0 0 8px var(--up); }
.status-dot.down    { background: var(--down);    box-shadow: 0 0 8px var(--down); }
.status-dot.unknown { background: var(--unknown); box-shadow: 0 0 8px var(--unknown); }

.status-dot.up::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--up);
  opacity: .25;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .25; }
  50%       { transform: scale(1.6); opacity: 0; }
}

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

.card-name {
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-status {
  font-size: .75rem;
  font-weight: 500;
  margin-top: 1px;
}
.card-status.up      { color: var(--up); }
.card-status.down    { color: var(--down); }
.card-status.unknown { color: var(--unknown); }

/* ─── Meta ─────────────────────────────────────────────────────────────── */
.meta {
  margin-top: 28px;
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
}
.meta-link { color: var(--accent); }
.meta-link:hover { text-decoration: underline; }

/* ─── Footer ───────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
}
.footer-link { color: var(--muted); }
.footer-link:hover { color: var(--text); }
