/* ============================================================
   PaddleOCR Resource Site — Global Design System
   style.css
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================================
   CSS Custom Properties — Design Tokens
   ============================================================ */
:root, [data-theme="light"] {
  /* Light Theme Colors (Default) */
  --color-bg:          #ffffff;
  --color-bg-alt:      #f8fafc;
  --color-bg-card:     #ffffff;
  --color-border:      #e2e8f0;
  --color-border-soft: #f1f5f9;

  --color-primary:     #2563eb;
  --color-primary-dark:#1d4ed8;
  --color-secondary:   #4f46e5;
  --color-success:     #16a34a;
  --color-warning:     #d97706;
  --color-error:       #dc2626;

  --color-text:        #0f172a;
  --color-text-sec:    #334155;
  --color-text-muted:  #64748b;

  --nav-bg:            rgba(255, 255, 255, 0.92);
  --hero-bg:           linear-gradient(135deg, #f8fafc 0%, #eff6ff 50%, #f0f4ff 100%);
  --card-bg-gradient:  linear-gradient(135deg, rgba(37,99,235,0.03), rgba(79,70,229,0.03));

  /* Terminal/Code */
  --color-term-bg:     #1a1a2e;
  --color-term-header: #16213e;
  --color-term-text:   #e2e8f0;
  --color-term-green:  #4ade80;
  --color-term-blue:   #60a5fa;
  --color-term-yellow: #fbbf24;
  --color-term-muted:  #64748b;

  --color-code-bg:     #f8fafc;
  --color-code-border: #e2e8f0;
  --color-code-text:   #1e293b;

  /* Typography */
  --font-sans:   'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;

  /* Spacing */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   32px;
  --space-2xl:  48px;
  --space-3xl:  64px;
  --space-4xl:  96px;

  /* Border Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.07);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.08);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.08);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 68px;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --color-bg:          #0a0b0f;
  --color-bg-alt:      #12141c;
  --color-bg-card:     #161922;
  --color-border:      #262b3a;
  --color-border-soft: #1d212d;

  --color-primary:     #3b82f6;
  --color-primary-dark:#2563eb;
  --color-secondary:   #6366f1;
  --color-success:     #22c55e;
  --color-warning:     #f59e0b;
  --color-error:       #ef4444;

  --color-text:        #f8fafc;
  --color-text-sec:    #cbd5e1;
  --color-text-muted:  #64748b;

  --nav-bg:            rgba(10, 11, 15, 0.88);
  --hero-bg:           linear-gradient(135deg, #0a0b0f 0%, #111422 50%, #0a0b14 100%);
  --card-bg-gradient:  linear-gradient(135deg, rgba(59,130,246,0.06), rgba(99,102,241,0.06));

  --color-code-bg:     #161922;
  --color-code-border: #262b3a;
  --color-code-text:   #f1f5f9;

  --shadow-sm:  0 1px 2px 0 rgba(0,0,0,0.2);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.3);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.4);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.5);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-sec);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--color-text);
  border-color: var(--color-primary);
  background: var(--color-bg-alt);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-dark); }

code, pre {
  font-family: var(--font-mono);
}

ul, ol { list-style: none; }

/* ============================================================
   Layout Utilities
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header .label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(37,99,235,0.08);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--color-text-sec);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   Accessibility: Skip to Main Content Link
   ============================================================ */
.skip-to-content {
  position: absolute;
  top: -9999px;
  left: 16px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  background: var(--color-primary);
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 1000;
  font-weight: 600;
  font-size: 0.875rem;
  transition: top var(--transition-fast), opacity var(--transition-fast);
  text-decoration: none;
}

.skip-to-content:focus {
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
  opacity: 1;
  outline: 2px solid var(--color-primary-dark);
}

/* ============================================================
   Navigation
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-normal);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner,
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-logo .logo-text {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-logo .logo-paddle {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-sec);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.hamburger:hover {
  background: var(--color-bg-alt);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-lg) var(--space-xl);
  z-index: 99;
  box-shadow: var(--shadow-lg);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav a {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-soft);
}

.mobile-nav a:last-of-type {
  border-bottom: none;
}

.mobile-nav .btn {
  margin-top: var(--space-md);
  width: 100%;
  justify-content: center;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  min-height: 44px;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

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

.btn-secondary:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-text-sec);
  color: var(--color-text);
  transform: translateY(-1px);
}

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

.btn-outline-primary:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 7px 14px;
  min-height: 36px;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-sec);
  padding: 7px 12px;
  min-height: 36px;
}

.btn-ghost:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative;
  padding: var(--space-xl) 0 var(--space-3xl) 0;
  background: var(--hero-bg);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.2);
  color: var(--color-primary);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.hero-badge svg {
  width: 14px;
  height: 14px;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--color-text-sec);
  max-width: 680px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.hero-stat {
  text-align: center;
}

.hero-stat .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}

.hero-stat .stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ============================================================
   Terminal / Code Blocks
   ============================================================ */
.terminal {
  background: var(--color-term-bg);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-term-header);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #22c55e; }

.terminal-title {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(255,255,255,0.18);
  color: var(--color-term-text);
}

.copy-btn.copied {
  color: var(--color-term-green);
  border-color: rgba(74,222,128,0.3);
}

.copy-btn svg {
  width: 13px;
  height: 13px;
}

.terminal-body {
  padding: var(--space-lg) var(--space-xl);
}

.terminal-body pre {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-term-text);
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-body .prompt {
  color: var(--color-term-green);
  user-select: none;
}

.terminal-body .cmd {
  color: var(--color-term-text);
}

.terminal-body .comment {
  color: var(--color-term-muted);
}

.terminal-body .string {
  color: var(--color-term-yellow);
}

.terminal-body .keyword {
  color: var(--color-term-blue);
}

/* Inline code blocks (light style) */
.code-block {
  background: var(--color-code-bg);
  border: 1px solid var(--color-code-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-code-text);
  overflow-x: auto;
}

code {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--color-primary);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ============================================================
   What Is Section
   ============================================================ */
.what-is-section {
  padding: var(--space-xl) 0 var(--space-2xl);
  background: var(--color-bg);
}

.what-is-card {
  max-width: 980px;
  margin: 0 auto;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  position: relative;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.what-is-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.what-is-card:hover {
  border-color: rgba(37,99,235,0.3);
  box-shadow: var(--shadow-lg);
}

.what-is-header {
  margin-bottom: var(--space-lg);
}

.what-is-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(37,99,235,0.08);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xs);
}

.what-is-card h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.3;
}

