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

:root {
  --bg:        #080B12;
  --bg-2:      #0D1120;
  --bg-3:      #111827;
  --bg-4:      #1A2235;
  --border:    rgba(99, 120, 180, 0.15);
  --border-2:  rgba(99, 120, 180, 0.25);
  --text:      #E8EDF8;
  --text-2:    #8B9CC8;
  --text-3:    #4A5A80;
  --accent:    #6EE7F7;
  --accent-2:  #A78BFA;
  --accent-3:  #34D399;
  --danger:    #F87171;
  --warn:      #FBBF24;
  --glow-c:    rgba(110, 231, 247, 0.12);
  --glow-p:    rgba(167, 139, 250, 0.10);
  --radius:    12px;
  --radius-lg: 20px;
  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --font-body:    'Inter', sans-serif;
  --nav-h:     64px;
}

html { scroll-behavior: smooth; }

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

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

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(8, 11, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #080B12;
  letter-spacing: -0.5px;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.logo-sub { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-btn {
  background: none;
  border: none;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.nav-btn:hover { color: var(--text); background: var(--bg-3); }
.nav-btn.active {
  color: var(--accent);
  background: rgba(110, 231, 247, 0.08);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 8px var(--accent-3);
  animation: pulse-dot 2s ease-in-out infinite;
}
.status-dot.loading { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.status-dot.error   { background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: none; }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.status-text {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.nav-settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.nav-settings-btn:hover {
  background: var(--surface-2);
  color: var(--text-1);
  border-color: var(--accent);
}

/* ── API WARNING BANNER ── */
.api-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #FCA5A5;
  margin-top: 12px;
  line-height: 1.5;
  text-align: left;
}
.api-warning svg {
  flex-shrink: 0;
  color: #F87171;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 60px;
  padding-right: 60px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,120,180,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,120,180,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
}
.glow-1 {
  width: 500px; height: 500px;
  background: var(--glow-c);
  top: 10%; left: -10%;
}
.glow-2 {
  width: 400px; height: 400px;
  background: var(--glow-p);
  bottom: 10%; right: 5%;
}
.orb {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: orb-spin 20s linear infinite;
}
.orb-1 {
  width: 300px; height: 300px;
  border-color: rgba(110,231,247,0.08);
  top: 20%; right: 15%;
}
.orb-2 {
  width: 200px; height: 200px;
  border-color: rgba(167,139,250,0.08);
  top: 30%; right: 20%;
  animation-direction: reverse;
  animation-duration: 15s;
}
@keyframes orb-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-content { position: relative; z-index: 1; }
.hero-visual   { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(110,231,247,0.06);
  border: 1px solid rgba(110,231,247,0.2);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 6vw, 80px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 24px;
}
.title-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #080B12;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(110,231,247,0.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(110,231,247,0.04);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Terminal Card */
.terminal-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(110,231,247,0.05);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background: #FF5F57; }
.terminal-dots span:nth-child(2) { background: #FFBD2E; }
.terminal-dots span:nth-child(3) { background: #28CA41; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  margin-left: auto;
}
.terminal-body { padding: 24px; overflow-x: auto; }
.terminal-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  white-space: pre;
  color: var(--text-2);
}
.tc-comment { color: var(--text-3); }
.tc-keyword  { color: var(--accent-2); }
.tc-var      { color: var(--accent); }
.tc-string   { color: var(--accent-3); }
.tc-num      { color: var(--warn); }

/* ── MAIN CONTENT ── */
.main-content {
  min-height: calc(100vh - var(--nav-h));
  padding-top: var(--nav-h);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── CHAT LAYOUT ── */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - var(--nav-h));
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar */
.chat-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-section:last-child { border-bottom: none; }
.sidebar-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.select-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 12px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%234A5A80' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.select-input:focus { border-color: var(--accent); }
.select-input option { background: var(--bg-3); }

.param-group { margin-bottom: 14px; }
.param-group:last-child { margin-bottom: 0; }
.param-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.param-val {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 11px;
}
.range-input {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-4);
  outline: none;
  cursor: pointer;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(110,231,247,0.4);
}

.textarea-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.textarea-input:focus { border-color: var(--accent); }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-2);
  user-select: none;
}
.toggle-input { display: none; }
.toggle-track {
  width: 36px; height: 20px;
  background: var(--bg-4);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-input:checked + .toggle-track { background: rgba(110,231,247,0.3); }
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-3);
  transition: all 0.2s;
}
.toggle-input:checked + .toggle-track .toggle-thumb {
  left: 19px;
  background: var(--accent);
}

