/* ═══════════════════════════════════════════════
   OtterlyMTG Bot — Site Stylesheet
   ═══════════════════════════════════════════════ */

/* ─ Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

/* ─ Tokens ────────────────────────────────────── */
:root {
  --bg:           #0e0e10;
  --bg-2:         #18181b;
  --bg-3:         #1f1f23;
  --bg-4:         #26262c;
  --border:       #2e2e35;
  --purple:       #9146ff;
  --purple-lt:    #bf94ff;
  --purple-hover: #772ce8;
  --text:         #efeff1;
  --muted:        #adadb8;
  --green:        #00b559;
  --orange:       #f59e0b;
  --radius:       8px;
  --font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:         "Fira Code", "Cascadia Code", Consolas, "Courier New", monospace;
}

/* ─ Base ──────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
}
a { color: var(--purple-lt); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--mono);
  background: var(--bg-3);
  color: var(--purple-lt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .875em;
}

/* ─ Layout ─────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ─ Nav ───────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  height: 60px;
  background: rgba(14,14,16,.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}
.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
}
.nav__brand:hover { color: var(--purple-lt); text-decoration: none; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav__links a {
  color: var(--muted);
  font-size: .9rem;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.nav__links a:hover { color: var(--text); background: var(--bg-3); text-decoration: none; }
.nav__links a.active { color: var(--text); background: var(--bg-3); }

/* ─ Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, transform .1s;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--purple); color: #fff; }
.btn--primary:hover { background: var(--purple-hover); color: #fff; }
.btn--outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--muted); background: var(--bg-3); color: var(--text); }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { color: var(--text); background: var(--bg-3); }
.btn--lg { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }
.btn--sm { padding: 5px 10px; font-size: .8rem; }

/* ─ Hero ──────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(145,70,255,.18) 0, transparent 70%);
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(145,70,255,.12);
  border: 1px solid rgba(145,70,255,.3);
  color: var(--purple-lt);
  font-size: .82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero__title span { color: var(--purple-lt); }
.hero__sub {
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  max-width: 540px;
  margin: 0 auto 36px;
}
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero__stats {
  margin-top: 72px;
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.hero__stat { text-align: center; }
.hero__stat-num { font-size: 2.2rem; font-weight: 800; color: var(--purple-lt); display: block; }
.hero__stat-label { font-size: .82rem; color: var(--muted); }

/* ─ Feature grid ──────────────────────────────── */
.section-eyebrow {
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--purple-lt);
  margin-bottom: 10px;
}
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 52px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: rgba(145,70,255,.4); transform: translateY(-3px); }
.feature-card__icon { font-size: 2.2rem; margin-bottom: 16px; display: block; }
.feature-card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card__desc { color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* ─ CTA Banner ────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, rgba(145,70,255,.14), rgba(145,70,255,.04));
  border: 1px solid rgba(145,70,255,.3);
  border-radius: 18px;
  padding: 64px 40px;
  text-align: center;
}
.cta-banner h2 { font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 800; margin-bottom: 12px; }
.cta-banner p { color: var(--muted); margin-bottom: 32px; max-width: 420px; margin-left: auto; margin-right: auto; }

/* ─ Commands layout ───────────────────────────── */
.cmd-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  align-items: start;
}
.cmd-sidebar {
  position: sticky;
  top: 80px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 0;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.cmd-sidebar__title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.cmd-sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: .85rem;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: color .15s, background .15s;
}
.cmd-sidebar a:hover,
.cmd-sidebar a.active { color: var(--text); background: var(--bg-3); text-decoration: none; }
.cmd-sidebar a.active { border-left-color: var(--purple); color: var(--purple-lt); }
.cmd-search { position: relative; margin-bottom: 28px; }
.cmd-search input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 12px 10px 38px;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
.cmd-search input:focus { border-color: var(--purple); }
.cmd-search input::placeholder { color: var(--muted); }
.cmd-search__icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.cmd-section { margin-bottom: 52px; scroll-margin-top: 80px; }
.cmd-section__header { margin-bottom: 16px; }
.cmd-section__title {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.cmd-section__desc { color: var(--muted); font-size: .875rem; }
.cmd-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}
.cmd-table table { width: 100%; border-collapse: collapse; }
.cmd-table thead th {
  background: var(--bg-3);
  padding: 10px 16px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.cmd-table tbody tr { border-top: 1px solid var(--border); }
.cmd-table tbody tr:hover { background: rgba(255,255,255,.02); }
.cmd-table td { padding: 12px 16px; font-size: .875rem; vertical-align: top; }
.cmd-name { font-family: var(--mono); font-size: .85rem; color: var(--purple-lt); font-weight: 600; }
.cmd-aliases { font-size: .75rem; color: var(--muted); margin-top: 2px; font-family: var(--mono); }
.cmd-usage {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--muted);
  background: var(--bg-4);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}
