:root {
  --bg: #0a0f1a;
  --bg-card: #111827;
  --bg-elevated: #1a2332;
  --text: #e8edf5;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-dim: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.2);
  --border: #1e293b;
  --success: #22c55e;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.site-header.hidden { transform: translateY(-100%); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.logo-text strong { color: var(--accent); }

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

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav a:hover {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1.2rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  padding: 24px;
  flex-direction: column;
}

.mobile-menu.active { display: flex; }

.mobile-menu-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.mobile-menu a {
  color: var(--text);
  font-size: 1.25rem;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

@media (max-width: 768px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  padding: 140px 0 80px;
  text-align: center;
  background: radial-gradient(ellipse 70% 50% at 50% -20%, var(--accent-glow), transparent);
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 12px;
}

.hero-code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  margin: 24px 0 32px;
  color: var(--success);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dim);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary:disabled { opacity: 0.6; cursor: wait; }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }

/* Sections */
.section { padding: 72px 0; }

.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 40px;
}

.section-title span { color: var(--accent); }

/* About (markdown) */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 40px;
  max-width: 900px;
  margin: 0 auto;
}

.section__about h1, .section__about h2, .section__about h3 {
  margin: 1.5em 0 0.5em;
  color: var(--text);
}

.section__about h1 { font-size: 1.5rem; margin-top: 0; }
.section__about p, .section__about li { color: var(--muted); margin-bottom: 0.75em; }
.section__about ul, .section__about ol { margin-left: 1.5em; margin-bottom: 1em; }
.section__about code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.section__about pre, .section__about .highlight pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.section__about .anchor { display: none; }
.section__about img { max-width: 100%; border-radius: 8px; }

/* Try it */
.try-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.panel h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 500;
}

.server-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.server-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, color 0.15s;
}

.server-options input { accent-color: var(--accent); }

.server-options label:has(input:checked) {
  border-color: var(--accent);
  color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.response-panel {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.response-panel label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

#textarea__json__result {
  flex: 1;
  min-height: 260px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  color: var(--success);
  font-family: var(--mono);
  font-size: 0.8rem;
  resize: none;
  line-height: 1.5;
}

/* Contributors */
.contributors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
}

.avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.avatar img:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p + p { margin-top: 8px; }

.site-footer a { color: var(--accent); }
