/* RESET & VARIABLES */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* ACCESSIBILITY */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-to-main {
  position: absolute;
  left: -9999px;
  top: 1rem;
  background: var(--neon-blue);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
}

.skip-to-main:focus {
  left: 1rem;
}

:root {
  --bg-color: #ffffff;
  --surface: #f5f5f7;
  --surface-hover: #ebebeb;
  --surface-border: rgba(0, 0, 0, 0.1);
  --surface-border-hover: rgba(0, 0, 0, 0.2);
  
  --text-primary: #111111;
  --text-secondary: #555555;
  
  --accent-gradient-start: #333333;
  --accent-gradient-end: #000000;
  
  --neon-blue: #0056d2;
  --neon-purple: #6b21a8;
  --glow-opacity: 0.04;

  --nav-bg: rgba(255, 255, 255, 0.8);
  --terminal-bg: #f8f9fa;
  --code-bg: #f1f3f5;
  --badge-bg: rgba(0, 0, 0, 0.05);

  --editor-header-bg: #ffffff;
  --editor-body-bg: #000000;
  --editor-text-title: #666666;

  --visual-bg: rgba(0, 0, 0, 0.03);
  --visual-border: var(--surface-border);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --rad: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  /* Missing Generator Variables */
  --text-main: var(--text-primary);
  --text-muted: var(--text-secondary);
  --surface-bg: var(--surface);
  --neon-green: #22c55e;
}

[data-theme="dark"] {
  --bg-color: #030303;
  --surface: #0a0a0a;
  --surface-hover: #121212;
  --surface-border: rgba(255, 255, 255, 0.1);
  --surface-border-hover: rgba(255, 255, 255, 0.2);
  
  --text-primary: #f5f5f5;
  --text-secondary: #999999;
  
  --accent-gradient-start: #eaeaea;
  --accent-gradient-end: #666666;
  
  --neon-blue: #3b82f6;
  --neon-purple: #8b5cf6;
  --glow-opacity: 0.12;

  --nav-bg: rgba(3, 3, 3, 0.7);
  --terminal-bg: #000000;
  --code-bg: #09090b;
  --badge-bg: rgba(255, 255, 255, 0.05);

  --editor-header-bg: rgba(255, 255, 255, 0.03);
  --editor-body-bg: #000000;
  --editor-text-title: #999999;
  
  --visual-bg: rgba(0, 0, 0, 0.3);
  --visual-border: rgba(255, 255, 255, 0.1);

  /* Missing Generator Variables */
  --text-main: var(--text-primary);
  --text-muted: var(--text-secondary);
  --surface-bg: #111111;
  --neon-green: #10b981;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body { line-height: 1.6; overflow-x: clip; }

/* TYPOGRAPHY */
h1, h2, h3, h4 { color: var(--text-primary); letter-spacing: -0.02em; }
h2 { font-size: 2.75rem; font-weight: 600; margin-bottom: 1rem; }
a { color: var(--neon-blue); text-decoration: none; transition: var(--transition); font-weight: 500; }
a:hover { color: var(--neon-purple); text-decoration: underline; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.75rem 1.5rem;
  font-size: 0.875rem; font-weight: 500;
  border-radius: 8px; cursor: pointer; transition: var(--transition);
  text-decoration: none;
}
.btn-primary { background: var(--text-primary); color: var(--bg-color); border: 1px solid var(--text-primary); }
.btn-primary:hover { 
    background: var(--text-primary); 
    color: var(--bg-color); 
    opacity: 0.9;
    transform: translateY(-2px); 
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); 
    text-decoration: none;
}
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--surface-border); }
.btn-secondary:hover { 
    background: var(--surface-hover); 
    border-color: var(--text-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
    text-decoration: none;
}

/* NAVBAR */
.navbar {
  position: fixed; top: 0; width: 100%; padding: 1rem;
  background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border); z-index: 100;
}
.nav-container {
  max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; color: var(--text-primary); text-decoration: none;}
