/* =========================================================================
   DOCS ENGINE v4 — Neo-Cinematic Dark Theme
   Matching DramaPop reference design (grid overlay, rose accent, accordion EPs)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600;700&family=Prompt:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --font: 'Manrope', 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
  --ink: #070709;
  --panel: #0e1017;
  --card: #10121a;
  --card-inner: #141722;
  --line: rgba(255,255,255,0.10);
  --line-hover: rgba(255,255,255,0.16);
  --line-active: rgba(244,63,94,0.50);
  --rose: #f43f5e;
  --rose-bg: rgba(244,63,94,0.12);
  --rose-glow: 0 0 24px rgba(244,63,94,0.25);
  --cyan: #63d7ff;
  --cyan-bg: rgba(99,215,255,0.10);
  --emerald: #10b981;
  --emerald-bg: rgba(16,185,129,0.15);
  --amber: #f59e0b;
  --amber-bg: rgba(245,158,11,0.12);
  --purple: #a78bfa;
  --purple-bg: rgba(167,139,250,0.12);
  --text-1: #f8fafc;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --text-4: #475569;
  --radius-2xl: 1.25rem;
  --radius-xl: 0.875rem;
  --radius-lg: 0.75rem;
  --radius-md: 0.625rem;
  --radius-sm: 0.5rem;
  --radius-pill: 9999px;
  --shadow: 0 10px 30px rgba(0,0,0,0.5);
  --transition: all .25s ease;
}

body {
  font-family: var(--font);
  background: var(--ink);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(244,63,94,0.12), transparent 30rem),
    radial-gradient(circle at 85% 75%, rgba(168,85,247,0.12), transparent 32rem),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
  color: var(--text-1);
  min-height: 100vh;
  padding-top: 64px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--rose); color: #fff; }
button, input, select, textarea { font: inherit; }
a { color: var(--cyan); text-decoration: none; transition: var(--transition); }
a:hover { color: #a5d8ff; }

/* ── Animations ──────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.5; transform:scale(1.3); } }
@keyframes shimmer { 0% { background-position:-200% 0; } 100% { background-position:200% 0; } }
.fade-up { animation: fadeUp .45s cubic-bezier(.22,1,.36,1) forwards; }
.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .12s; }

/* ── Navbar ──────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 64px; z-index: 1000;
  background: rgba(7,7,9,0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(12px, 3vw, 28px);
  gap: 8px;
}
.nav-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.logo { width: 32px; height: 32px; min-width: 32px; border-radius: var(--radius-xl); overflow: hidden; box-shadow: 0 0 12px rgba(244,63,94,0.4); transition: transform .3s; }
.logo:hover { transform: scale(1.05); }
.logo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-xl); }
.nav-title { font-size: 14px; font-weight: 900; color: #fff; white-space: nowrap; letter-spacing: -.3px; }
.nav-title .accent { color: var(--rose); }
.nav-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-xl);
  font-size: 12px; font-weight: 700;
  border: 1px solid var(--line); background: rgba(255,255,255,0.05);
  color: var(--text-2); cursor: pointer;
  transition: var(--transition); white-space: nowrap; text-decoration: none;
}
.btn:hover { background: rgba(244,63,94,0.15); color: var(--rose); border-color: rgba(244,63,94,0.3); text-decoration: none; }
.btn:active { transform: scale(.95); }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-primary { background: var(--rose); color: #fff; border: none; box-shadow: 0 4px 14px rgba(244,63,94,0.3); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(244,63,94,0.5); transform: translateY(-1px); color: #fff; }
.btn-cyan { background: var(--cyan-bg); color: var(--cyan); border-color: rgba(99,215,255,0.3); }
.btn-cyan:hover { background: rgba(99,215,255,0.2); }

/* ── Nav Dropdown ────────────────────────── */
.nav-dropdown { position: relative; display: inline-block; }
#platformMenu {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-2xl);
  box-shadow: var(--shadow); min-width: 260px; max-width: calc(100vw - 20px);
  max-height: 80vh; overflow-y: auto; z-index: 999999; padding: 6px 0;
}
#platformMenu.open { display: block !important; }
#platformMenu a { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; font-size: 12px; color: var(--text-2); gap: 8px; transition: background .15s; }
#platformMenu a:hover { background: var(--rose-bg); color: #fff; }
.nav-mobile-toggle { display: none; }

