/* Compression Demo — Dark Theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg: #0f1117; --surface: #1a1d27; --surface-2: #21253a; --border: #2a2d3e;
  --accent: #6366f1; --accent-light: #818cf8; --green: #22c55e;
  --red: #ef4444; --cyan: #06b6d4; --yellow: #eab308;
  --text: #e2e8f0; --text-2: #94a3b8; --muted: #64748b; --radius: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6;
}

/* Nav */
.demo-nav {
  display: flex; align-items: center; gap: 12px; padding: 12px 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; flex-wrap: wrap;
}
.back {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 500; color: var(--muted); text-decoration: none;
  padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border);
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.back:hover { color: var(--text); border-color: #475569; }
.nav-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.nav-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-light); background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.25); border-radius: 100px; padding: 3px 10px;
}
.nav-anchors { display: flex; gap: 4px; list-style: none; margin-left: auto; }
.nav-anchors a {
  font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none;
  padding: 4px 10px; border-radius: 6px; transition: background .15s, color .15s;
}
.nav-anchors a:hover { background: rgba(255,255,255,.06); color: var(--text); }

/* Sections */
.section { padding: 64px 0; border-bottom: 1px solid var(--border); }
.section.dark { background: var(--surface); }

.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* Hero */
.section-hero { text-align: center; margin-bottom: 40px; }
.section-label {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--accent-light); background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.25); border-radius: 100px; padding: 3px 12px; margin-bottom: 16px;
}
.section-hero h1 {
  font-size: clamp(26px, 5vw, 44px); font-weight: 800; letter-spacing: -.02em;
  color: #f1f5f9; margin-bottom: 12px;
}
.section-hero p { font-size: 16px; color: var(--muted); max-width: 560px; margin: 0 auto; }

.section-heading { text-align: center; margin-bottom: 32px; }
.section-heading h2 {
  font-size: clamp(20px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; color: #f1f5f9; margin-bottom: 8px;
}
.section-heading p { font-size: 14px; color: var(--muted); }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: rgba(99,102,241,.4); transform: translateY(-2px); }
.stat-card.accent { background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.25); }
.stat-value { font-size: 32px; font-weight: 800; color: var(--accent-light); line-height: 1; margin-bottom: 6px; }
.stat-card.accent .stat-value { color: var(--accent-light); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* Tip */
.tip-box {
  display: flex; gap: 12px; background: rgba(234,179,8,.08); border: 1px solid rgba(234,179,8,.25);
  border-radius: var(--radius); padding: 14px 18px; font-size: 14px; color: var(--text-2); margin-bottom: 24px;
}
.tip-box code {
  font-family: 'Cascadia Code','Fira Code',Consolas,monospace; font-size: .85em;
  background: rgba(255,255,255,.08); border-radius: 4px; padding: 1px 6px; color: var(--yellow);
}

/* Compare */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare-card {
  border-radius: var(--radius); padding: 28px; border: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column; gap: 12px;
}
.compare-card.good { border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.05); }
.compare-card.bad  { border-color: rgba(239,68,68,.3);  background: rgba(239,68,68,.05); }
.compare-icon { font-size: 1.5rem; font-weight: 800; }
.compare-card.good .compare-icon { color: var(--green); }
.compare-card.bad  .compare-icon { color: var(--red); }
.compare-card h3 { font-size: 18px; font-weight: 700; color: #f1f5f9; }
.compare-card ul { list-style: none; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.compare-card li { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.compare-card li::before { content: '→'; font-weight: 700; flex-shrink: 0; }
.compare-card.good li::before { color: var(--green); }
.compare-card.bad  li::before { color: var(--red); }

/* Benefits */
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.benefit-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color .2s, transform .2s;
}
.benefit-card:hover { border-color: rgba(99,102,241,.4); transform: translateY(-2px); }
.benefit-icon { font-size: 1.8rem; margin-bottom: 12px; }
.benefit-card h3 { font-size: 15px; font-weight: 700; color: #f1f5f9; margin-bottom: 8px; }
.benefit-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* Steps */
.steps-list { display: flex; flex-direction: column; gap: 16px; }
.step-item {
  display: flex; gap: 20px; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.step-num {
  min-width: 36px; height: 36px; border-radius: 50%;
  background: rgba(99,102,241,.2); border: 1px solid rgba(99,102,241,.4);
  color: var(--accent-light); display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.step-body h3 { font-size: 15px; font-weight: 700; color: #f1f5f9; margin-bottom: 6px; }
.step-body p { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.step-body pre {
  background: rgba(0,0,0,.4); border: 1px solid var(--border); border-radius: 7px;
  padding: 14px 16px; overflow-x: auto;
}
.step-body code {
  font-family: 'Cascadia Code','Fira Code',Consolas,monospace;
  font-size: 13px; color: var(--accent-light); white-space: pre;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 600;
  padding: 9px 18px; border-radius: 7px; border: 1px solid transparent;
  cursor: pointer; transition: all .15s; text-decoration: none; margin-top: 4px;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-light); }
.btn-outline { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-outline:hover { color: var(--text); border-color: #475569; background: rgba(255,255,255,.04); }

/* Footer */
.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 28px 0; text-align: center; color: var(--muted); font-size: 13px;
}
.footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; transition: color .15s; }
.footer-links a:hover { color: var(--text); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

@media (max-width: 640px) {
  .compare-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .step-item { flex-direction: column; gap: 12px; }
  .nav-anchors { display: none; }
}
