:root{
  --bg:#0b0c10;
  --surface:#12131a;
  --card:#171821;
  --border:rgba(255,255,255,.08);
  --text:#f1f5f9;
  --muted:#94a3b8;
  --accent:#38bdf8;
  --accent-2:#a78bfa;
  --accent-3:#2dd4bf;
  --danger:#f87171;
  --success:#4ade80;
  --warning:#fbbf24;
  --shadow:0 24px 80px rgba(0,0,0,.45);
  --radius:14px;
  --font:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth; scroll-padding-top:100px;}
body{
  margin:0;
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}

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

.ambient{
  position:fixed;
  border-radius:50%;
  filter:blur(120px);
  opacity:.22;
  pointer-events:none;
  z-index:0;
}
.ambient-1{
  width:700px; height:700px;
  background:radial-gradient(circle, var(--accent-2), transparent 65%);
  top:-200px; right:-150px;
}
.ambient-2{
  width:600px; height:600px;
  background:radial-gradient(circle, var(--accent-3), transparent 65%);
  bottom:-120px; left:-120px;
}

.container{width:min(1200px, 100% - 40px); margin:0 auto;}

.topbar{
  position:fixed;
  inset:0 0 auto 0;
  z-index:100;
  background:rgba(11,12,16,.75);
  backdrop-filter:blur(18px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:72px;
  gap:20px;
}
.brand{
  display:flex; align-items:center; gap:12px;
  color:var(--text); font-weight:700; font-size:18px; text-decoration:none;
}
.brand:hover{text-decoration:none;}
.brand-icon{
  width:36px; height:36px; border-radius:10px;
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:13px; color:#fff;
}
.brand-muted{color:var(--muted); font-weight:500;}

.search{
  position:relative;
  display:flex; align-items:center;
  flex:1; max-width:320px;
}
.search-icon{
  position:absolute; left:14px; color:var(--muted);
  pointer-events:none;
}
.search input{
  width:100%;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:999px;
  padding:10px 16px 10px 40px;
  color:var(--text);
  font-family:inherit;
  font-size:14px;
  outline:none;
  transition:border .2s, box-shadow .2s;
}
.search input:focus{
  border-color:rgba(56,189,248,.4);
  box-shadow:0 0 0 3px rgba(56,189,248,.12);
}
.search kbd{
  position:absolute; right:10px;
  font-size:11px; color:var(--muted);
  background:var(--surface); border:1px solid var(--border);
  padding:2px 6px; border-radius:6px;
  display:none;
}
@media (min-width:900px){ .search kbd{display:block;} }

.menu-toggle{
  display:flex; flex-direction:column; gap:5px;
  background:transparent; border:none; cursor:pointer; padding:8px;
}
.menu-toggle span{
  display:block; width:24px; height:2px; background:var(--text);
  border-radius:2px; transition:.2s;
}
@media (min-width:900px){ .menu-toggle{display:none;} }

.layout{
  position:relative; z-index:1;
  display:grid;
  grid-template-columns:260px 1fr;
  gap:40px;
  padding-top:100px;
  max-width:1400px;
  margin:0 auto;
  padding-bottom:60px;
}
@media (max-width:899px){
  .layout{grid-template-columns:1fr; padding-top:92px; gap:24px;}
}

.sidebar{
  position:sticky; top:100px; align-self:start;
  padding-left:24px;
}
@media (max-width:899px){
  .sidebar{
    position:fixed; inset:72px 0 auto 0;
    background:rgba(11,12,16,.95);
    backdrop-filter:blur(20px);
    border-bottom:1px solid var(--border);
    padding:20px;
    transform:translateY(-120%);
    opacity:0;
    pointer-events:none;
    transition:.25s ease;
    max-height:calc(100vh - 72px); overflow:auto;
    z-index:90;
  }
  .sidebar.open{transform:translateY(0); opacity:1; pointer-events:auto;}
}

.nav{display:flex; flex-direction:column; gap:26px;}
.nav-group{display:flex; flex-direction:column; gap:6px;}
.nav-title{
  font-size:11px; font-weight:700; text-transform:uppercase;
  letter-spacing:.08em; color:var(--muted); padding:0 12px;
}
.nav-link{
  display:flex; align-items:center;
  padding:8px 12px; border-radius:8px;
  color:var(--muted); font-size:14px; font-weight:500;
  transition:background .15s, color .15s;
  border-left:2px solid transparent;
}
.nav-link:hover, .nav-link.active{
  background:rgba(56,189,248,.08);
  color:var(--text);
  text-decoration:none;
  border-left-color:var(--accent);
}

.main{
  padding-right:24px;
  min-width:0;
}
@media (max-width:899px){ .main{padding:0 20px;} }

.hero{
  padding:60px 0 40px;
  text-align:center;
}
.hero-pill{
  display:inline-flex;
  background:var(--card); border:1px solid var(--border);
  color:var(--accent); font-size:12px; font-weight:600;
  padding:6px 14px; border-radius:999px; margin-bottom:20px;
}
.hero-title{
  font-size:clamp(38px,6vw,68px); font-weight:800; line-height:1.05;
  margin:0 0 18px; letter-spacing:-.02em;
}
.gradient-text{
  background:linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero-lead{
  font-size:clamp(16px,2vw,20px); color:var(--muted);
  max-width:620px; margin:0 auto 28px;
}
.hero-actions{
  display:flex; justify-content:center; gap:14px; flex-wrap:wrap;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px; padding:12px 24px; border-radius:10px;
  font-weight:600; font-size:15px; cursor:pointer;
  border:1px solid transparent; transition:transform .15s, box-shadow .15s;
  text-decoration:none;
}
.btn:hover{transform:translateY(-1px); text-decoration:none;}
.btn.primary{
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#0b0c10; box-shadow:0 8px 24px rgba(56,189,248,.25);
}
.btn.ghost{
  background:transparent; border-color:var(--border); color:var(--text);
}
.btn.ghost:hover{border-color:rgba(255,255,255,.2);}

.section{
  padding:40px 0;
  border-bottom:1px solid var(--border);
}
.section:last-of-type{border-bottom:none;}
.section-header{
  display:flex; align-items:center; gap:14px; margin-bottom:20px;
}
.section-num{
  width:40px; height:40px; border-radius:10px;
  background:var(--card); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color:var(--accent); font-weight:700; font-size:14px;
}
.section h2{
  font-size:clamp(26px,3vw,34px); font-weight:700; margin:0;
}
.section-intro{
  color:var(--muted); font-size:16px; max-width:760px; margin:0 0 24px;
}

.grid{display:grid; gap:18px;}
.cards{grid-template-columns:repeat(auto-fit, minmax(260px,1fr));}
.cards.two{grid-template-columns:repeat(auto-fit, minmax(300px,1fr));}

.card{
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius); padding:22px;
  box-shadow:var(--shadow);
  transition:transform .2s, border-color .2s;
}
.card:hover{transform:translateY(-2px); border-color:rgba(255,255,255,.14);}
.card-icon{
  width:34px; height:34px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; color:#0b0c10; margin-bottom:14px;
}
.card-icon.blue{background:var(--accent);}
.card-icon.purple{background:var(--accent-2);}
.card-icon.cyan{background:var(--accent-3);}
.card h3{margin:0 0 8px; font-size:18px; font-weight:600;}
.card p{margin:0; color:var(--muted); font-size:14px;}

.steps{padding-left:20px;}
.steps li{margin-bottom:12px; color:var(--muted);}
.steps li::marker{color:var(--accent);}

.tabs{display:flex; gap:8px; margin-bottom:20px;}
.tab{
  background:var(--card); border:1px solid var(--border); color:var(--muted);
  padding:8px 18px; border-radius:8px; cursor:pointer; font-weight:500;
  transition:.15s;
}
.tab.active{background:rgba(56,189,248,.12); color:var(--text); border-color:rgba(56,189,248,.35);}
.tab:hover{color:var(--text);}
.tab-panel{display:none; animation:fadeIn .25s ease;}
.tab-panel.active{display:block;}
@keyframes fadeIn{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);}}

