:root {
  --bg: #0b0d12;
  --bg2: #111420;
  --bg3: #161a27;
  --border: #1e2338;
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --blue: #3b82f6;
  --blue-light: #93c5fd;
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
}

a { color: var(--purple-light); text-decoration: none; }
a:hover { color: var(--blue-light); }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,13,18,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-size: 1.25rem; font-weight: 700;
  background: linear-gradient(135deg, var(--purple-light), var(--blue-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -.5px;
}

.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--text-dim); font-size: .9rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative; overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(124,58,237,.18) 0%, transparent 70%);
  pointer-events: none;
}

.badge {
  display: inline-block;
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.4);
  color: var(--purple-light);
  font-size: .75rem; font-weight: 600; letter-spacing: .05em;
  padding: .3rem .8rem; border-radius: 999px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800; line-height: 1.15;
  background: linear-gradient(135deg, #fff 30%, var(--purple-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem; color: var(--text-dim);
  max-width: 520px; margin: 0 auto 2rem;
}

.btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.5rem; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
}
.btn-primary:hover { opacity: .85; transform: translateY(-1px); color: #fff; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.btn-outline:hover { border-color: var(--purple); color: var(--text); }

/* ── STATS ── */
.stats {
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
  padding: 2rem;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.stat { text-align: center; }
.stat-num { font-size: 1.8rem; font-weight: 700; color: var(--purple-light); }
.stat-label { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* ── SECTIONS ── */
section { padding: 5rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }

.section-title {
  font-size: 1.8rem; font-weight: 700; margin-bottom: .5rem;
  text-align: center;
}
.section-sub {
  color: var(--text-dim); text-align: center; margin-bottom: 3rem;
}

/* ── ENDPOINT CARD ── */
.endpoint-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 1rem; transition: border-color .2s;
}
.endpoint-card:hover { border-color: var(--purple); }

.ep-header { display: flex; align-items: center; gap .75rem; margin-bottom: 1rem; flex-wrap: wrap; gap: .75rem; }

.method {
  font-family: monospace; font-size: .8rem; font-weight: 700;
  padding: .2rem .6rem; border-radius: 4px;
}
.method.post { background: rgba(124,58,237,.25); color: var(--purple-light); }
.method.get  { background: rgba(59,130,246,.25); color: var(--blue-light); }

.ep-path {
  font-family: monospace; color: var(--text); font-size: .95rem;
  background: var(--bg3); padding: .2rem .6rem; border-radius: 4px;
}

.ep-desc { color: var(--text-dim); font-size: .9rem; margin-bottom: 1rem; }

.ep-badge {
  font-size: .75rem; padding: .15rem .5rem; border-radius: 4px;
  border: 1px solid; margin-left: auto;
}
.ep-badge.auth { color: var(--yellow); border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.1); }
.ep-badge.open { color: var(--green); border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.1); }

/* ── CODE BLOCK ── */
.code-block {
  background: #070a10; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-top: 1rem;
}

.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 1rem;
  background: var(--bg3); border-bottom: 1px solid var(--border);
  font-size: .8rem; color: var(--text-muted);
}

.copy-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); padding: .2rem .6rem;
  border-radius: 4px; cursor: pointer; font-size: .75rem;
  transition: all .2s;
}
.copy-btn:hover { border-color: var(--purple); color: var(--purple-light); }
.copy-btn.copied { border-color: var(--green); color: var(--green); }

pre {
  padding: 1rem; font-family: 'Fira Code', 'Consolas', monospace;
  font-size: .85rem; line-height: 1.7; overflow-x: auto;
  color: #c9d1d9;
}

