:root {
  --color-up: #00e676;
  --color-down: #ff4d1c;
  --color-degraded: #ff8c00;
  --color-unknown: #6b7280;
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #161616;
  --border: #222222;
  --text: #f0ede8;
  --text-dim: #9a958d;
  --text-faint: #6a655d;
  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1100px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; display: flex; flex-direction: column; }

main { flex: 1; width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 32px; letter-spacing: -0.02em; }
h2 { font-size: 22px; letter-spacing: -0.01em; }
h3 { font-size: 18px; }
p { margin: 0 0 16px; color: var(--text-dim); }

code, .mono { font-family: var(--font-mono); }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--color-up);
  box-shadow: 0 0 12px rgba(0,230,118,0.6);
}
.nav-links { display: flex; gap: 22px; font-size: 14px; color: var(--text-dim); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 32px 20px;
  color: var(--text-faint);
  font-size: 13px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--text-dim); text-decoration: none; }

/* Service avatar (shared) — colored letter square, used on home + service pages */
.service-avatar {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: 0.02em;
}

/* Status pill (shared) */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-unknown);
  flex-shrink: 0;
}
.status-dot[data-status="up"] { background: var(--color-up); box-shadow: 0 0 10px rgba(0,230,118,0.5); }
.status-dot[data-status="down"] { background: var(--color-down); box-shadow: 0 0 10px rgba(255,77,28,0.6); animation: pulse 1.4s infinite; }
.status-dot[data-status="degraded"] { background: var(--color-degraded); box-shadow: 0 0 10px rgba(255,140,0,0.5); }
.status-dot[data-status="unknown"] { background: var(--color-unknown); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.25); }
}

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

main, .nav, .footer { animation: fadeIn 0.4s ease both; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: #1d1d1d; border-color: #2c2c2c; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Input */
.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.input:focus { outline: none; border-color: #3a3a3a; }

/* Ad slots — minimal, unobtrusive */
.ad-slot {
  width: 100%;
  margin: 24px 0;
  background: transparent;
  border: 1px dashed #1a1a1a;
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  font-size: 11px;
  text-align: center;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--rectangle   { min-height: 250px; max-width: 336px; margin-left: auto; margin-right: auto; }
.ad-slot--sidebar     { min-height: 250px; }
.ad-slot:empty::before { content: "Ad"; opacity: 0.5; }

/* Generic content card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* Utility */
.hidden { display: none !important; }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }

/* Mobile */
@media (max-width: 640px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .nav-inner { padding: 12px 16px; }
  .nav-links { gap: 14px; font-size: 13px; }
  main { padding: 0 16px; }
  .footer { padding: 24px 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}