.btn-danger-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  color: var(--danger);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}
.btn-danger-sm:hover { background: rgba(248,113,113,0.15); }

/* Chat Area */
.chat-area {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  flex: 1;
}
.welcome-icon {
  width: 64px; height: 64px;
  background: rgba(110,231,247,0.06);
  border: 1px solid rgba(110,231,247,0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.welcome-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.welcome-desc {
  font-size: 14px;
  color: var(--text-2);
  max-width: 400px;
  margin-bottom: 28px;
  line-height: 1.7;
}
.welcome-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 560px;
}
.suggestion-chip {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.suggestion-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(110,231,247,0.04);
}

/* Messages */
.message {
  display: flex;
  gap: 14px;
  animation: msg-in 0.3s ease;
  max-width: 800px;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.message.user { flex-direction: row-reverse; align-self: flex-end; }
.message.assistant { align-self: flex-start; }

.msg-avatar {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.message.user .msg-avatar {
  background: linear-gradient(135deg, var(--accent-2), #7C3AED);
  color: white;
}
.message.assistant .msg-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #080B12;
}

.msg-body { display: flex; flex-direction: column; gap: 4px; max-width: 680px; }
.msg-role {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.message.user .msg-role { text-align: right; }

.msg-content {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.message.user .msg-content {
  background: rgba(110,231,247,0.06);
  border-color: rgba(110,231,247,0.15);
  border-radius: 14px 4px 14px 14px;
}
.message.assistant .msg-content {
  border-radius: 4px 14px 14px 14px;
}

/* Code blocks in messages */
.msg-content code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-4);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}
.msg-content pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  overflow-x: auto;
  margin: 8px 0;
}
.msg-content pre code {
  background: none;
  padding: 0;
  color: var(--text-2);
}

.msg-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}
.message.user .msg-meta { justify-content: flex-end; }
.msg-time {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.msg-copy {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 11px;
  transition: color 0.2s;
}
.msg-copy:hover { color: var(--accent); }

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  animation: msg-in 0.3s ease;
}
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px 14px 14px 14px;
}
.typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typing 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Chat Input */
.chat-input-area {
  padding: 16px 40px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.token-counter {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-bottom: 10px;
  text-align: right;
}
.input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.input-wrapper { flex: 1; }
.chat-textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 16px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  max-height: 200px;
  overflow-y: auto;
}
.chat-textarea:focus { border-color: var(--accent); }
.chat-textarea::placeholder { color: var(--text-3); }

.send-btn {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 12px;
  color: #080B12;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.send-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(110,231,247,0.3); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.input-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 8px;
}
.input-hint kbd {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-2);
}

/* ── DOCS LAYOUT ── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-h));
  max-width: 1400px;
  margin: 0 auto;
}

.docs-nav {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 28px 0;
}
.docs-nav-inner { padding: 0 20px; }
.docs-nav-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.docs-nav-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.docs-nav-link {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s;
}
.docs-nav-link:hover { color: var(--text); background: var(--bg-3); }
.docs-nav-link.active { color: var(--accent); background: rgba(110,231,247,0.08); }

.docs-content {
  padding: 48px 60px;
  max-width: 860px;
}

/* Doc sections */
.doc-section {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.doc-section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.doc-section-subtitle {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 28px;
  line-height: 1.7;
}
.doc-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-right: 8px;
}
.badge-post { background: rgba(110,231,247,0.1); color: var(--accent); border: 1px solid rgba(110,231,247,0.2); }
.badge-get  { background: rgba(52,211,153,0.1); color: var(--accent-3); border: 1px solid rgba(52,211,153,0.2); }