.logo:hover { text-decoration: none; color: var(--text-primary); }
.nav-links { display: flex; list-style: none; gap: 2.5rem; }
.nav-links a { font-size: 0.875rem; color: var(--text-secondary); text-decoration: none; font-weight: 500;}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-links a.active { color: var(--neon-blue); font-weight: 700; position: relative; }
.nav-links a.active::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px; background: var(--neon-blue); border-radius: 2px; }

.nav-actions { display: flex; align-items: center; gap: 2rem; }
.nav-github {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none !important;
  color: var(--text-primary) !important;
  font-weight: 500;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}
.nav-github:hover {
  opacity: 0.7;
}
.theme-toggle {
  background: transparent; border: 1px solid var(--surface-border);
  color: var(--text-secondary); width: 36px; height: 36px;
  border-radius: 8px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--text-primary); color: var(--text-primary); background: var(--surface-hover); }
.theme-toggle svg { width: 18px; height: 18px; }
.sun-icon { display: none; }
.moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

/* HERO */
.hero { max-width: 1000px; margin: 5rem auto 6rem; text-align: center; padding: 0 1rem; }
.hero-badge-container { margin-bottom: 1.5rem; }
.hero-badge {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.hero-title { 
  font-size: clamp(2.75rem, 6vw, 4.5rem); 
  line-height: 1.05; 
  font-weight: 850; 
  margin-bottom: 1.5rem; 
  letter-spacing: -0.04em; 
  color: var(--text-primary);
}
.hero-title span { color: var(--text-primary); opacity: 0.9; }
.hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto 2.5rem; line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.quick-install { margin-top: 3rem; display: inline-flex; align-items: center; background: var(--code-bg); border: 1px solid var(--surface-border); border-radius: 8px; padding: 0.5rem 0.5rem 0.5rem 1.25rem; font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-primary); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.quick-install span { color: var(--text-secondary); margin-right: 0.5rem; user-select: none;}
.quick-install .copy-cmd { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 4px; padding: 0.4rem; cursor: pointer; margin-left: 1rem; color: var(--text-secondary); transition: var(--transition); }
.quick-install .copy-cmd:hover { background: var(--surface-hover); color: var(--text-primary); border-color: var(--text-primary); }

/* SECTIONS */
.section { max-width: 1100px; margin: 0 auto 8rem; padding: 0 1.5rem; }
/* Push down the first section if it's the direct child of body (prevents navbar overlap on doc page) */
body > .section:first-of-type { margin-top: 8rem; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 4rem; }
.section-header h2 { font-size: 2.25rem; letter-spacing: -0.02em; }
.section-header p { color: var(--text-secondary); line-height: 1.6; font-size: 1.1rem; }

/* BENTO GRID */
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.bento { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--rad); padding: 2rem; transition: var(--transition); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; }
.bento:hover { border-color: var(--surface-border-hover); background: var(--surface-hover); box-shadow: 0 10px 30px rgba(0,0,0,0.03); transform: translateY(-2px);}
.bento-icon { width: 48px; height: 48px; background: rgba(0, 86, 210, 0.1); color: var(--neon-blue); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
.bento h3 { font-size: 1.25rem; margin-bottom: 0.75rem; font-weight: 600; }
.bento p { color: var(--text-secondary); line-height: 1.6; font-size: 0.95rem; }
.bento-wide { grid-column: span 2; }
.bento-tall { grid-row: span 2; }

/* TERMINAL / CODE COMPONENTS */
.terminal-container { 
  max-width: 100%; 
  border: 1px solid var(--surface-border); 
  border-radius: 12px; 
  background: #ffffff; 
  overflow: hidden; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
  margin-top: 2rem; 
}

.terminal-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 0.75rem 1.25rem; 
  background: #ffffff; 
  border-bottom: 1px solid rgba(0,0,0,0.05); 
}

.terminal-dots { 
  display: flex; 
  gap: 8px; 
  width: 60px;
}