.cmd-desc { color: var(--text); line-height: 1.5; }

/* ─ Badges ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge--user       { background: rgba(173,173,184,.12); color: var(--muted); border: 1px solid var(--border); }
.badge--mod        { background: rgba(30,155,255,.12);  color: #60b4f8; border: 1px solid rgba(30,155,255,.22); }
.badge--broadcaster{ background: rgba(245,158,11,.12);  color: #fbbf24; border: 1px solid rgba(245,158,11,.22); }

/* ─ Page header ───────────────────────────────── */
.page-header {
  padding: 64px 24px 40px;
  max-width: 1100px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.page-header p   { color: var(--muted); font-size: 1rem; }

/* ─ Setup page ────────────────────────────────── */
.setup-section {
  padding: 60px 0 80px;
  background: radial-gradient(ellipse 60% 30% at 50% 0, rgba(145,70,255,.1) 0, transparent 60%);
}
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
.setup-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
}
.setup-card--highlight {
  border-color: rgba(145,70,255,.45);
  background: linear-gradient(145deg, rgba(145,70,255,.07), var(--bg-2));
}
.setup-card__pill {
  position: absolute;
  top: -13px; left: 24px;
  background: var(--purple);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 100px;
  letter-spacing: .03em;
}
.setup-card h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 20px; }
.setup-steps { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.setup-step { display: flex; gap: 14px; align-items: flex-start; }
.setup-step__num {
  min-width: 26px; height: 26px;
  background: rgba(145,70,255,.18);
  border: 1px solid rgba(145,70,255,.35);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; color: var(--purple-lt);
  flex-shrink: 0; margin-top: 1px;
}
.setup-step__text { color: var(--muted); font-size: .875rem; line-height: 1.55; }
.setup-step__text strong { color: var(--text); }
.setup-divider { height: 1px; background: var(--border); margin: 48px 0; }
.setup-tips h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }
.tip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tip-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.tip-card__title { font-weight: 700; margin-bottom: 6px; font-size: .9rem; }
.tip-card__body  { color: var(--muted); font-size: .85rem; line-height: 1.55; }

/* ─ Result pages (success / error) ───────────────*/
.result-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.result-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 52px 44px;
  text-align: center;
  max-width: 480px;
  width: 100%;
}
.result-card--success { border-color: rgba(0,181,89,.35); }
.result-card--error   { border-color: rgba(235,4,0,.3); }
.result-icon { font-size: 3.5rem; margin-bottom: 20px; display: block; }
.result-card h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.result-card p  { color: var(--muted); margin-bottom: 28px; line-height: 1.6; }

/* ─ Alert boxes ───────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .875rem;
  border: 1px solid;
  margin-bottom: 20px;
  line-height: 1.5;
}
.alert--info { background: rgba(145,70,255,.08); border-color: rgba(145,70,255,.25); color: var(--purple-lt); }
.alert--tip  { background: rgba(0,181,89,.07);   border-color: rgba(0,181,89,.25);   color: #4ade80; }

/* ─ Footer ────────────────────────────────────── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: auto;
}
.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
.footer__brand    { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.footer__tagline  { color: var(--muted); font-size: .85rem; }
.footer__links    { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a  { color: var(--muted); font-size: .85rem; transition: color .15s; }
.footer__links a:hover { color: var(--text); text-decoration: none; }
.footer__copy {
  color: var(--muted); font-size: .78rem; margin-top: 24px;
  grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 20px;
}

/* ─ Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .setup-grid { grid-template-columns: 1fr; }
  .cmd-layout { grid-template-columns: 1fr; }
  .cmd-sidebar { display: none; }
}
@media (max-width: 600px) {
  .hero { padding: 72px 0 60px; }
  .hero__stats { gap: 28px; }
  .feature-grid { grid-template-columns: 1fr; }
  .nav__links a:not(.btn) { display: none; }
  .footer__inner { grid-template-columns: 1fr; }
  .cta-banner { padding: 40px 24px; }
}
