*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --surface-hover: #292e42;
  --border: #2e3250;
  --text: #e2e8f0;
  --muted: #8892a4;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.2);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Header */
.glass-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
header h1 span { color: var(--accent); }

.cluster-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface2);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
}
.pill-icon { width: 14px; height: 14px; color: var(--green); }
.pill-sep { color: var(--border); }
.pill-status.healthy { color: var(--green); font-weight: 600; }
.pill-status.degraded { color: var(--yellow); font-weight: 600; }

/* Hero */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.hero h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero-sub {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 0.75rem;
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Sections */
section { margin-bottom: 2.5rem; }

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

section h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

section h2 .count {
  background: var(--surface2);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text);
}

/* Node Grid */
.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.node-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.node-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.node-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border-radius: 8px;
  color: var(--accent);
}
.node-icon i { width: 18px; height: 18px; }

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

.node-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.node-role {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: capitalize;
}

.node-specs {
  display: flex;
  gap: 1rem;
}

.node-spec {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.spec-icon { width: 14px; height: 14px; color: var(--accent); }

/* Service Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

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

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border-radius: 8px;
  color: var(--accent);
  flex-shrink: 0;
}
.card-icon i { width: 18px; height: 18px; }

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

.card-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.card-ns {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Status Dots */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.status-dot.running  { background: var(--green); box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); }
.status-dot.degraded { background: var(--yellow); box-shadow: 0 0 8px rgba(234, 179, 8, 0.4); animation: pulse 2s infinite; }
.status-dot.down     { background: var(--red); box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); animation: pulse 2s infinite; }

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.chip {
  font-size: 0.68rem;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  color: var(--muted);
}
.chip.replicas { color: var(--text); }
.chip.replicas.warning { color: var(--yellow); border-color: var(--yellow); }
.chip.replicas.error { color: var(--red); border-color: var(--red); }
.chip.secure { color: var(--green); border-color: rgba(34, 197, 94, 0.3); }

.card-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  margin-top: auto;
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem 0;
  grid-column: 1 / -1;
}

.hidden { display: none !important; }

/* CTA */
.cta-section {
  margin-top: 3rem;
}

.cta-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 0 40px var(--accent-glow);
}

.cta-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.cta-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-glow);
}
.cta-btn i { width: 18px; height: 18px; }

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-sep { margin: 0 0.5rem; color: var(--border); }

/* Responsive */
@media (max-width: 640px) {
  .hero h2 { font-size: 1.4rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .cluster-pill { font-size: 0.7rem; padding: 0.3rem 0.6rem; }
  .grid { grid-template-columns: 1fr; }
  .node-grid { grid-template-columns: 1fr 1fr; }
}
