/* ════════════════════════════════════════════════════════════════════════════
   ManyBot — main.css
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --bg:       #0d0d0f;
  --bg-2:     #141418;
  --bg-3:     #1c1c22;
  --border:   #2e2e38;
  --border-2: #3e3e4e;
  --text:     #d4d0c8;
  --text-2:   #8c8a84;
  --text-3:   #5a5856;
  --accent:   #7c6aff;
  --accent-2: #5b4fd4;
  --green:    #4ec94e;
  --yellow:   #d4b44e;
  --red:      #c94e4e;
  --link:     #9d8fff;

  --font-mono: "Courier New", Courier, monospace;
  --font-sans: Georgia, "Times New Roman", serif;
  --font-ui:   Verdana, Geneva, Tahoma, sans-serif;

  --max-w:  860px;
  --nav-h:  44px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
a:visited { color: #a896ff; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 1rem; gap: 1rem;
}

.nav-brand {
  width: 80px;
}
.nav-brand span { color: var(--text-2); font-weight: normal; }
.nav-brand:hover { color: var(--text); }
.nav-brand:visited { color: var(--accent); }

.nav-links { display: flex; align-items: center; list-style: none; flex: 1; }
.nav-links a {
  display: block; padding: 0 .65rem;
  height: var(--nav-h); line-height: var(--nav-h);
  font-size: 12px; color: var(--text-2); text-decoration: none;
  border-right: 1px solid var(--border);
}
.nav-links li:first-child a { border-left: 1px solid var(--border); }
.nav-links a:hover { background: var(--bg-3); color: var(--text); }
.nav-links a.active { color: var(--accent); background: var(--bg-3); }
.nav-links a:visited { color: var(--text-2); }
.nav-links a.active:visited { color: var(--accent); }

.nav-hamburger {
  display: none; margin-left: auto;
  width: 32px; height: 32px;
  flex-direction: column; justify-content: center; gap: 5px;
  padding: 4px; border: 1px solid var(--border); color: var(--text-2);
}
.nav-hamburger span { display: block; width: 100%; height: 1px; background: currentColor; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
main { flex: 1; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 2rem 1.25rem; }

.page-header { border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 2rem; }
.page-header h1 { font-family: var(--font-mono); font-size: 1.3rem; color: var(--text); }
.page-header h1::before { content: "# "; color: var(--accent); }
.page-header p { color: var(--text-2); margin-top: .35rem; font-size: 13px; }

/* ── Botões ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; font-family: var(--font-mono); font-size: 12px;
  padding: 5px 14px; text-decoration: none; border: 1px solid; cursor: pointer;
}
.btn-primary { border-color: var(--accent); color: var(--bg); background: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--bg); }
.btn-primary:visited { color: var(--bg); }
.btn-ghost { border-color: var(--border-2); color: var(--text-2); background: transparent; }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); background: var(--bg-3); }
.btn-ghost:visited { color: var(--text-2); }
.btn-sm { font-size: 11px; padding: 3px 10px; }

/* ── Markdown ─────────────────────────────────────────────────────────────── */
.md h1 { font-family: var(--font-mono); color: var(--text); margin: 0 0 1rem; border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.md h2 { font-family: var(--font-mono); color: var(--text); margin: 2rem 0 .75rem; }
.md h3 { font-family: var(--font-mono); color: var(--text-2); margin: 1.5rem 0 .5rem; }
.md h2::before { content: "## "; color: var(--text-3); }
.md h3::before { content: "### "; color: var(--text-3); }
.md p  { margin: .75rem 0; color: var(--text-2); line-height: 1.7; }
.md a  { color: var(--link); }
.md strong { color: var(--text); font-weight: bold; }
.md code {
  font-family: var(--font-mono);
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 1px 5px; color: var(--green);
}
.md pre {
  background: var(--bg-2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  padding: 1rem; overflow-x: auto; margin: 1rem 0;
}
.md pre code { background: none; border: none; padding: 0; color: var(--text); line-height: 1.6; }
.md blockquote { border-left: 3px solid var(--yellow); padding: .5rem 1rem; margin: 1rem 0; background: var(--bg-2); color: var(--text-2); }
.md blockquote p { margin: 0; color: inherit; }
.md ul, .md ol { padding-left: 1.5rem; margin: .75rem 0; }
.md li { color: var(--text-2); margin: .25rem 0; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.md table { display: block; overflow-x: auto; max-width: 100%; }
.md th { background: var(--bg-3); border: 1px solid var(--border); padding: .4rem .75rem; text-align: left; font-family: var(--font-mono); color: var(--text-2); text-transform: uppercase; }
.md td { border: 1px solid var(--border); padding: .4rem .75rem; color: var(--text-2); }


/* Markdown font size */
.md {
  font-size: 14px;
  line-height: 1.7;
}

.md h1 {
  font-family: var(--font-mono);
  font-size: 1.8em;
}

.md h2 {
  font-family: var(--font-mono);
  font-size: 1.4em;
}

.md h3 {
  font-family: var(--font-mono);
  font-size: 1.15em;
}

.md p,
.md li,
.md td {
  font-size: 1em;
}

.md code,
.md pre code,
.md blockquote,
.md table {
  font-size: 0.95em;
}

.md th {
  font-size: 0.85em;
}

.md a[href^="http"]::after {
  content: " ↗";
  font-size: 10px;
  opacity: 0.6;
}

/* ── Docs layout ─────────────────────────────────────────────────────────── */
.docs-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-h));
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.docs-content {
  flex: 1;
  padding: 2rem 2rem 3rem;
  min-width: 0;
  max-width: 850px;
}

.docs-sidebar {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: var(--nav-h);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  align-self: flex-start;
}

.sidebar-group { margin-bottom: .25rem; }
.sidebar-group-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); padding: .5rem 1rem .25rem; }
.sidebar-link { display: block; padding: .3rem 1rem; font-size: 13px; color: var(--text-2); text-decoration: none; border-left: 2px solid transparent; }
.sidebar-link:hover { color: var(--text); border-left-color: var(--border-2); }
.sidebar-link.active { color: var(--accent); border-left-color: var(--accent); background: var(--bg-2); }
.sidebar-link:visited { color: var(--text-2); }
.sidebar-link.active:visited { color: var(--accent); }