.code-block{
  background:#0e1016; border:1px solid var(--border); border-radius:12px;
  overflow:hidden; margin:18px 0;
}
.code-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px; background:var(--surface);
  border-bottom:1px solid var(--border); font-size:12px; color:var(--muted);
}
.code-header button{
  background:transparent; border:1px solid var(--border); color:var(--muted);
  border-radius:6px; padding:4px 10px; cursor:pointer; font-size:12px;
}
.code-header button:hover{color:var(--text); border-color:rgba(255,255,255,.2);}
pre{margin:0; padding:16px; overflow:auto;}
code{
  font-family:var(--mono); font-size:13.5px; line-height:1.55;
  color:#e2e8f0;
}
p code, li code, td code{
  background:rgba(56,189,248,.12); color:var(--accent);
  padding:2px 6px; border-radius:5px; font-size:.9em;
}

.info-box{
  background:rgba(45,212,191,.08); border:1px solid rgba(45,212,191,.25);
  border-left:4px solid var(--accent-3); border-radius:10px;
  padding:16px 18px; color:var(--text); font-size:14px; margin:18px 0;
}
.info-box.warning{background:rgba(251,191,36,.08); border-color:rgba(251,191,36,.25); border-left-color:var(--warning);}
.info-box strong{color:var(--accent-3);}
.info-box.warning strong{color:var(--warning);}