.kw { color: #ff7b72; }
.str { color: #a5d6ff; }
.key { color: #79c0ff; }
.val { color: #56d364; }
.comment { color: #8b949e; }
.num { color: #f2cc60; }

/* ── PLANS ── */
.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.plan-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  position: relative; transition: all .3s;
}
.plan-card:hover { transform: translateY(-4px); border-color: var(--purple); }
.plan-card.destaque {
  border-color: var(--purple);
  background: linear-gradient(135deg, rgba(124,58,237,.08), var(--bg2));
}

.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  padding: .25rem .75rem; border-radius: 999px; text-transform: uppercase;
}

.plan-nome { font-size: 1.3rem; font-weight: 700; margin-bottom: .25rem; }
.plan-limite {
  font-size: 2rem; font-weight: 800; margin: 1rem 0 .5rem;
  background: linear-gradient(135deg, var(--purple-light), var(--blue-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.plan-limite-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.plan-features { list-style: none; margin-bottom: 1.5rem; }
.plan-features li {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem 0; font-size: .9rem; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features .ok { color: var(--green); }
.plan-features .no { color: var(--text-muted); }

.plan-preco {
  font-size: 1.6rem; font-weight: 800; color: var(--purple-light);
  margin-bottom: .15rem;
}
.plan-preco span { font-size: .9rem; font-weight: 400; color: var(--text-muted); }

.btn-plan {
  display: block; width: 100%; padding: .7rem 1rem;
  text-align: center; text-decoration: none;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; font-weight: 700; font-size: .9rem;
  border-radius: 8px; border: 1px solid transparent;
  transition: opacity .2s, transform .15s;
}
.btn-plan:hover { opacity: .85; transform: translateY(-1px); }

/* ── HOW TO ── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.5rem; }
.step {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; margin-bottom: 1rem;
}
.step h3 { font-size: 1rem; margin-bottom: .5rem; }
.step p { font-size: .9rem; color: var(--text-dim); }

/* ── FOOTER ── */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 2rem; text-align: center;
  color: var(--text-muted); font-size: .85rem;
}
footer span { color: var(--purple-light); }

/* ── DOCS PAGE ── */
.docs-layout {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 2rem; max-width: 1100px; margin: 0 auto;
  padding: 2rem;
}

.docs-sidebar {
  position: sticky; top: 80px; align-self: start;
}

.sidebar-section { margin-bottom: 2rem; }
.sidebar-section h4 { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.sidebar-section a {
  display: block; padding: .4rem .75rem;
  color: var(--text-dim); font-size: .9rem;
  border-radius: 6px; margin-bottom: 2px; transition: all .15s;
}
.sidebar-section a:hover, .sidebar-section a.active {
  background: rgba(124,58,237,.15); color: var(--purple-light);
}

.docs-content h2 { font-size: 1.6rem; margin-bottom: .5rem; margin-top: 3rem; }
.docs-content h2:first-child { margin-top: 0; }
.docs-content h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; color: var(--text-dim); }
.docs-content p { color: var(--text-dim); margin-bottom: 1rem; font-size: .95rem; }

.param-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.param-table th {
  background: var(--bg3); text-align: left;
  padding: .6rem 1rem; color: var(--text-muted); font-size: .8rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.param-table td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); }
.param-table tr:last-child td { border-bottom: none; }
code { background: var(--bg3); padding: .1rem .4rem; border-radius: 4px; font-family: monospace; font-size: .85rem; color: var(--purple-light); }

/* ── BOT DOCS ── */
.cmd-category { margin-bottom: 3rem; }
.cmd-category h2 {
  font-size: 1.3rem; padding-bottom: .75rem;
  border-bottom: 2px solid var(--purple);
  margin-bottom: 1.5rem; display: flex; align-items: center; gap: .5rem;
}
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1rem; }
.cmd-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; transition: border-color .2s;
}
.cmd-card:hover { border-color: var(--purple); }
.cmd-name {
  font-family: monospace; font-size: .9rem; font-weight: 700;
  color: var(--purple-light); margin-bottom: .35rem;
}
.cmd-aliases { font-size: .78rem; color: var(--text-muted); margin-bottom: .5rem; }
.cmd-desc { font-size: .875rem; color: var(--text-dim); }
.cmd-perm {
  display: inline-block; margin-top: .5rem;
  font-size: .72rem; padding: .15rem .5rem; border-radius: 4px;
  border: 1px solid;
}
.perm-admin { color: var(--yellow); border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.08); }
.perm-dono  { color: var(--red);    border-color: rgba(239,68,68,.4);   background: rgba(239,68,68,.08); }
.perm-todos { color: var(--green);  border-color: rgba(16,185,129,.4);  background: rgba(16,185,129,.08); }
.perm-premium { color: var(--blue-light); border-color: rgba(59,130,246,.4); background: rgba(59,130,246,.08); }

/* ── SEARCH ── */
.search-bar {
  width: 100%; padding: .75rem 1.25rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: .95rem; outline: none; margin-bottom: 2rem;
  transition: border-color .2s;
}
.search-bar:focus { border-color: var(--purple); }
.search-bar::placeholder { color: var(--text-muted); }

@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .nav-links { display: none; }
  .stats { gap: 1.5rem; }
}