.endpoint-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
}

.doc-code-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
}
.doc-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.doc-code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.doc-code-copy {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}
.doc-code-copy:hover { color: var(--accent); }
.doc-code-body {
  padding: 20px;
  overflow-x: auto;
}
.doc-code-body pre {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-2);
  white-space: pre;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.param-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}
.param-table td {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.param-table tr:last-child td { border-bottom: none; }
.param-table tr:hover td { background: rgba(255,255,255,0.01); }
.param-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.param-type {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  background: rgba(167,139,250,0.08);
  padding: 2px 6px;
  border-radius: 4px;
}
.param-req {
  font-size: 10px;
  color: var(--danger);
  background: rgba(248,113,113,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.param-opt {
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-4);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.6;
}
.callout-info {
  background: rgba(110,231,247,0.05);
  border: 1px solid rgba(110,231,247,0.15);
  color: var(--text-2);
}
.callout-warn {
  background: rgba(251,191,36,0.05);
  border: 1px solid rgba(251,191,36,0.15);
  color: var(--text-2);
}
.callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.error-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.error-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}
.error-table td {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.error-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--danger);
}

/* ── PLAYGROUND ── */
.playground-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 48px;
}
.playground-header { margin-bottom: 32px; }
.playground-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.playground-desc { font-size: 14px; color: var(--text-2); }

.playground-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.pg-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pg-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.pg-method {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(110,231,247,0.1);
  border: 1px solid rgba(110,231,247,0.2);
  padding: 3px 8px;
  border-radius: 5px;
}
.pg-endpoint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-response-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex: 1;
}
.pg-status {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}
.pg-status.ok   { color: var(--accent-3); background: rgba(52,211,153,0.1); }
.pg-status.err  { color: var(--danger); background: rgba(248,113,113,0.1); }
.pg-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.pg-section { flex: 1; padding: 16px; }
.pg-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.pg-response-section { overflow: auto; }

.code-editor {
  width: 100%;
  height: 320px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  padding: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}
.code-editor:focus { border-color: var(--accent); }

.code-output {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 320px;
}

.pg-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-3);
  flex-wrap: wrap;
}

.btn-ghost-sm {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost-sm:hover { border-color: var(--accent); color: var(--accent); }

.btn-copy-sm {
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--text-3);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}
.btn-copy-sm:hover { color: var(--accent); border-color: var(--accent); }

/* cURL section */
.curl-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.curl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.curl-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.curl-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-2);
  padding: 20px;
  overflow-x: auto;
  white-space: pre;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 20px 0;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-3);
}
.footer-logo span { color: var(--accent); }
.footer-sep { color: var(--text-3); margin: 0 8px; }
.footer-copy { font-size: 12px; color: var(--text-3); }
.footer-right { display: flex; gap: 20px; }
.footer-link {
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text);
  z-index: 999;
  animation: toast-in 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.success { border-color: rgba(52,211,153,0.3); color: var(--accent-3); }
.toast.error   { border-color: rgba(248,113,113,0.3); color: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 80px 32px 40px;
    text-align: center;
  }
  .hero-visual { display: none; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-desc { margin: 0 auto 36px; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { display: none; }
  .playground-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; gap: 16px; }
  .nav-status { display: none; }
  .chat-messages { padding: 20px 16px; }
  .chat-input-area { padding: 12px 16px 20px; }
  .docs-content { padding: 28px 20px; }
  .playground-layout { padding: 24px 16px; }
  .footer-inner { padding: 0 20px; flex-direction: column; gap: 12px; text-align: center; }
}