:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f0f18;
  --bg-card: #14141e;
  --bg-card-hover: #1c1c2a;
  --bg-elevated: #202030;
  --border: #1e1e30;
  --border-light: #2e2e44;
  --text-primary: #f0f0f8;
  --text-secondary: #b0b0c8;
  --text-muted: #78789a;
  --accent: #818cf8;
  --accent-light: #a5b4fc;
  --accent-dark: #6366f1;
  --accent-glow: rgba(129, 140, 248, 0.2);
  --gradient-1: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 900px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

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

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 7, 11, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-logo img {
  height: 40px;
  width: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition);
}

.navbar-links a:hover {
  color: var(--text-primary);
}

.navbar-cta {
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* ===== STATUS HERO ===== */
.status-wrap {
  padding: 160px 0 80px;
  min-height: 100vh;
}

.status-hero {
  text-align: center;
  padding: 60px 0 70px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 32px;
  transition: var(--transition);
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 0 0 0 rgba(120, 120, 154, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(120, 120, 154, 0.4); }
  70% { box-shadow: 0 0 0 14px rgba(120, 120, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(120, 120, 154, 0); }
}

/* Hero badge glow by status */
.hero-badge:has(.status-operational) {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.15), inset 0 0 20px rgba(34, 197, 94, 0.05);
}

.hero-badge:has(.status-degraded) {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.15), inset 0 0 20px rgba(245, 158, 11, 0.05);
}

.hero-badge:has(.status-down) {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.15), inset 0 0 20px rgba(239, 68, 68, 0.05);
}

.hero-badge:has(.status-maintenance) {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.15), inset 0 0 20px rgba(6, 182, 212, 0.05);
}

.hero-badge:has(.status-operational) .dot,
.hero-badge:has(.status-up) .dot,
.hero-badge:has(.status-running) .dot {
  background: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
  animation: pulse-green 2s infinite;
}

.hero-badge:has(.status-degraded) .dot,
.hero-badge:has(.status-partial) .dot,
.hero-badge:has(.status-warning) .dot {
  background: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  animation: pulse-yellow 2s infinite;
}

.hero-badge:has(.status-down) .dot,
.hero-badge:has(.status-outage) .dot,
.hero-badge:has(.status-error) .dot {
  background: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
  animation: pulse-red 2s infinite;
}

.hero-badge:has(.status-maintenance) .dot {
  background: #06b6d4;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
  animation: pulse-cyan 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes pulse-yellow {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes pulse-cyan {
  0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(6, 182, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

.status-hero h1 {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-secondary);
  transition: var(--transition);
}

/* Color the title based on overall status */
.hero-badge:has(.status-operational) + h1,
.hero-badge:has(.status-up) + h1,
.hero-badge:has(.status-running) + h1 {
  color: #22c55e;
}

.hero-badge:has(.status-degraded) + h1,
.hero-badge:has(.status-partial) + h1,
.hero-badge:has(.status-warning) + h1 {
  color: #f59e0b;
}

.hero-badge:has(.status-down) + h1,
.hero-badge:has(.status-outage) + h1,
.hero-badge:has(.status-error) + h1 {
  color: #ef4444;
}

.hero-badge:has(.status-maintenance) + h1 {
  color: #06b6d4;
}

.status-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.status-meta .divider {
  color: var(--border-light);
}

/* ===== SECTIONS ===== */
section {
  margin-bottom: 64px;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== SERVICES ===== */
.services-list {
  display: grid;
  gap: 24px;
}

.service-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.service-group:hover {
  border-color: var(--border-light);
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.group-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.group-title h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.group-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.group-monitors {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.monitor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.monitor-item:hover {
  background: var(--bg-card-hover);
}

.monitor-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.monitor-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.monitor-name {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.monitor-badge {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 100px;
  font-weight: 700;
}

/* ===== STATUS COLORS ===== */
.status-operational,
.status-up,
.status-running {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.status-operational.dot,
.status-up.dot,
.status-running.dot,
.status-operational.group-status,
.status-up.group-status,
.status-running.group-status,
.status-operational.monitor-status-dot,
.status-up.monitor-status-dot,
.status-running.monitor-status-dot {
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.status-degraded,
.status-partial,
.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.status-degraded.dot,
.status-partial.dot,
.status-warning.dot,
.status-degraded.group-status,
.status-partial.group-status,
.status-warning.group-status,
.status-degraded.monitor-status-dot,
.status-partial.monitor-status-dot,
.status-warning.monitor-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.status-down,
.status-outage,
.status-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.status-down.dot,
.status-outage.dot,
.status-error.dot,
.status-down.group-status,
.status-outage.group-status,
.status-error.group-status,
.status-down.monitor-status-dot,
.status-outage.monitor-status-dot,
.status-error.monitor-status-dot {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.status-maintenance {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

.status-maintenance.dot,
.status-maintenance.group-status,
.status-maintenance.monitor-status-dot {
  background: #06b6d4;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.status-unknown {
  background: rgba(120, 120, 154, 0.15);
  color: var(--text-muted);
}

.status-unknown.dot,
.status-unknown.group-status,
.status-unknown.monitor-status-dot {
  background: var(--text-muted);
}

/* ===== INCIDENTS ===== */
.incidents-section .section-header {
  margin-bottom: 20px;
}

.incidents-list {
  display: grid;
  gap: 16px;
}

.incident-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  border-left: 3px solid var(--border-light);
  transition: var(--transition);
}

.incident-card.status-operational { border-left-color: #22c55e; }
.incident-card.status-degraded { border-left-color: #f59e0b; }
.incident-card.status-down { border-left-color: #ef4444; }
.incident-card.status-maintenance { border-left-color: #06b6d4; }

.incident-card:hover {
  border-color: var(--border-light);
}

.incident-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.incident-badge {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
}

.incident-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.incident-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.incident-card > p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.incident-resolved {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: #22c55e;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 30px 0;
  margin-top: 60px;
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .navbar-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .status-wrap {
    padding: 120px 0 40px;
  }

  .status-hero h1 {
    font-size: 1.375rem;
  }

  .status-meta {
    flex-direction: column;
    gap: 8px;
  }

  .status-meta .divider {
    display: none;
  }

  .monitor-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