/* ── Badges ──────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.badge-green { background: var(--emerald-bg); color: var(--emerald); border: 1px solid rgba(16,185,129,0.3); }
.badge-rose { background: var(--rose-bg); color: var(--rose); border: 1px solid rgba(244,63,94,0.3); }
.badge-cyan { background: var(--cyan-bg); color: var(--cyan); border: 1px solid rgba(99,215,255,0.3); }
.badge-amber { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(245,158,11,0.3); }
.badge-purple { background: var(--purple-bg); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); }
.badge-slate { background: rgba(100,116,139,0.12); color: var(--text-3); border: 1px solid var(--line); }
.badge-red { background: var(--rose-bg); color: var(--rose); border: 1px solid rgba(244,63,94,0.3); }
.badge-yellow { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(245,158,11,0.3); }
.badge-blue { background: var(--cyan-bg); color: var(--cyan); border: 1px solid rgba(99,215,255,0.3); }

/* ── Layout ──────────────────────────────── */
.container { width: 100%; max-width: 900px; margin: 0 auto; padding: 28px clamp(12px,4vw,24px); flex: 1; display: flex; flex-direction: column; gap: 24px; }

/* ── Neo Card (Primary container) ────────── */
.neo-card {
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}
.neo-card:hover { border-color: rgba(244,63,94,0.4); }

.neo-card-sm {
  border: 1px solid var(--line);
  background: var(--card-inner);
  border-radius: var(--radius-xl);
}

.card { composes: neo-card; border: 2px solid var(--line); background: var(--card); border-radius: var(--radius-2xl); box-shadow: var(--shadow); transition: var(--transition); overflow: hidden; }
.card:hover { border-color: rgba(244,63,94,0.4); }
.card-body { padding: 20px; }