.sidebar-group:first-child .sidebar-group-label {
  padding-top: .5rem;
}

/* ── Plugins ─────────────────────────────────────────────────────────────── */
.plugins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  border: 1px solid var(--border);
}
.plugin-card {
  display: flex; flex-direction: column; gap: .4rem;
  padding: .85rem 1rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.plugin-card:hover { background: var(--bg-2); }
.plugin-card-header { display: flex; align-items: baseline; gap: .5rem; }
.plugin-card-name    { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.plugin-card-version { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); }
.plugin-card-desc    { font-size: 11px; color: var(--text-2); line-height: 1.5; flex: 1; }
.plugin-card-footer  { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: auto; }
.plugin-card-author  { font-size: 10px; color: var(--text-3); }
.plugin-tag          { font-family: var(--font-mono); font-size: 10px; border: 1px solid var(--border); padding: 1px 6px; color: var(--text-3); }

.plugin-page-hero    { padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.plugin-page-title-row { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.plugin-page-name    { font-family: var(--font-mono); font-size: 1.3rem; color: var(--text); }
.plugin-page-desc    { font-size: 13px; color: var(--text-2); margin-top: .5rem; }

.plugin-install-box  { display: inline-flex; align-items: center; border: 1px solid var(--border); margin-top: 1rem; overflow: hidden; }
.plugin-install-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); padding: 5px 8px; background: var(--bg-3); border-right: 1px solid var(--border); }
.plugin-install-cmd   { font-family: var(--font-mono); font-size: 12px; color: var(--green); padding: 5px 10px; }
.plugin-install-copy  { padding: 5px 8px; color: var(--text-3); border-left: 1px solid var(--border); }
.plugin-install-copy:hover { color: var(--text); background: var(--bg-3); }

.plugin-page-body    { display: flex; gap: 2rem; align-items: flex-start; }
.plugin-page-readme  { min-width: 0; overflow: hidden; }
.plugin-page-meta    { width: 200px; flex-shrink: 0; }
.plugin-meta-card    { border: 1px solid var(--border); }
.plugin-meta-row     { display: flex; flex-direction: column; padding: .5rem .75rem; border-bottom: 1px solid var(--border); font-size: 11px; }
.plugin-meta-row:last-child { border-bottom: none; }
.plugin-meta-label   { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 2px; }

/* ── Comentários ─────────────────────────────────────────────────────────── */
.comments-section { margin-top: 3rem; }

.comment-item { border-bottom: 1px solid var(--border); padding: .75rem 0; }
.comment-item:first-of-type { border-top: 1px solid var(--border); }
.comment-meta { display: flex; gap: .75rem; align-items: baseline; margin-bottom: .25rem; }
.comment-author { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.comment-date   { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); }
.comment-body   { font-size: 13px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; }

.comment-form { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.5rem; max-width: 560px; }
.comment-form input[type="text"],
.comment-form textarea {
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-ui); font-size: 13px;
  padding: .4rem .65rem; resize: vertical; width: 100%;
}
.comment-form input[type="text"]:focus,
.comment-form textarea:focus { outline: none; border-color: var(--border-2); }