.dot { 
  width: 10px; 
  height: 10px; 
  border-radius: 50%; 
}
.dot.red { background: #ff5f56; } 
.dot.yellow { background: #ffbd2e; } 
.dot.green { background: #27c93f; }

.terminal-title { 
  font-family: var(--font-mono); 
  font-size: 0.8rem; 
  color: #666666; 
  font-weight: 500; 
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.terminal-copy {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: #666666;
  cursor: pointer;
  transition: all 0.2s;
}

.terminal-copy:hover {
  background: #f5f5f7;
  border-color: #333;
  color: #333;
}

.terminal-body { 
  padding: 1.5rem 2rem; 
  font-family: var(--font-mono); 
  font-size: 0.9rem; 
  line-height: 1.6; 
  color: #e2e8f0; 
  overflow-x: auto; 
  white-space: pre-wrap; 
  background: #000000; 
}

/* For hero quick install specifically */
.hero .terminal-container {
  max-width: 600px;
  margin: 3rem auto 0;
}

.cmd-prompt { color: #38bdf8; user-select: none; margin-right: 8px; }
.cmd-text { color: #f8fafc; }
.cmd-comment { color: #64748b; font-style: italic; }
.cmd-output { color: #94a3b8; margin-top: 0.5rem; margin-bottom: 1rem;}


/* DOWNLOAD TABLE */
.table-wrapper { border: 1px solid var(--surface-border); border-radius: var(--rad); background: var(--surface); overflow-x: auto; margin-bottom: 2rem; }
.download-table { width: 100%; border-collapse: collapse; text-align: left; }
.download-table th, .download-table td { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--surface-border); font-size: 0.95rem; }
.download-table th { font-weight: 600; color: var(--text-secondary); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; background: rgba(0,0,0,0.02); }
.download-table tbody tr { transition: var(--transition); background: var(--bg-color); }
.download-table tbody tr:hover { background: var(--surface-hover); }
.download-table tbody tr:last-child th, .download-table tbody tr:last-child td { border-bottom: none; }
.plat-name { display: flex; align-items: center; gap: 0.75rem; color: var(--text-primary); }
.plat-name svg { color: var(--text-secondary); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.download-table code { background: var(--code-bg); padding: 0.3em 0.5em; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85em; color: var(--neon-purple); border: 1px solid var(--surface-border); }
.copy-btn { cursor: pointer; background: transparent; border: 1px solid var(--surface-border); padding: 0.5rem 1rem; border-radius: 6px; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); transition: var(--transition); font-family: var(--font-sans); }
.copy-btn:hover { background: var(--surface); color: var(--text-primary); border-color: var(--surface-border-hover); }


/* FOOTER */
.footer { 
  border-top: 1px solid var(--surface-border); 
  padding: 5rem 1.5rem 3rem; 
  background: var(--bg-color); 
}

.footer-container { 
  max-width: 1100px; 
  margin: 0 auto; 
}

.footer-top { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-start;
  flex-wrap: nowrap; 
  gap: 4rem; 
  margin-bottom: 4rem;
}

.footer-brand {
  flex: 1;
  max-width: 400px;
}

.footer-brand .logo {
  margin-bottom: 1.5rem;
}

.footer-brand p { 
  color: var(--text-secondary); 
  font-size: 0.95rem; 
  line-height: 1.6; 
}

.footer-link-grid { 
  display: flex; 
  gap: 5rem; 
  flex-shrink: 0;
}

.link-group h4 { 
  font-size: 0.9rem; 
  margin-bottom: 1.5rem; 
  color: var(--text-primary); 
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.link-group a { 
  display: block; 
  font-size: 0.9rem; 
  margin-bottom: 1rem; 
  color: var(--text-secondary); 
  text-decoration: none; 
}

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

.footer-divider {
  border: none;
  border-top: 1px solid var(--surface-border);
  margin-bottom: 2rem;
  opacity: 0.6;
}

.footer-bottom {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-bottom p {
  margin-bottom: 1rem;
}

.disclaimer {
  font-size: 0.8rem;
  opacity: 0.8;
}

.disclaimer strong {
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .footer-top {
    flex-wrap: wrap;
    gap: 3rem;
  }
}

@media (max-width: 600px) {
  .footer-link-grid {
    gap: 3rem;
    flex-wrap: wrap;
  }
}

/* CHEATSHEET SECTION */
.cheatsheet-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
  gap: 2rem; 
  margin-top: 3rem; 
}

.cheat-card { 
  background: var(--surface); 
  border: 1px solid var(--surface-border); 
  border-radius: 20px; 
  padding: 1.5rem; 
  display: flex; 
  flex-direction: column; 
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
  background: var(--bg-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.cheat-card:hover { 
  transform: translateY(-6px); 
  border-color: var(--surface-border-hover);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

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

.cheat-header h3 { 
  font-size: 1.15rem; 
  font-weight: 700; 
  color: var(--text-primary); 
  margin: 0; 
  letter-spacing: -0.01em;
}

.cheat-copy {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cheat-copy:hover {
  background: var(--surface-hover);
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.cheat-desc { 
  font-size: 0.95rem; 
  color: var(--text-secondary); 
  margin-bottom: 1.5rem; 
  line-height: 1.5; 
  flex-grow: 1; 
}

.cheat-code-box {
  background: var(--terminal-bg);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  position: relative;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) transparent;
}

.cheat-code-box::-webkit-scrollbar {
  height: 4px;
}

.cheat-code-box::-webkit-scrollbar-track {
  background: transparent;
}

.cheat-code-box::-webkit-scrollbar-thumb {
  background: var(--surface-border);
  border-radius: 10px;
}

.cheat-prompt {
  color: #c678dd; /* Purple/Pink */
  margin-right: 0.75rem;
  user-select: none;
}

.cheat-command {
  color: #61afef; /* Blue */
  white-space: nowrap;
}

/* Custom icon for cheatsheet header */
.cheat-header-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cheat-title-icon {
  font-size: 2.25rem;
  line-height: 1;
}

.section-header h2 {
  margin-bottom: 0;
}



/* WEBUI GRID */
.webui-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.webui-card { border: 1px solid var(--surface-border); border-radius: var(--rad); overflow: hidden; background: var(--surface); transition: var(--transition); display: block; text-decoration: none; color: inherit; }
.webui-card:hover { border-color: var(--neon-purple); transform: translateY(-3px); text-decoration: none; color: inherit; }
.webui-img { height: 160px; background: rgba(0,0,0,0.03); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--surface-border); }
.webui-info { padding: 1.5rem; }
.webui-info h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.webui-info p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* CONF TEMPLATE COLORS */
.c-comment { color: #888; font-style: italic; }
.c-key { color: var(--neon-purple); }
.c-val { color: var(--neon-blue); }


/* FAQ ACCORDION */
.faq-accordion { 
  max-width: 1100px; 
  margin: 0 auto; 
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 4rem;
  align-items: start;
}
.faq-item { border-bottom: 1px solid var(--surface-border); }
.faq-item summary { padding: 1.5rem 0; font-size: 1.05rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--text-primary); transition: color 0.2s; }
.faq-item summary:hover { color: var(--neon-blue); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.5rem; color: var(--text-secondary); transition: transform 0.3s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-content { padding-bottom: 1.5rem; color: var(--text-secondary); line-height: 1.6; font-size: 0.95rem; }
.faq-content code { background: rgba(0,0,0,0.04); padding: 0.2em 0.4em; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85em; color: var(--neon-purple); border: 1px solid var(--surface-border); }

/* RESPONSIVE */
.nav-toggle { display: none; background: none; border: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 101; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text-primary); transition: var(--transition); border-radius: 2px; }

@media (max-width: 900px) {
  .faq-accordion { grid-template-columns: 1fr; gap: 0; }
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-wide, .bento-tall { grid-column: span 1; grid-row: auto; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; } /* Could add a mobile dropdown later */
  h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 260px; height: 100vh;
    background: var(--bg-color); border-left: 1px solid var(--surface-border);
    flex-direction: column; padding: 6rem 2rem; transition: right 0.3s ease; z-index: 99;
  }
  .nav-links.open { right: 0; }
  .bento-grid { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 2rem; }
}

/* --- CONFIG GENERATOR --- */
.generator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.generator-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  background: var(--surface-bg);
  color: var(--text-muted);
  border: 1px solid var(--surface-border);
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: inherit;
}

.val-display {
  margin-left: auto;
  font-weight: 700;
  color: var(--neon-blue);
  background: rgba(43, 88, 255, 0.1);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

.form-input, .form-slider {
  width: 100%;
}

/* MOBILE FIXES */
@media (max-width: 992px) {
  .generator-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
  background: var(--surface-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 2px rgba(43, 88, 255, 0.2);
}

.form-slider {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  height: 6px;
  background: var(--surface-border);
  outline: none;
  border: none;
  border-radius: 3px;
}

.form-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--neon-blue);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(43,88,255,0.4);
}

.toggle-group {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  margin: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider.round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--badge-bg);
  border: 1px solid var(--surface-border);
  transition: .4s;
  border-radius: 24px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider.round {
  background-color: var(--neon-green);
}

input:checked + .slider.round:before {
  transform: translateX(24px);
}

.generator-output {
  position: sticky;
  top: 100px;
  align-self: start;
}

@media (max-width: 900px) {
  .generator-layout {
    grid-template-columns: 1fr;
  }
  .generator-output {
    position: relative;
    top: 0;
  }
}

/* --- ANIMATED DEMO TERMINAL --- */
.demo-section {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.demo-terminal {
  width: 100%;
  max-width: 800px;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.15);
}

.terminal-body-compact {
  padding: 1.25rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #abb2bf;
}

/* Typing Animation */
.typing-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.anim-txt {
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #61afef;
  width: 0;
  animation: typing 2.5s steps(40, end) forwards, blink 0.7s infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  from, to { border-color: transparent }
  50% { border-color: #61afef }
}

/* Progress Section Animation */
.anim-progress-container {
  opacity: 0;
  animation: reveal 0.5s forwards;
  animation-delay: 2.7s;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #98c379;
  width: 0;
  animation: progress-fill 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: 3s;
}

@keyframes progress-fill {
  0% { width: 0; }
  100% { width: 100%; }
}

.progress-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

.stat-item span {
  color: #98c379;
  font-weight: 600;
}

/* MULTI-PLATFORM GUIDE */
.multi-platform-guide {
  margin-top: 3rem;
  background: var(--bg-color);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.guide-tabs {
  display: flex;
  background: #fcfcfc;
  border-bottom: 1px solid var(--surface-border);
  overflow-x: auto;
  scrollbar-width: none;
}

/* --- ANIMATED DEMO TERMINAL --- */
.demo-section {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.demo-terminal {
  width: 100%;
  max-width: 800px;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.15);
}

.terminal-body-compact {
  padding: 1.25rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #abb2bf;
}

/* Typing Animation */
.typing-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.anim-txt {
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #61afef;
  width: 0;
  animation: typing 2.5s steps(40, end) forwards, blink 0.7s infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  from, to { border-color: transparent }
  50% { border-color: #61afef }
}

/* Progress Section Animation */
.anim-progress-container {
  opacity: 0;
  animation: reveal 0.5s forwards;
  animation-delay: 2.7s;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #98c379;
  width: 0;
  animation: progress-fill 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: 3s;
}

@keyframes progress-fill {
  0% { width: 0; }
  100% { width: 100%; }
}

.progress-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

.stat-item span {
  color: #98c379;
  font-weight: 600;
}

/* MULTI-PLATFORM GUIDE */
.multi-platform-guide {
  margin-top: 3rem;
  background: var(--bg-color);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.guide-tabs {
  display: flex;
  background: #fcfcfc;
  border-bottom: 1px solid var(--surface-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.guide-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-right: 1px solid var(--surface-border);
  padding: 1.25rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:last-child { border-right: none; }

.tab-btn:hover {
  background: #f5f5f5;
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--bg-color);
  color: var(--text-primary);
}

.guide-content {
  display: none;
}

.guide-content.active {
  display: block;
}

.install-steps {
  display: flex;
  flex-direction: column;
}

.step-row {
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.2s;
  gap: 2rem;
}

.step-row:last-child {
  border-bottom: none;
}

.step-row:hover {
  background: #fafafa;
}

.step-col-num {
  flex-shrink: 0;
  width: 40px;
}

.step-badge {
  background: #f1f3f5;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  display: inline-block;
}

.step-col-info {
  flex: 1;
}

.step-col-info h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.step-col-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.step-col-action {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
}

.btn-action {
  background: var(--text-primary);
  color: var(--bg-color);
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-action:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-action-outline {
  background: transparent;
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
}

.btn-action-outline:hover {
  background: var(--surface-hover);
}

@media (max-width: 768px) {
  .step-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
  }
  .step-col-action {
    width: 100%;
  }
}

/* RECIPE STYLES */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.recipe-card {
  background: var(--bg-color);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recipe-card:hover {
  transform: translateY(-8px);
  border-color: var(--neon-blue);
  box-shadow: 0 15px 35px rgba(0, 86, 210, 0.08);
}

.recipe-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.recipe-card h3 {
  font-size: 1.25rem;
  margin: 0;
}

.recipe-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recipe-stack span {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: #f1f3f5;
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
}

.recipe-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* TROUBLESHOOTING SPECIFIC */
.troubleshooting-accordion .faq-item summary:hover {
  color: #ef4444; /* Error Red */
}

.troubleshooting-accordion .faq-item summary::before {
  content: '⚠️';
  margin-right: 1rem;
  font-size: 1rem;
}

/* FINAL MOBILE OPTIMIZATION SWEEP */
@media (max-width: 768px) {
  .section { padding: 4rem 1.5rem; }
  .hero-title { font-size: 2.5rem; }
  .table-wrapper { 
    margin: 0 -1.5rem; 
    padding: 0 1.5rem; 
    width: calc(100% + 3rem);
    border-radius: 0;
  }
  .download-table { font-size: 0.85rem; }
  .terminal-container { transform: scale(1) !important; width: 100% !important; margin-left: 0 !important; }
  .terminal-header { padding: 0.75rem 1rem; }
  .terminal-body { padding: 1.25rem; font-size: 0.85rem; }
  .recipe-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; gap: 3rem; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-link-grid { grid-template-columns: 1fr 1fr; gap: 2rem; width: 100%; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.25rem; }
  .nav-container { padding: 0 1rem; }
  .btn { width: 100%; text-align: center; }
  .footer-link-grid { grid-template-columns: 1fr; }
  .step-row { padding: 1.25rem; }
  .tab-btn { font-size: 0.8rem; padding: 1rem 0.5rem; }
  .tab-btn svg { width: 16px; height: 16px; }
}

/* ============================================================
   GEO: AI Summary Q&A Grid
   Visible (not collapsed) so AI crawlers can reliably extract
   all Q&A pairs as citation candidates.
   ============================================================ */
.geo-qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.geo-qa-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--rad);
  padding: 1.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.geo-qa-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--neon-blue), var(--neon-purple));
  border-radius: 3px 0 0 3px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.geo-qa-card:hover {
  border-color: var(--surface-border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.geo-qa-card:hover::before {
  opacity: 1;
}

.geo-qa-q {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.geo-qa-a {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.geo-qa-a code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--neon-purple);
  border: 1px solid var(--surface-border);
}

.geo-qa-a a {
  color: var(--neon-blue);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 768px) {
  .geo-qa-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   GEO: BLUF (Bottom Line Up Front) answer block
   Used in doc page intro — highlights the most-extractable
   definition for AI crawlers.
   ============================================================ */
.bluf-answer {
  background: linear-gradient(135deg,
    rgba(0, 86, 210, 0.05) 0%,
    rgba(107, 33, 168, 0.05) 100%);
  border: 1px solid rgba(0, 86, 210, 0.15);
  border-left: 4px solid var(--neon-blue);
  border-radius: 0 var(--rad) var(--rad) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.bluf-answer strong {
  color: var(--text-primary);
}
