:root {
  --bg:      #0f0f0f;
  --bg2:     #161616;
  --border:  #242424;
  --text:    #e8e8e8;
  --muted:   #666;
  --muted2:  #444;
  --accent:  #4f7cff;
  --mono:    'JetBrains Mono', 'Courier New', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px;
}

/* NAV */
nav {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
}
.nav-inner {
  max-width: 860px; margin: 0 auto; padding: 0 28px;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-size: 15px; font-weight: 600; letter-spacing: -0.2px;
  color: var(--text);
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  font-size: 14px; color: var(--muted);
  transition: color .15s;
}
.nav-links a:hover { color: var(--text); }

/* HERO */
.hero {
  padding: 80px 0 72px;
  border-bottom: 1px solid var(--border);
}
.hero-tag {
  font-family: var(--mono);
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.05em; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 600; letter-spacing: -1px;
  line-height: 1.15; margin-bottom: 18px;
  color: #fff;
}
.hero-sub {
  font-size: 16px; color: var(--muted);
  max-width: 480px; margin-bottom: 32px;
}
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 40px;
}
.btn-primary {
  background: var(--accent); color: #fff;
  padding: 9px 20px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .85; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted); padding: 9px 20px;
  border-radius: 6px; font-size: 14px; font-weight: 500;
  transition: border-color .15s, color .15s;
}
.btn-secondary:hover { border-color: var(--muted2); color: var(--text); }
.hero-meta {
  font-size: 13px; color: var(--muted2);
  font-family: var(--mono);
}
#stat-records { color: var(--muted); }

/* SECTIONS */
section { padding: 64px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

h2 {
  font-size: 20px; font-weight: 600;
  letter-spacing: -0.3px; margin-bottom: 6px;
  color: #fff;
}
.section-sub {
  font-size: 14px; color: var(--muted);
  margin-bottom: 32px;
}

/* SEARCH TYPES */
.search-types {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.st-row {
  display: grid;
  grid-template-columns: 130px 1fr 180px;
  gap: 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.st-row:last-child { border-bottom: none; }
.st-type {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--accent); padding: 14px 18px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.st-desc {
  font-size: 13.5px; color: var(--muted);
  padding: 14px 18px;
}
.st-example {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted2); padding: 14px 18px;
  border-left: 1px solid var(--border);
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}

/* DOCS */
.doc-block { margin-bottom: 40px; }
.doc-block:last-child { margin-bottom: 0; }
.doc-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted2); margin-bottom: 10px;
}
.code-line {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13.5px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 6px; padding: 11px 16px;
}
.code-line code { color: var(--text); }
.code-line em { color: var(--muted); font-style: normal; }
.http-method {
  font-size: 11px; font-weight: 600;
  color: #5dba7d; background: rgba(93,186,125,0.1);
  padding: 2px 7px; border-radius: 3px;
  letter-spacing: 0.04em;
}

table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; font-size: 13.5px;
}
thead tr { background: var(--bg2); }
th {
  text-align: left; padding: 10px 16px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted2); border-bottom: 1px solid var(--border);
}
td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
td code {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--text);
}
.tag-yes {
  font-size: 11px; font-weight: 600;
  background: rgba(93,186,125,0.1); color: #5dba7d;
  padding: 2px 7px; border-radius: 3px;
}
.tag-no {
  font-size: 11px; font-weight: 600;
  background: rgba(102,102,102,0.1); color: var(--muted2);
  padding: 2px 7px; border-radius: 3px;
}

.codeblock {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 6px; padding: 16px; margin-bottom: 10px;
  overflow-x: auto;
}
.cb-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted2); margin-bottom: 10px;
}
.codeblock pre {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--text); line-height: 1.7;
  white-space: pre;
}
.doc-note {
  margin-top: 10px; font-size: 13px; color: var(--muted);
}

/* BUY */
#buy { border-bottom: none; }
.btn-telegram {
  display: inline-flex; align-items: center; gap: 8px;
  background: #229ED9; color: #fff;
  padding: 10px 20px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  margin-top: 4px;
  transition: opacity .15s;
}
.btn-telegram:hover { opacity: .85; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
}
footer .container {
  display: flex; align-items: center;
}
footer span {
  font-size: 13px; color: var(--muted2);
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .st-row { grid-template-columns: 1fr; }
  .st-type { border-right: none; border-bottom: 1px solid var(--border); }
  .st-example { border-left: none; border-top: 1px solid var(--border); }
  .nav-links { gap: 16px; }
}