/* ── Contribute section title ────────────────────────────────────────────── */
.contribute-section h2 {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-3); margin-bottom: .75rem;
  padding-bottom: .35rem; border-bottom: 1px solid var(--border);
}

/* ── Utilitários ─────────────────────────────────────────────────────────── */
.mono  { font-family: var(--font-mono); }
.muted { color: var(--text-2); }
.back-link { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); text-decoration: none; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--text); }
.empty-notice { border: 1px dashed var(--border); padding: 1.5rem; text-align: center; color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: auto; padding: 2rem 1.25rem 1.5rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-top { display: flex; gap: 2rem; flex-wrap: wrap; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.footer-brand { width: 100px; opacity: 0.2; margin-right: 2rem; }
.footer-tagline { font-size: 11px; color: var(--text-3); margin-top: .5rem; line-height: 1.5; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 1.5rem; flex: 1; }
.footer-col { min-width: 100px; }
.footer-col-title { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-bottom: .5rem; }
.footer-col a { display: block; font-size: 12px; color: var(--text-2); text-decoration: none; padding: 1px 0; }
.footer-col a:hover { color: var(--text); }
.footer-col a:visited { color: var(--text-2); }
.footer-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.footer-social { margin-left: auto; display: flex; gap: 0.8rem; }
.footer-social a { color: var(--text-3); text-decoration: none; display: flex; align-items: center; }
.footer-social a:hover { color: var(--text); }
.footer-social a svg { width: 18px; height: 18px; }
.footer-legal { display: flex; gap: .5rem; align-items: center; }
.footer-legal a { color: var(--text-3); text-decoration: none; }
.footer-legal a:hover { color: var(--text); }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--border); z-index: 99;
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a { height: auto; line-height: 1; padding: .75rem 1rem; border-right: none; border-bottom: 1px solid var(--border); }
  .nav-links.open li:first-child a { border-left: none; }
  .nav-hamburger { display: flex; }

  .docs-layout { flex-direction: column; }
  .docs-sidebar { width: 100%; position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--border); padding: .75rem 0; }
  .docs-content { padding: 1.25rem; }

  .footer-top { flex-direction: column; }
  .footer-brand { flex: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .footer-social { margin: 0 auto; margin-top: 1rem; }
  .footer-social a svg { width: 25px; height: 25px; }

  .plugin-page-body { flex-direction: column; max-width: 100vw; overflow: hidden; }
  .plugin-page-readme { width: 0; min-width: 100%; }
  .md pre { overflow-x: scroll; }
  .md table { display: block; overflow-x: scroll; }
}

