@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --border: #2a2a3a;
  --border-bright: #3d3d55;
  --text: #e8e8f0;
  --text-dim: #8888a0;
  --text-dimmer: #4a4a60;
  --accent: #6ee7b7;
  --accent2: #818cf8;
  --accent3: #f472b6;
  --danger: #f87171;
  --warning: #fbbf24;
  --code-bg: #0d1117;
  --radius: 6px;
  --mono: 'Space Mono', monospace;
  --sans: 'Syne', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

/* ─── LINKS ─── */
a { color: var(--accent2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); }

/* ─── NAVBAR ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.navbar-brand .brand-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

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

.nav-link {
  color: var(--text-dim);
  font-size: 13px;
  font-family: var(--mono);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg3);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-bright);
  object-fit: cover;
}
.username-badge {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
}
.btn-primary:hover { background: #a7f3d0; color: #0a0a0f; transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-bright); background: var(--bg3); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.1); }
.btn-github {
  background: var(--text);
  color: #0a0a0f;
  font-size: 13px;
  padding: 9px 18px;
}
.btn-github:hover { background: #d0d0e0; transform: translateY(-1px); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ─── CARDS ─── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-bright); }
.card-title {
  font-size: 14px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.card-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* ─── FORM ELEMENTS ─── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 9px 13px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus { border-color: var(--accent2); }
.form-input::placeholder { color: var(--text-dimmer); }
.form-select { cursor: pointer; }
.form-hint {
  font-size: 11px;
  color: var(--text-dimmer);
  margin-top: 5px;
  font-family: var(--mono);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ─── TOGGLE / CHECKBOX ─── */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background: var(--text-dimmer);
  border-radius: 50%;
  transition: all 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); background: #0a0a0f; }
.toggle-label { font-size: 13px; color: var(--text-dim); }

/* ─── FILE DROP ZONE ─── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  background: var(--bg2);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent2);
  background: rgba(129, 140, 248, 0.04);
}
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-zone-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.6; }
.drop-zone-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.drop-zone-sub { font-size: 12px; color: var(--text-dim); font-family: var(--mono); }
.drop-zone-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

/* ─── FILE LIST ─── */
.file-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
}
.file-list-header {
  padding: 8px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  transition: background 0.1s;
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--bg3); }
.file-icon { font-size: 14px; flex-shrink: 0; }
.file-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.file-size { color: var(--text-dimmer); font-size: 11px; flex-shrink: 0; }
.file-remove {
  background: none;
  border: none;
  color: var(--text-dimmer);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 14px;
  transition: color 0.15s;
}
.file-remove:hover { color: var(--danger); }

/* ─── STATUS / ALERTS ─── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: rgba(110, 231, 183, 0.08); border: 1px solid rgba(110, 231, 183, 0.25); color: var(--accent); }
.alert-error { background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.25); color: var(--danger); }
.alert-info { background: rgba(129, 140, 248, 0.08); border: 1px solid rgba(129, 140, 248, 0.25); color: var(--accent2); }
.alert-warn { background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.25); color: var(--warning); }

/* ─── PROGRESS ─── */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}
.progress-fill.indeterminate {
  width: 40%;
  animation: progressIndeterminate 1.4s ease infinite;
}
@keyframes progressIndeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ─── TAG / BADGE ─── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-green { background: rgba(110, 231, 183, 0.12); color: var(--accent); }
.badge-purple { background: rgba(129, 140, 248, 0.12); color: var(--accent2); }
.badge-red { background: rgba(248, 113, 113, 0.12); color: var(--danger); }
.badge-dim { background: var(--bg3); color: var(--text-dim); }

/* ─── REPO CARDS ─── */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.repo-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  transition: all 0.2s;
}
.repo-card:hover { border-color: var(--border-bright); }
.repo-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.repo-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent2);
}
.repo-desc { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; min-height: 18px; }
.repo-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dimmer);
}

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  padding: 28px;
  width: 440px;
  max-width: 90vw;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.modal-body { font-size: 13px; color: var(--text-dim); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ─── HERO ─── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(129,140,248,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--accent); }
.hero-sub {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── FEATURES ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 60px;
}
.feature-card {
  padding: 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.feature-icon { font-size: 24px; margin-bottom: 12px; }
.feature-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: 12px; color: var(--text-dim); line-height: 1.6; }

/* ─── LAYOUT ─── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.page-content {
  padding: 32px 0 80px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
}
.section-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 3px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

/* ─── UTILS ─── */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }
.text-dim { color: var(--text-dim); }
.text-mono { font-family: var(--mono); }
.text-sm { font-size: 12px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }

/* ─── SPINNER ─── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dimmer);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .navbar { padding: 0 16px; }
  .container { padding: 0 16px; }
  .hero h1 { letter-spacing: -1px; }
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s ease forwards; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.1s; }
.fade-up-3 { animation-delay: 0.15s; }
.fade-up-4 { animation-delay: 0.2s; }

/* ─── DOCS PAGE — utility classes (no-inline-styles fix) ─── */
.docs-section-header   { margin-bottom: 32px; }
.docs-base-url         { color: var(--accent2); }
.docs-badge-row        { display: flex; gap: 8px; }
.endpoint-method-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }

.docs-section-label {
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text-dimmer);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.docs-section-label-gap { margin-top: 32px; }

.docs-subsection-label {
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 12px;
  color: var(--text-dim);
}

.params-table-wrap   { margin-bottom: 24px; }
.param-header-note   { font-size: 10px; color: var(--text-dimmer); }