.what-is-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.what-is-body p {
  font-size: 0.9675rem;
  line-height: 1.75;
  color: var(--color-text-sec);
}

.what-is-body p + p {
  margin-top: var(--space-md);
}

.what-is-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.highlight-pill {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.highlight-pill:hover {
  background: var(--color-bg-card);
  border-color: var(--color-primary);
  transform: translateX(4px);
}

.highlight-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.highlight-pill strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
}

.highlight-pill span {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .what-is-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* ============================================================
   Feature Cards (Bento Grid)
   ============================================================ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  gap: var(--space-lg);
}

.bento-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37,99,235,0.2);
}

.bento-card.wide   { grid-column: span 7; }
.bento-card.narrow { grid-column: span 5; }
.bento-card.full   { grid-column: span 12; }
.bento-card.third  { grid-column: span 4; }

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(37,99,235,0.08);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  flex-shrink: 0;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.bento-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.bento-card p {
  font-size: 0.9375rem;
  color: var(--color-text-sec);
  line-height: 1.65;
}

.bento-card .feature-badge {
  display: inline-block;
  background: rgba(22,163,74,0.1);
  color: var(--color-success);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

thead {
  background: var(--color-bg-alt);
}

thead th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--color-border-soft);
  transition: background var(--transition-fast);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: var(--color-bg-alt); }

tbody td {
  padding: 14px 20px;
  color: var(--color-text-sec);
  vertical-align: middle;
}

tbody td:first-child {
  font-weight: 600;
  color: var(--color-text);
}

.check-icon { color: var(--color-success); }
.cross-icon { color: var(--color-text-muted); }
.partial-icon { color: var(--color-warning); }

/* ============================================================
   Cheatsheet Grid
   ============================================================ */
.cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.cheat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.cheat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,0.2);
}

.cheat-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.cheat-card .cheat-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.cheat-code {
  position: relative;
  background: var(--color-term-bg);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.cheat-code pre {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-term-text);
  white-space: pre-wrap;
  word-break: break-all;
  padding-right: 60px;
}

.cheat-code .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* ============================================================
   Alert / Info Boxes
   ============================================================ */
.alert {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  margin-bottom: var(--space-md);
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.alert-info {
  background: rgba(37,99,235,0.05);
  border-color: var(--color-primary);
}

.alert-info .alert-icon { color: var(--color-primary); }

.alert-warning {
  background: rgba(217,119,6,0.06);
  border-color: var(--color-warning);
}

.alert-warning .alert-icon { color: var(--color-warning); }

.alert-success {
  background: rgba(22,163,74,0.06);
  border-color: var(--color-success);
}

.alert-success .alert-icon { color: var(--color-success); }

.alert p {
  font-size: 0.9375rem;
  color: var(--color-text-sec);
  margin: 0;
}

/* ============================================================
   Ecosystem Cards
   ============================================================ */
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.eco-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.eco-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,0.2);
}

.eco-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.eco-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.eco-card h3 a:hover {
  color: var(--color-primary);
}