/* ── Homepage ────────────────────────────────────────────────────────────── */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.25rem 2.5rem;
}
.hero-inner {
  max-width: var(--max-w);
  display: flex;
  align-items: center;
  margin: 0 auto;
}
.hero-text { flex: 1; }
.hero-logo { width: 200px; }
.hero-tagline { color: var(--text-2); font-size: 13px; margin-top: .65rem; line-height: 1.7; max-width: 460px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.hero-mascot { width: 160px; flex-shrink: 0; filter: drop-shadow(8px 8px 30px #5b4fd460); animation: float 4s ease-in-out infinite; }

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}
.home-card {
  padding: 1.25rem;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .75rem;
}
.home-card:last-child { border-right: none; }
.home-card-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.home-card p { font-size: 12px; color: var(--text-2); line-height: 1.6; flex: 1; }

.home-honest {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-2);
  padding: 1rem 1.25rem;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
}
.home-honest p + p { margin-top: .65rem; }
.home-honest strong { color: var(--text); }

@media (max-width: 680px) {
  .hero-logo { margin: 0 auto; }
  .hero-inner { flex-direction: column-reverse; gap: 1.5rem; }
  .hero-mascot { width: 140px; }
  .hero-name { font-size: 1.7rem; }
  .home-cards { grid-template-columns: 1fr; }
  .home-card { border-right: none; border-bottom: 1px solid var(--border); }
  .home-card:last-child { border-bottom: none; }
}

/* ── Fanarts ─────────────────────────────────────────────────────────────── */
.fanarts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 2.5rem;
}
.fanart-item { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-2); }
.fanart-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.fanart-item:hover img { opacity: .75; }
.fanart-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: .35rem .5rem;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  font-family: var(--font-mono); font-size: 10px; color: #ccc;
  text-decoration: none;
  opacity: 0; transition: opacity .15s;
}
.fanart-item:hover .fanart-overlay { opacity: 1; }
.fanarts-submit { margin-top: 1rem; }

/* ── Link cards ──────────────────────────────────────────────────────────── */
.link-cards { display: flex; flex-direction: column; border: 1px solid var(--border); }
.link-card {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.link-card:last-child { border-bottom: none; }
.link-card:hover { background: var(--bg-2); }
.link-card-icon { color: var(--text); font-size: 1rem; flex-shrink: 0; width: 24px; text-align: center; }
.link-card-title { color: var(--text); font-size: 13px; }
.link-card-desc  { color: var(--text-2); font-size: 11px; margin-top: 1px; }
.link-card-arrow { margin-left: auto; color: var(--text-3); font-size: 12px; }
.link-card:hover .link-card-arrow { color: var(--accent); }

/* ── Blog ────────────────────────────────────────────────────────────────── */
.blog-header { display: flex; align-items: baseline; margin-bottom: 1.5rem; }
.blog-list { list-style: none; }
.blog-item {
  display: block; padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.blog-item:first-child { border-top: 1px solid var(--border); }
.blog-item:hover { background: var(--bg-2); padding-left: .75rem; margin-left: -.75rem; padding-right: .75rem; margin-right: -.75rem; }
.blog-item-date    { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.blog-item-title   { font-size: 14px; color: var(--text); margin-top: .15rem; }
.blog-item:hover .blog-item-title { color: var(--accent); }
.blog-item-excerpt { font-size: 12px; color: var(--text-2); margin-top: .25rem; }

.post-header { padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border); }
.post-header h1 { font-family: var(--font-sans); font-size: 1.5rem; line-height: 1.3; color: var(--text); }
.post-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-top: .5rem; }

.rss-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--yellow); text-decoration: none;
  border: 1px solid var(--yellow); padding: 2px 8px;
  margin-left: auto;
}
.rss-link:hover { background: var(--yellow); color: var(--bg); }
.rss-link:visited { color: var(--yellow); }

@media (max-width: 680px) {
  .fanarts-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

