:root {
  --color-bg:         #0c0b18;
  --color-surface:    #131225;
  --color-surface-2:  #1a1930;
  --color-border:     #2a284c;
  --color-teal:       #8585d4;
  --color-teal-dim:   #6262aa;
  --color-cream:      #b8b8e8;
  --color-orange:     #e8834f;
  --color-text:       #e4e4f2;
  --color-muted:      #7878a4;
  --sidebar-width:    260px;
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--color-teal); text-decoration: none; }
a:hover { color: var(--color-cream); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }

code, pre {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.875em;
}

code {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--color-cream);
}

/* ── Top Bar ──────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}
.topbar-brand:hover { color: var(--color-cream); text-decoration: none; }

.topbar-brand img { height: 32px; }

.topbar-title {
  color: var(--color-teal);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 4px;
}

.topbar-links {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.topbar-links a {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.topbar-links a:hover { color: var(--color-teal); text-decoration: none; }

/* ── Hamburger (mobile) ───────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-right: 0.5rem;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-teal);
  margin: 5px 0;
  transition: transform 0.2s;
}

/* ── Layout ───────────────────────────────────────── */
.layout {
  display: flex;
  margin-top: 60px;
  min-height: calc(100vh - 60px);
}

/* ── Sidebar ──────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  position: fixed;
  top: 60px;
  bottom: 0;
  overflow-y: auto;
  padding: 1.5rem 0;
}

.sidebar-section {
  margin-bottom: 0.5rem;
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0.75rem 1.25rem 0.35rem;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 1.25rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  border-left: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a.active {
  color: var(--color-teal);
  background: rgba(130, 191, 177, 0.07);
  border-left-color: var(--color-teal);
  text-decoration: none;
}

.sidebar a .badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 99px;
}

/* ── Main content ─────────────────────────────────── */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2.5rem 3rem;
  max-width: 900px;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-teal), var(--color-orange));
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--color-muted);
  font-size: 1rem;
  max-width: 600px;
}

.btn-store {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.45rem 1.1rem;
  background: var(--color-teal);
  color: var(--color-bg);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-store:hover {
  background: var(--color-cream);
  color: var(--color-bg);
  text-decoration: none;
}

.hero-img {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  height: 80px;
  opacity: 0.8;
}

/* ── Plugin grid (index page) ─────────────────────── */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.plugin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.plugin-card:hover {
  border-color: var(--color-teal);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}

.plugin-card-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.plugin-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-cream);
}

.plugin-card p {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.badge-free {
  background: rgba(130, 191, 177, 0.15);
  color: var(--color-teal);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  display: inline-block;
}

.badge-premium {
  background: rgba(245, 228, 187, 0.1);
  color: var(--color-cream);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  display: inline-block;
}

/* ── Section headers ──────────────────────────────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-cream);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--color-teal);
  border-radius: 2px;
}

/* ── Config table ─────────────────────────────────── */
.config-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.config-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.config-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

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

.config-table tr:hover td { background: rgba(130, 191, 177, 0.04); }

.config-name {
  font-weight: 600;
  color: var(--color-cream);
  white-space: nowrap;
}

.config-type {
  color: var(--color-teal);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8em;
}

.config-default {
  color: var(--color-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8em;
}

/* ── Callout boxes ────────────────────────────────── */
.callout {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-left: 4px solid;
  font-size: 0.9rem;
}

.callout-tip {
  background: rgba(130, 191, 177, 0.08);
  border-color: var(--color-teal);
  color: var(--color-text);
}

.callout-warning {
  background: rgba(235, 117, 93, 0.08);
  border-color: var(--color-orange);
  color: var(--color-text);
}

.callout-info {
  background: rgba(245, 228, 187, 0.06);
  border-color: var(--color-cream);
  color: var(--color-text);
}

.callout-label {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.callout-tip .callout-label   { color: var(--color-teal); }
.callout-warning .callout-label { color: var(--color-orange); }
.callout-info .callout-label  { color: var(--color-cream); }

/* ── Steps ────────────────────────────────────────── */
.steps { list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-teal);
  color: var(--color-bg);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.footer a { color: var(--color-teal); }

/* ── Index hero (home page) ───────────────────────── */
.home-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.home-hero img { height: 80px; margin-bottom: 1.5rem; }

.home-hero h1 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.home-hero p {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto 2rem;
}

.category-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 1.5rem 0 0.75rem;
}

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

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s;
    z-index: 90;
  }
  .sidebar.open { transform: translateX(0); }

  .main {
    margin-left: 0;
    padding: 1.5rem 1.25rem;
  }

  .hero { padding: 1.5rem; }
  .hero-img { display: none; }
  .hero h1 { font-size: 1.5rem; }

  .home-hero h1 { font-size: 1.75rem; }
  .plugin-grid { grid-template-columns: 1fr 1fr; }
}
