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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --bg-code: #0d0d14;
  --bg-section-dark: #08080d;
  --text: #e4e4e7;
  --text-dim: #8b8b9e;
  --text-muted: #52525b;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --yellow: #eab308;
  --border: #1e1e2a;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-weight: 700; font-size: 18px; color: var(--text);
  text-decoration: none; display: flex; align-items: center; gap: 8px;
}
.nav-logo-icon { font-size: 22px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 14px;
  font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-github {
  background: var(--accent); color: white !important; padding: 6px 16px;
  border-radius: 6px; font-weight: 600 !important;
}
.nav-github:hover { background: var(--accent-light); }
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-mobile-toggle span {
  display: block; width: 20px; height: 2px; background: var(--text);
  margin: 4px 0; transition: 0.2s;
}

/* ===== HERO ===== */
.hero {
  padding: 140px 0 80px; text-align: center; position: relative; overflow: hidden;
}
.hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: var(--accent-glow); border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-light); font-size: 13px; font-weight: 600;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(40px, 8vw, 72px); font-weight: 800; line-height: 1.1;
  letter-spacing: -2px; margin-bottom: 20px;
}
.hero-gradient {
  background: linear-gradient(135deg, var(--accent), #a78bfa, #ec4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px; color: var(--text-dim); max-width: 520px;
  margin: 0 auto 32px; line-height: 1.7;
}
.hero-stats {
  display: flex; justify-content: center; align-items: center; gap: 32px;
  margin-bottom: 40px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-value { display: block; font-size: 28px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }
.hero-install {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-code); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 20px;
  font-family: var(--mono); font-size: 15px; color: var(--accent-light);
}
.copy-btn {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  padding: 4px; border-radius: 4px; transition: 0.2s;
}
.copy-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.copy-btn.copied { color: var(--green); }

/* ===== SECTIONS ===== */
.section { padding: 80px 0; }
.section-dark { background: var(--bg-section-dark); }
.section-title {
  font-size: 36px; font-weight: 800; text-align: center; margin-bottom: 8px;
  letter-spacing: -1px;
}
.section-sub {
  text-align: center; color: var(--text-dim); font-size: 16px; margin-bottom: 48px;
}

/* ===== DEMO GRID ===== */
.demo-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.demo-explain h2 { font-size: 28px; font-weight: 700; margin-bottom: 24px; }
.explain-list { display: flex; flex-direction: column; gap: 20px; }
.explain-item { display: flex; gap: 16px; align-items: flex-start; }
.explain-icon {
  min-width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-glow); border: 1px solid rgba(99,102,241,0.3);
  color: var(--accent-light); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.explain-item strong { display: block; margin-bottom: 4px; }
.explain-item p { color: var(--text-dim); font-size: 14px; }
.explain-item code {
  background: var(--bg-code); padding: 2px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: 13px; color: var(--accent-light);
}

/* ===== CODE BLOCKS ===== */
.code-header {
  display: flex; align-items: center; gap: 6px; padding: 10px 16px;
  background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }
.code-filename { margin-left: 8px; font-size: 12px; color: var(--text-muted); font-family: var(--mono); }

.demo-code pre, .example-card pre, .result-card pre, .playground-schema {
  background: var(--bg-code); border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 var(--radius) var(--radius);
  padding: 20px; overflow-x: auto; font-family: var(--mono);
  font-size: 13px; line-height: 1.7;
}
.demo-code { border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.demo-code .code-header { border-radius: 0; }
.demo-code pre { border: none; border-radius: 0; }

/* Syntax highlighting */
.kw { color: #c084fc; }
.fn { color: #60a5fa; }
.str { color: #34d399; }
.num { color: #f97316; }
.cmt { color: #52525b; font-style: italic; }

/* ===== FEATURES GRID ===== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color 0.2s, background 0.2s;
}
.feature-card:hover { border-color: rgba(99,102,241,0.3); background: var(--bg-card-hover); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-glow); display: flex; align-items: center;
  justify-content: center; margin-bottom: 16px; color: var(--accent-light);
}
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.feature-card code {
  background: var(--bg-code); padding: 2px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: 12px; color: var(--accent-light);
}

/* ===== COMPARISON TABLE ===== */
.table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.compare-table th, .compare-table td {
  padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border);
}
.compare-table th {
  color: var(--text-dim); font-weight: 600; text-transform: uppercase;
  font-size: 12px; letter-spacing: 1px;
}
.compare-table td { color: var(--text-dim); }
.highlight-col {
  color: var(--accent-light) !important; font-weight: 600;
  background: rgba(99,102,241,0.05);
}

/* ===== PLAYGROUND ===== */
.playground {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.playground-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.playground-tab {
  padding: 12px 24px; background: none; border: none; color: var(--text-dim);
  font-family: var(--font); font-size: 14px; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent; transition: 0.2s;
  white-space: nowrap;
}
.playground-tab:hover { color: var(--text); }
.playground-tab.active { color: var(--accent-light); border-bottom-color: var(--accent); }
.playground-body { display: grid; grid-template-columns: 1fr 1fr; }
.playground-left { border-right: 1px solid var(--border); }
.playground-left .code-header { border-radius: 0; }
.playground-schema { border-radius: 0 !important; border-left: none !important; border-right: none !important; min-height: 120px; }
.playground-input {
  width: 100%; min-height: 80px; background: var(--bg-code);
  border: none; border-top: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: 13px;
  padding: 16px; resize: vertical; outline: none;
}
.playground-run {
  width: 100%; padding: 12px; background: var(--accent); color: white;
  border: none; font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: 0.2s;
}
.playground-run:hover { background: var(--accent-light); }
.playground-right .code-header { border-radius: 0; }
.playground-output {
  background: var(--bg-code); min-height: 200px; padding: 20px;
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
  border-radius: 0; border: none; overflow-x: auto; margin: 0;
}
.output-ok { color: var(--green); }
.output-fail { color: var(--red); }
.output-key { color: var(--accent-light); }
.output-val { color: var(--text); }

/* ===== API REFERENCE ===== */
.api-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px; overflow: hidden;
}
.api-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
}
.api-header h3 { font-size: 18px; font-weight: 700; font-family: var(--mono); }
.api-badge {
  font-size: 12px; font-weight: 600; padding: 4px 12px;
  border-radius: 20px; background: var(--accent-glow);
  color: var(--accent-light); border: 1px solid rgba(99,102,241,0.2);
}
.api-columns { display: grid; grid-template-columns: 1fr 1fr; }
.api-col { padding: 20px 24px; }
.api-col:first-child { border-right: 1px solid var(--border); }
.api-col h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-dim); margin-bottom: 12px;
}
.api-method {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0; gap: 12px;
}
.api-method code {
  font-family: var(--mono); font-size: 13px; color: var(--accent-light);
  white-space: nowrap;
}
.api-method span { font-size: 13px; color: var(--text-dim); text-align: right; }

/* ===== EXAMPLES ===== */
.examples-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.example-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; position: relative;
}
.example-label {
  position: absolute; top: 16px; right: 16px; font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 4px; z-index: 1;
  background: var(--accent-glow); color: var(--accent-light);
}
.example-card h3 { padding: 20px 20px 12px; font-size: 16px; }
.example-card .code-header { border-radius: 0; }
.example-card pre { border: none; border-radius: 0; }

/* ===== RESULT SHAPE ===== */
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 800px; margin: 0 auto; }
.result-card {
  border-radius: var(--radius); padding: 24px; border: 1px solid var(--border);
}
.result-ok { background: var(--green-dim); border-color: rgba(34,197,94,0.3); }
.result-fail { background: var(--red-dim); border-color: rgba(239,68,68,0.3); }
.result-badge {
  display: inline-block; padding: 4px 12px; border-radius: 4px;
  font-size: 12px; font-weight: 700; margin-bottom: 16px;
}
.result-badge.ok { background: var(--green); color: white; }
.result-badge.fail { background: var(--red); color: white; }
.result-card pre {
  background: rgba(0,0,0,0.3); border: none; border-radius: var(--radius-sm);
  padding: 16px; font-family: var(--mono); font-size: 13px; line-height: 1.7;
  margin-bottom: 12px;
}
.result-card p { font-size: 14px; color: var(--text-dim); }
.result-card code {
  background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: 12px;
}

/* ===== ROADMAP ===== */
.roadmap { max-width: 600px; margin: 0 auto; position: relative; }
.roadmap::before {
  content: ''; position: absolute; left: 15px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.roadmap-item {
  display: flex; gap: 24px; padding-bottom: 32px; position: relative;
}
.roadmap-marker {
  min-width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.roadmap-item.done .roadmap-marker {
  background: var(--green); border-color: var(--green);
}
.roadmap-item.done .roadmap-marker::after {
  content: ''; width: 10px; height: 6px; border-left: 2px solid white;
  border-bottom: 2px solid white; transform: rotate(-45deg); margin-top: -2px;
}
.roadmap-item.future .roadmap-marker {
  background: var(--bg-card); border-color: var(--text-muted);
}
.roadmap-version {
  font-size: 12px; font-weight: 700; color: var(--accent-light);
  text-transform: uppercase; letter-spacing: 1px;
}
.roadmap-content h3 { font-size: 16px; margin: 4px 0 6px; }
.roadmap-content p { font-size: 14px; color: var(--text-dim); }
.roadmap-content code {
  background: var(--bg-code); padding: 2px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: 12px; color: var(--accent-light);
}

/* ===== FOOTER ===== */
.footer {
  padding: 40px 0; border-top: 1px solid var(--border);
}
.footer-inner { text-align: center; }
.footer-brand {
  font-weight: 700; font-size: 18px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.footer p { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.footer-links { display: flex; gap: 20px; justify-content: center; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--text); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 60px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 20px;
    gap: 16px;
  }
  .demo-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .playground-body { grid-template-columns: 1fr; }
  .playground-left { border-right: none; border-bottom: 1px solid var(--border); }
  .api-columns { grid-template-columns: 1fr; }
  .api-col:first-child { border-right: none; border-bottom: 1px solid var(--border); }
  .examples-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .stat-divider { display: none; }
}
