/* style.css */
:root {
  --bg: #0b1120;
  --surface: #111827;
  --border: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dim: #0c4a6e;
  --green: #34d399;
  --red: #f87171;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

code, pre {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

code { padding: 0.15em 0.4em; }
pre { padding: 1.25rem; overflow-x: auto; line-height: 1.6; margin: 1rem 0; }

.container { max-width: 900px; margin: 0 auto; padding: 2rem 1.25rem; }

.site-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.site-logo { height: 36px; width: auto; }

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--text-muted);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
h2 { font-size: 1.4rem; font-weight: 600; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }

.endpoint {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
}

.method {
  padding: 0.2em 0.6em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.method.get { background: var(--accent-dim); color: var(--accent); }
.method.post { background: #064e3b; color: var(--green); }

.endpoint-path { color: var(--text); }

.endpoint-body { padding: 1.25rem; }
.endpoint-body p { margin-bottom: 0.5rem; }

.example-block { margin: 1rem 0; }

.example-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.playground {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.playground-input { display: flex; flex-direction: column; gap: 0.75rem; }

.playground-input label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.playground-input input,
.playground-input textarea,
.playground-input select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

.playground-input textarea { min-height: 120px; resize: vertical; }

.playground-input input:focus,
.playground-input textarea:focus,
.playground-input select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  background: var(--accent);
  color: #0b1120;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.9; }

.preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 1rem;
  overflow: auto;
}

.preview svg { max-width: 100%; height: auto; }

.preview-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 700px) {
  .playground { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; align-items: flex-start; }
}