.eco-card .eco-meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.eco-card p {
  font-size: 0.9rem;
  color: var(--color-text-sec);
  margin-top: auto;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.badge-blue {
  background: rgba(37,99,235,0.1);
  color: var(--color-primary);
}

.badge-green {
  background: rgba(22,163,74,0.1);
  color: var(--color-success);
}

.badge-orange {
  background: rgba(217,119,6,0.1);
  color: var(--color-warning);
}

.badge-gray {
  background: rgba(148,163,184,0.15);
  color: var(--color-text-sec);
}

/* ============================================================
   Config Generator
   ============================================================ */
.config-gen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.config-controls {
  padding: var(--space-xl);
}

.config-controls h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.config-field {
  margin-bottom: var(--space-lg);
}

.config-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.config-field select,
.config-field input[type="text"],
.config-field input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text);
  transition: border-color var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.config-field select:focus,
.config-field input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
  background: var(--color-primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.config-preview {
  background: var(--color-term-bg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
}

.config-preview h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-term-text);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.config-output {
  flex: 1;
  overflow: auto;
  margin-bottom: var(--space-md);
}

.config-output pre {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-term-text);
  line-height: 1.7;
}

.config-output .cfg-comment { color: #64748b; }
.config-output .cfg-key     { color: #60a5fa; }
.config-output .cfg-value   { color: #fbbf24; }
.config-output .cfg-string  { color: #4ade80; }
.config-output .cfg-section { color: #c084fc; font-weight: 600; }

.config-actions {
  display: flex;
  gap: var(--space-sm);
}

/* ============================================================
   FAQ Accordion
   ============================================================ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

details.faq-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

details.faq-item[open] {
  border-color: rgba(37,99,235,0.3);
  box-shadow: var(--shadow-md);
}

details.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  gap: var(--space-md);
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

details[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-body {
  padding: 0 var(--space-xl) var(--space-xl);
  font-size: 0.9375rem;
  color: var(--color-text-sec);
  line-height: 1.75;
  border-top: 1px solid var(--color-border-soft);
}

.faq-body p {
  padding-top: var(--space-lg);
}

.faq-body p + p {
  margin-top: var(--space-md);
}

.faq-body code {
  font-size: 0.875em;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-sec);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand .nav-logo {
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-sec);
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-col ul li a {
  font-size: 0.9375rem;
  color: var(--color-text-sec);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.footer-bottom a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-bottom a:hover {
  color: var(--color-primary-dark);
}

.footer-bottom strong {
  color: var(--color-text);
  font-weight: 700;
}

.footer-disclaimer {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.8125rem !important;
  font-style: italic;
  color: var(--color-text-sec);
}

/* ============================================================
   Scroll Animations
   ============================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }

/* ============================================================
   Ad Slot Containers
   ============================================================ */
.ad-slot {
  width: 100%;
  min-height: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot:empty {
  display: none;
}

/* ============================================================
   Responsive Design
   ============================================================ */
@media (max-width: 1024px) {
  .bento-card.wide   { grid-column: span 12; }
  .bento-card.narrow { grid-column: span 12; }
  .bento-card.third  { grid-column: span 6; }

  .config-gen {
    grid-template-columns: 1fr;
  }

  .config-preview {
    min-height: 320px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 20px;
    --space-2xl: 32px;
    --space-3xl: 48px;
    --space-4xl: 64px;
  }

  .nav-links { display: none; }
  .nav-actions .btn:not(.btn-primary) { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }

  .hero { padding: var(--space-lg) 0 var(--space-2xl) 0; }

  .hero-stats {
    gap: var(--space-xl);
  }

  .bento-card.third { grid-column: span 12; }

  .what-is-card {
    padding: var(--space-xl);
  }

  .what-is-card::before { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand { grid-column: span 1; }

  .config-gen {
    grid-template-columns: 1fr;
  }

  table { font-size: 0.875rem; }

  thead th, tbody td { padding: 10px 14px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.875rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; justify-content: center; }
  .cheatsheet-grid { grid-template-columns: 1fr; }
  .ecosystem-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Comparison Table Specific
   ============================================================ */
.comparison-table thead th:first-child { width: 200px; }

.comparison-table td:not(:first-child),
.comparison-table th:not(:first-child) {
  text-align: center;
}

.tool-highlight {
  background: rgba(37,99,235,0.04);
}

.tool-highlight th,
.tool-highlight td {
  position: relative;
}

.tool-highlight th::after {
  content: '★ Best';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 0 0 6px 6px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ============================================================
   Download Table
   ============================================================ */
.platform-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
  display: inline-block;
}

.install-commands {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.install-cmd-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.install-cmd-row code {
  font-size: 0.8125rem;
  flex: 1;
}

.install-cmd-row .copy-btn {
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.2);
  color: var(--color-primary);
}

.install-cmd-row .copy-btn:hover {
  background: var(--color-primary);
  color: white;
}

/* ============================================================
   Hero Terminal specific centering
   ============================================================ */
.hero .terminal {
  text-align: left;
}
