/* ---------- Base Theme ---------- */
:root {
  --bg: #0a0a0a;
  --panel: #111214;
  --panel-2: #0f1113;
  --text: #e6e6e6;
  --muted: #b3b3b3;
  --link: #9ae6b4;
  --link-contrast: #0a0f0a;
  --border: #22252b;
  --accent: #34d399;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(52,211,153,0.10), transparent 60%) , var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; }
.wrap { flex-wrap: wrap; }
.center { align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 12px; }
.mtop { margin-top: 12px; }
.sep { opacity: .5; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(6px);
  background: rgba(10,10,10,0.85);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; letter-spacing: .2px; }
.nav a { color: var(--muted); text-decoration: none; margin-right: 16px; font-size: 14px; }
.nav a:hover { color: #fff; }
.cta .btn { margin-left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border-radius: 12px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
}
.btn.primary { background: var(--accent); color: #0b0f0c; }
.btn.primary:hover { filter: brightness(0.95); }
.btn.ghost { background: #ffffff14; color: #fff; border: 1px solid #ffffff22; }
.btn.ghost:hover { background: #ffffff24; }
.btn.outline { background: transparent; color: #fff; border: 1px solid #ffffff22; }
.btn.outline:hover { background: #ffffff10; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; border-top: 1px solid var(--border); }
.section.alt { background: linear-gradient(0deg, rgba(255,255,255,0.02), rgba(255,255,255,0.02)); }

.hero { padding: 64px 0 40px; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.1; margin: 0 0 10px; }
.muted { color: var(--muted); }
.note { margin-top: 10px; font-size: 12px; color: #a0a0a0; }

/* ---------- Layout Helpers ---------- */
.grid2 {
  display: grid;
  grid-template-columns: 1fr;
}
.grid3 {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .grid2 { grid-template-columns: 1.1fr 0.9fr; }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 859px) {
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Cards & Code ---------- */
.card {
  background: linear-gradient(180deg, #ffffff12, #ffffff06);
  border: 1px solid #ffffff22;
  border-radius: 18px;
  padding: 18px;
}
.card h3 { margin: 0; }
.card .badge {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: #ffffff18; border: 1px solid #ffffff22;
}
.card .actions { margin-top: 10px; }
.card .actions .btn { font-size: 12px; padding: 6px 10px; border-radius: 10px; }

pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre {
  margin: 0;
  background: #00000080;
  border: 1px solid #00000060;
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.45;
}
.code .rowhead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 6px; color: var(--muted); }

.copy {
  font-size: 10px; padding: 4px 8px; border-radius: 8px;
  background: #ffffff18; border: 1px solid #ffffff22; color: #fff;
}
.copy:hover { background: #ffffff28; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
thead th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 8px 12px;
}
tbody td {
  background: #ffffff0a; border-top: 1px solid #ffffff22; border-bottom: 1px solid #ffffff22;
  padding: 12px; font-size: 14px;
}
tbody tr td:first-child { border-left: 1px solid #ffffff22; border-radius: 10px 0 0 10px; }
tbody tr td:last-child { border-right: 1px solid #ffffff22; border-radius: 0 10px 10px 0; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
}
.footer a { color: var(--text); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #111; color: #fff; border: 1px solid #333;
  padding: 10px 12px; border-radius: 10px; font-size: 12px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.toast.show { opacity: 1; }