/* ── Switcher Bar ────────────────────────── */
.switcher-bar { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.switcher-bar::-webkit-scrollbar { display: none; }
.switcher-item {
  display: flex; align-items: center; gap: 5px; padding: 5px 10px;
  border-radius: var(--radius-xl); border: 1px solid var(--line);
  background: rgba(255,255,255,0.03); color: var(--text-3);
  font-size: 11px; font-weight: 700; white-space: nowrap;
  transition: var(--transition); text-decoration: none; flex-shrink: 0;
}
.switcher-item:hover { border-color: rgba(244,63,94,0.3); background: var(--rose-bg); color: var(--rose); text-decoration: none; }
.switcher-item.active { background: var(--rose); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(244,63,94,0.3); }
.switcher-item img { width: 14px; height: 14px; border-radius: 3px; object-fit: cover; }

/* ── Hero Section ────────────────────────── */
.hero { text-align: center; padding: 40px 16px 32px; position: relative; }
.hero-icon {
  width: 64px; height: 64px; border-radius: var(--radius-2xl);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; color: #fff; font-size: 22px; font-weight: 900;
  box-shadow: 0 0 24px rgba(244,63,94,0.4);
  transition: transform .3s;
}
.hero-icon:hover { transform: scale(1.05) translateY(-2px); }
.hero h1 {
  font-size: clamp(24px,5vw,34px); font-weight: 900; letter-spacing: -.5px; line-height: 1.2; margin-bottom: 8px;
  background: linear-gradient(135deg, #63d7ff 0%, #c4b5fd 50%, #f43f5e 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { font-size: clamp(12px,2.5vw,14px); color: var(--text-2); max-width: 520px; margin: 0 auto; line-height: 1.7; }
.hero-actions { margin-top: 16px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* ── API Key Bar ─────────────────────────── */
.apikey-bar .card-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.apikey-bar label { font-size: 11px; font-weight: 800; color: var(--text-2); display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.apikey-bar input, .apikey-bar select {
  width: 100%; height: 40px; background: var(--card-inner); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 0 12px; color: var(--cyan); font-family: var(--mono); font-size: 12px;
  outline: none; transition: var(--transition);
}
.apikey-bar input:focus, .apikey-bar select:focus { border-color: var(--rose); box-shadow: 0 0 0 2px rgba(244,63,94,0.2); }
.apikey-bar .save-btn {
  height: 40px; background: rgba(255,255,255,0.10); color: #fff; border: none;
  border-radius: var(--radius-xl); padding: 0 16px; font-size: 12px; font-weight: 800;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.apikey-bar .save-btn:hover { background: rgba(255,255,255,0.2); }
.apikey-bar .key-row { display: flex; gap: 8px; }

/* ── Section Titles ──────────────────────── */
.section { display: flex; flex-direction: column; gap: 12px; }
.section-title {
  font-size: 12px; font-weight: 900; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px;
  display: flex; align-items: center; gap: 6px;
}
.section-title svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Auth Card ───────────────────────────── */
.auth-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-example { padding: 16px; background: rgba(0,0,0,0.4); border-radius: var(--radius-xl); border: 1px solid var(--line); }
.auth-example h4 { font-size: 10px; font-weight: 900; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.auth-curl { font-family: var(--mono); font-size: 12px; color: var(--text-1); background: rgba(0,0,0,0.6); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; line-height: 1.6; word-break: break-all; }
.rate-table { width: 100%; border-collapse: collapse; }
.rate-table th, .rate-table td { text-align: left; padding: 8px 0; font-size: 12px; }
.rate-table th { color: var(--text-4); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; border-bottom: 1px solid var(--line); }
.rate-table td { border-bottom: 1px solid var(--line); color: var(--text-2); }
.rate-table td:last-child { font-weight: 800; color: #fff; }

/* ── Language Chips ──────────────────────── */
.lang-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-chip {
  padding: 4px 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 700;
  color: var(--text-3); font-family: var(--mono); transition: var(--transition);
}
.lang-chip:hover { border-color: var(--rose); color: var(--rose); background: var(--rose-bg); }

/* ── Endpoint Card (Smooth Accordion) ─────── */
.endpoint {
  border: 1px solid var(--line);
  background: var(--card-inner);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform, box-shadow;
}
.endpoint:hover { border-color: rgba(244,63,94,0.3); }
.endpoint.open {
  border-color: rgba(244,63,94,0.5);
  box-shadow: 0 8px 32px rgba(244,63,94,0.12);
}

.endpoint-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; cursor: pointer; gap: 10px;
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.endpoint-header:hover { background: rgba(255,255,255,0.035); }

.endpoint-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }

.method-badge {
  padding: 3px 9px; border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 10px; font-weight: 900; letter-spacing: .5px;
  background: var(--emerald-bg); color: var(--emerald);
  border: 1px solid rgba(16,185,129,0.3); flex-shrink: 0;
  transition: transform 0.2s ease;
}
.method-badge.post { background: var(--amber-bg); color: var(--amber); border-color: rgba(245,158,11,0.3); }

.endpoint-path { font-family: var(--mono); font-size: 13px; color: #fff; font-weight: 700; word-break: break-all; }
.endpoint-desc-short { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

.endpoint-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.endpoint-chevron {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  color: var(--text-3);
}
.endpoint.open .endpoint-chevron { transform: rotate(180deg); color: var(--rose); }

/* ── Silky Smooth Accordion Collapse System ── */
.endpoint-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.endpoint.open .endpoint-collapse {
  grid-template-rows: 1fr;
}
.endpoint-collapse-inner {
  overflow: hidden;
  min-height: 0;
}

/* ── Endpoint Body (Expanded) ────────────── */
.endpoint-body {
  border-top: 1px solid var(--line);
  background: rgba(7,7,9,0.5);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.endpoint-body-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.65; }

/* Params form grid */
.params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.param-card {
  padding: 12px 14px; background: rgba(0,0,0,0.4); border: 1px solid var(--line);
  border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.param-card:hover { border-color: rgba(255,255,255,0.18); background: rgba(0,0,0,0.55); }
.param-card-header { display: flex; align-items: center; justify-content: space-between; }
.param-name { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--cyan); }
.param-req { font-size: 9px; font-weight: 900; text-transform: uppercase; }
.param-req.required { color: var(--rose); }
.param-req.optional { color: var(--text-4); }

/* ── Request URL Preview ─────────────────── */
.url-preview {
  padding: 13px 16px; border-radius: var(--radius-lg);
  background: rgba(0,0,0,0.6); border: 1px solid var(--line);
  overflow-x: auto;
  margin-top: 4px;
  transition: border-color 0.2s ease;
}
.url-preview:hover { border-color: rgba(16,185,129,0.3); }
.url-preview code { font-family: var(--mono); font-size: 12.5px; color: var(--emerald); font-weight: 700; display: block; min-width: max-content; }

/* ── Action Buttons Row (Silky Smooth) ──── */
.action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 6px 0 10px;
}

.send-btn {
  padding: 11px 24px; border-radius: var(--radius-md);
  background: var(--rose); color: #fff; border: none;
  font-size: 13px; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
  box-shadow: 0 4px 14px rgba(244,63,94,0.3);
  will-change: transform, box-shadow;
}
.send-btn:hover { box-shadow: 0 8px 24px rgba(244,63,94,0.5); transform: translateY(-2px); }
.send-btn:active { transform: translateY(0) scale(0.97); }
.send-btn:disabled { opacity: .5; cursor: not-allowed; }
.send-btn svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.send-btn:hover svg { transform: scale(1.15); }

.copy-btn {
  padding: 11px 18px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08); color: #fff; border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}
.copy-btn:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.25); transform: translateY(-1.5px); }
.copy-btn:active { transform: translateY(0) scale(0.97); }

/* ── Response Console ────────────────────── */
.response-console {
  border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.15);
  background: var(--ink); overflow: hidden;
  margin-top: 4px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.response-console:hover { border-color: rgba(255,255,255,0.25); }
.response-console-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.03); font-family: var(--mono); font-size: 11.5px;
}
.response-console-body {
  padding: 16px 18px; max-height: 360px; overflow: auto;
  font-family: var(--mono); font-size: 12px; color: var(--text-2);
  line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  animation: softFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
/* When body contains an image, reset text styles */
.response-console-body:has(img) {
  white-space: normal;
  word-break: normal;
}

@keyframes softFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── curl block ──────────────────────────── */
.curl-block { padding: 14px 16px; border-top: 1px solid var(--line); }
.curl-label { font-size: 10px; font-weight: 900; color: var(--text-4); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.curl-code { background: rgba(0,0,0,0.6); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; padding-right: 56px; font-family: var(--mono); font-size: 12px; color: #e2e8f0; white-space: pre-wrap; word-break: break-all; position: relative; line-height: 1.7; }
.curl-copy { position: absolute; top: 8px; right: 8px; background: var(--rose-bg); border: 1px solid rgba(244,63,94,0.3); color: var(--rose); padding: 4px 10px; border-radius: 6px; font-size: 10.5px; font-weight: 700; cursor: pointer; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.curl-copy:hover { background: var(--rose); color: #fff; transform: translateY(-1px); }
.curl-copy:active { transform: scale(0.95); }
.try-toggle {
  width: 100%; background: none; border: none; padding: 10px 16px;
  color: var(--rose); font-size: 12px; font-weight: 800;
  text-align: left; display: flex; align-items: center; gap: 6px;
  cursor: pointer; transition: var(--transition); border-top: 1px solid var(--line);
}
.try-toggle:hover { background: var(--rose-bg); }
.try-toggle.open .try-chevron { transform: rotate(180deg); }
.try-chevron { transition: transform .2s ease; }
.try-body { padding: 16px; border-top: 1px solid var(--line); }

/* ── Table compat ────────────────────────── */
.table-container { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.params-table { width: 100%; border-collapse: collapse; min-width: 360px; }
.params-table th { text-align: left; padding: 8px 14px; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-4); font-weight: 700; background: rgba(255,255,255,0.02); white-space: nowrap; }
.params-table td { padding: 8px 14px; font-size: 12px; border-top: 1px solid var(--line); color: var(--text-2); }
.params-table td code { font-family: var(--mono); font-size: 11px; color: var(--cyan); background: var(--cyan-bg); padding: 2px 6px; border-radius: 4px; }

/* ── Footer ──────────────────────────────── */
footer { border-top: 1px solid var(--line) !important; background: rgba(7,7,9,0.8); backdrop-filter: blur(12px); }

/* =========================================================================
   RESPONSIVE — Mobile-First
   ========================================================================= */

@media (max-width: 768px) {
  body { padding-top: 56px; }
  .navbar { height: 56px; }
  .nav-right { display: none; }
  .nav-mobile-toggle { display: block !important; }
  .hero { padding: 24px 8px 20px; }
  .hero-icon { width: 52px; height: 52px; }
  .hero-actions .btn, .hero-actions .btn-primary { width: 100%; justify-content: center; }
  .apikey-bar .card-body { grid-template-columns: 1fr; gap: 12px; }
  .auth-inner { grid-template-columns: 1fr; gap: 12px; }
  .params-grid { grid-template-columns: 1fr; }
  .endpoint-desc-short { display: none; }
  .endpoint-header { padding: 12px; }
  .endpoint-body { padding: 12px; }
  .action-row { flex-direction: column; }
  .send-btn, .copy-btn { width: 100%; justify-content: center; }
  .container { padding: 16px 10px; gap: 16px; }
  .switcher-bar { gap: 4px; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 10px; }
  .logo { width: 28px; height: 28px; min-width: 28px; }
  .nav-title { font-size: 13px; }
  .hero h1 { font-size: 22px; }
  .endpoint-path { font-size: 11px; }
  .container { padding: 12px 8px; gap: 14px; }
}

@media (max-width: 360px) {
  .nav-title .version { display: none; }
  .container { padding: 10px 6px; }
}

/* ── Touch Targets ───────────────────────── */
@media (pointer: coarse) {
  .btn, .switcher-item, .try-toggle, .curl-copy, .send-btn, .copy-btn,
  .apikey-bar .save-btn, #platformMenu a, .lang-chip, .endpoint-header {
    min-height: 44px;
  }
  .params-table td, .params-table th { padding: 12px 14px; }
}

/* ── Landscape Mobile ────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  body { padding-top: 48px; }
  .navbar { height: 48px; }
  .hero { padding: 12px 8px 10px; }
  .hero-icon { width: 40px; height: 40px; }
}

/* ── Ultra Wide ──────────────────────────── */
@media (min-width: 1440px) { .container { max-width: 1000px; } }

/* ── Reduced Motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* ── GPU Accel ───────────────────────────── */
.hero-icon, .card, .neo-card, .switcher-item, .btn, .endpoint { will-change: transform; transform: translateZ(0); }

/* ── Print ───────────────────────────────── */
@media print {
  .navbar, .switcher-bar, .apikey-bar, .try-toggle, .try-body, .hero-actions, .curl-copy, .send-btn, .copy-btn, .nav-dropdown, .action-row, .response-console { display: none !important; }
  body { padding-top: 0; background: #fff; color: #000; }
  .card, .neo-card, .endpoint { box-shadow: none; border: 1px solid #ddd; background: #fff; }
}

/* ── Scrollbar ───────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #222938; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--rose); }