.table{
  width:100%; border-collapse:collapse; margin:18px 0;
  background:var(--card); border:1px solid var(--border); border-radius:12px;
  overflow:hidden;
}
.table th, .table td{
  padding:14px 16px; text-align:left; border-bottom:1px solid var(--border);
  font-size:14px;
}
.table th{background:var(--surface); color:var(--text); font-weight:600;}
.table td{color:var(--muted);}
.table tr:last-child td{border-bottom:none;}
@media (max-width:600px){
  .table{display:block; overflow:auto; white-space:nowrap;}
}

.endpoint-list{display:flex; flex-direction:column; gap:10px; margin:18px 0;}
.endpoint{
  display:flex; align-items:center; gap:14px;
  background:var(--card); border:1px solid var(--border);
  border-radius:10px; padding:12px 16px;
}
.endpoint .method{
  font-family:var(--mono); font-size:12px; font-weight:700;
  padding:3px 8px; border-radius:5px;
}
.method.get{background:rgba(56,189,248,.15); color:var(--accent);}
.method.post{background:rgba(167,139,250,.15); color:var(--accent-2);}
.endpoint code{font-family:var(--mono); font-size:13px; color:var(--text);}
.endpoint span:last-child{margin-left:auto; color:var(--muted); font-size:13px;}

.faq-list{display:flex; flex-direction:column; gap:12px;}
.faq{
  background:var(--card); border:1px solid var(--border);
  border-radius:12px; padding:16px 18px;
}
.faq summary{
  cursor:pointer; font-weight:600; color:var(--text);
  list-style:none; display:flex; align-items:center; justify-content:space-between;
}
.faq summary::-webkit-details-marker{display:none;}
.faq summary::after{
  content:'+'; font-size:20px; color:var(--accent); transition:.2s;
}
.faq[open] summary::after{content:'−';}
.faq p{margin:12px 0 0; color:var(--muted); font-size:14px;}

.footer{
  padding:40px 0 60px; text-align:center; color:var(--muted); font-size:13px;
}
.footer-inner{
  display:flex; align-items:center; justify-content:center; gap:10px;
}
.brand-icon.small{width:28px; height:28px; font-size:11px;}

.search-match{background:rgba(56,189,248,.25); border-radius:3px;}
.hidden-by-search{display:none !important;}

@media (max-width:899px){
  .hero{padding:40px 0 24px;}
  .cards.two{grid-template-columns:1fr;}
  .section{padding:28px 0;}
}
