/* === RESET + BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-code: #1a1a28;
  --text: #e8e8f0;
  --text-dim: #8888a0;
  --accent: #6c5ce7;
  --accent-bright: #a29bfe;
  --green: #00e676;
  --yellow: #ffd600;
  --red: #ff5252;
  --border: #2a2a3a;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

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

/* === NAV === */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}

#nav.scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span { color: var(--accent-bright); }

.nav-links { display: flex; gap: 24px; align-items: center; }

.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--accent-bright); }

.nav-gh {
  background: var(--accent);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
}

.nav-gh:hover { background: var(--accent-bright); text-decoration: none; }

/* === HERO === */
header {
  padding: 160px 24px 100px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(108, 92, 231, 0.15) 0%, transparent 60%);
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 24px;
}

.accent { color: var(--accent-bright); }

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-sub {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-install {
  display: inline-block;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 24px;
}

.hero-install code {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--green);
}

/* === CONCEPTS === */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.concept-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  border-top: 3px solid var(--accent);
}

.concept-card.concept-manager { border-top-color: #6c5ce7; }
.concept-card.concept-checker { border-top-color: #00e676; }
.concept-card.concept-reporter { border-top-color: #ff9800; }

.concept-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 12px;
}

.concept-manager .concept-icon { background: rgba(108, 92, 231, 0.2); color: #a29bfe; }
.concept-checker .concept-icon { background: rgba(0, 230, 118, 0.15); color: #00e676; }
.concept-reporter .concept-icon { background: rgba(255, 152, 0, 0.15); color: #ff9800; }

.concept-card h3 { font-size: 20px; margin: 0 0 12px; }
.concept-card p { color: var(--text-dim); font-size: 15px; margin-bottom: 12px; }
.concept-card ul { margin: 8px 0 16px; }
.concept-card ul li { font-size: 14px; margin-bottom: 6px; }
.concept-card pre { font-size: 13px; margin: 12px 0 0; }

.concept-flow pre {
  background: var(--bg-card);
  font-size: 13px;
}

/* === SECTIONS === */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}

section h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

section h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
}

section > p {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 720px;
  margin-bottom: 32px;
}

/* === CODE BLOCKS === */
pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 16px 0 24px;
  font-size: 14px;
  line-height: 1.8;
}

code { font-family: var(--mono); }
p code, td code, li code, .checker-opts code {
  background: var(--bg-code);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--border);
}

.kw { color: #c792ea; }
.str { color: #c3e88d; }
.cmt { color: #546e7a; }

/* === COMPARISON TABLE === */
.comparison-table { overflow-x: auto; margin: 24px 0; }
.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.comparison-table th, .comparison-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comparison-table th.highlight, .comparison-table td.highlight {
  background: rgba(108, 92, 231, 0.1);
  color: var(--text);
}

/* === CHECKER GRID === */
.checker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.checker-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.checker-card h3 {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--accent-bright);
  margin: 0 0 8px;
}

.checker-card p { color: var(--text-dim); font-size: 15px; margin-bottom: 16px; }
.checker-card pre { margin: 0 0 12px; font-size: 13px; }

.checker-opts { font-size: 13px; color: var(--text-dim); }
.checker-note {
  font-size: 12px;
  color: var(--yellow);
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 214, 0, 0.08);
  border-radius: 6px;
}

/* === OPTIONS TABLE === */
.options-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.options-table th, .options-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.options-table th { color: var(--text-dim); font-weight: 600; font-size: 13px; text-transform: uppercase; }

/* === STATUS CARDS === */
.status-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 24px 0; }

.status-card {
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border);
}

.status-card h3 { font-family: var(--mono); font-size: 16px; margin-bottom: 8px; }
.status-card p { font-size: 14px; color: var(--text-dim); margin: 0; }

.status-healthy { border-left: 4px solid var(--green); }
.status-healthy h3 { color: var(--green); }
.status-degraded { border-left: 4px solid var(--yellow); }
.status-degraded h3 { color: var(--yellow); }
.status-unhealthy { border-left: 4px solid var(--red); }
.status-unhealthy h3 { color: var(--red); }

/* === REPORTER GRID === */
.reporter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.reporter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.reporter-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reporter-card p { color: var(--text-dim); font-size: 15px; margin-bottom: 16px; }
.reporter-card pre { margin: 0; font-size: 13px; }

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-ext { background: var(--border); color: var(--text-dim); }

/* === INFO BOX === */
.info-box {
  background: rgba(108, 92, 231, 0.08);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
}

.info-box strong { color: var(--accent-bright); }
.info-box a { color: var(--accent-bright); }

/* === MERMAID === */
.mermaid-container {
  margin: 24px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
}

.mermaid-container pre.mermaid {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

section ul {
  list-style: none;
  margin: 16px 0;
}

section ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--text-dim);
}

section ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-bright);
}

section ul li strong { color: var(--text); }

/* === FOOTER === */
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

footer p { margin-bottom: 8px; }
footer a { color: var(--accent-bright); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links { gap: 12px; flex-wrap: wrap; }
  .nav-links a { font-size: 12px; }
  .checker-grid, .reporter-grid { grid-template-columns: 1fr; }
  header { padding: 120px 16px 60px; }
  section { padding: 48px 16px; }
  pre { font-size: 12px; padding: 14px; }
}
