@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-card:       #21262d;
  --border:        #30363d;
  --border-subtle: #21262d;

  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #6e7681;

  --accent:       #58a6ff;
  --accent-dim:   rgba(88, 166, 255, 0.12);
  --accent-hover: #79b8ff;

  --discord:       #5865f2;
  --discord-hover: #4752c4;

  --green:   #3fb950;
  --orange:  #d29922;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  --max-width:    1100px;
  --header-h:     58px;
  --sidebar-w:    260px;
  --radius:       6px;
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
}

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

/* ── Layout container ───────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header / Nav ───────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.logo:hover { text-decoration: none; }

.logo-img {
  height: 24px;
  width: auto;
  border-radius: 4px;
}

.logo svg {
  width: 22px;
  height: 22px;
  fill: var(--accent);
}

.logo-text {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-sans);
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn-discord {
  background: var(--discord);
  color: #fff;
  border-color: var(--discord);
}

.btn-discord:hover {
  background: var(--discord-hover);
  border-color: var(--discord-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: #484f58;
}

/* ── Hamburger ──────────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-secondary);
  margin: 5px 0;
  transition: 0.25s;
}

/* ── Hero ───────────────────────────────────────── */
.hero {
  padding-top: calc(var(--header-h) + 5rem);
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 640px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Feature Overview ───────────────────────────── */
.feature-overview {
  padding: 4rem 0;
  flex-grow: 1;
}

.feature-overview h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.section-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 1rem 0 1.75rem 0;
  line-height: 1.6;
}

/* Feature table */
.feature-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 3rem;
}

.feature-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.feature-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.feature-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}

.feature-table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}

.feature-table tr:last-child td {
  border-bottom: none;
}

.feature-table tr:hover td {
  background: var(--bg-secondary);
}

/* Quick start */
.quick-start {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 640px;
}

.quick-start h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.quick-start ol {
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 2;
}

.quick-start p {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.quick-start p a {
  color: var(--accent);
}

/* ── Docs Layout ────────────────────────────────── */
.docs-layout {
  display: flex;
  flex-grow: 1;
  padding-top: var(--header-h);
}

.docs-sidebar {
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--header-h);
  left: 0;
  overflow-y: auto;
  background: var(--bg-primary);
  padding: 1.5rem 1rem;
  z-index: 10;
}

.docs-nav-group {
  margin-bottom: 1.75rem;
}

.docs-group-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.docs-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.docs-nav-item a {
  display: block;
  padding: 0.35rem 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.docs-nav-item a:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  text-decoration: none;
}

.docs-nav-item.active a {
  color: var(--accent);
  background: var(--accent-dim);
}

.docs-content {
  margin-left: var(--sidebar-w);
  flex-grow: 1;
  padding: 3rem 4rem;
  max-width: 860px;
}

.docs-section {
  margin-bottom: 3.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.docs-section:last-of-type {
  border-bottom: none;
}

.docs-section h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.docs-section h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.docs-section p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.docs-section .alert-box {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.docs-section .alert-box p {
  margin: 0;
  color: var(--text-primary);
}

/* Feature showcase block */
.feature-showcase-box {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.feature-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.feature-title-row h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.feature-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(63, 185, 80, 0.12);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.25);
}

/* Command table */
.cmd-table-container {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cmd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.cmd-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.cmd-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.cmd-table tr:last-child td { border-bottom: none; }
.cmd-table tr:hover td { background: var(--bg-card); }

/* Roadmap */
.roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.roadmap-status-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.status-planned {
  background: transparent;
  border: 2px solid var(--text-muted);
}

.roadmap-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.roadmap-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.roadmap-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── Legal pages (ToS / Privacy) ───────────────── */
.doc-page-container {
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 5rem;
  max-width: 740px;
  margin: 0 auto;
}

.doc-article h1 {
  font-size: 1.75rem;
  margin-bottom: 0.4rem;
}

.doc-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.doc-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.doc-body h2 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.doc-body p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.doc-body ul {
  margin-bottom: 1.25rem;
  padding-left: 1.4rem;
}

.doc-body li {
  margin-bottom: 0.35rem;
}

/* ── Footer ─────────────────────────────────────── */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-logo:hover { text-decoration: none; }

.footer-logo svg {
  width: 18px;
  height: 18px;
  fill: var(--accent);
}

.footer-logo .logo-img {
  height: 18px;
  border-radius: 3px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .docs-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  .docs-content {
    margin-left: 0;
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
    z-index: 99;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero { padding-top: calc(var(--header-h) + 3rem); }
  .hero h1 { font-size: 2rem; }

  .footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1rem;
  }
}
