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

:root {
  --bg:        #0a0a0f;
  --bg-alt:    #111118;
  --surface:   #16161f;
  --border:    #232330;
  --text:      #e4e4ed;
  --text-dim:  #8888a0;
  --accent:    #6c5ce7;
  --accent-l:  #a68eff;
  --green:     #2ed573;
  --red:       #ff4757;
  --yellow:    #ffa502;
  --radius:    12px;
  --radius-sm: 8px;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Inter', system-ui, sans-serif;
}

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

a { color: var(--accent-l); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.9em; }

.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;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.2rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-icon { color: var(--accent-l); font-size: 0.85em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-dim); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; padding: 8px 18px;
  background: var(--accent); color: #fff; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.85rem;
}
.btn:hover { background: var(--accent-l); text-decoration: none; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ── Hero ────────────────────────────────────────── */
.hero {
  padding: 160px 24px 80px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block; padding: 4px 14px;
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 20px; font-size: 0.8rem;
  color: var(--accent-l); font-weight: 500;
  margin-bottom: 24px;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--accent-l); }
.hero-sub { margin-top: 20px; font-size: 1.15rem; color: var(--text-dim); max-width: 640px; margin-left: auto; margin-right: auto; line-height: 1.7; }

.hero-actions { margin-top: 40px; }
.install-cmd {
  display: inline-flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 24px;
  cursor: pointer; transition: border-color 0.2s;
  max-width: 100%;
}
.install-cmd:hover { border-color: var(--accent); }
.install-cmd code { font-size: 1rem; color: var(--green); }
.copy-hint { font-size: 0.75rem; color: var(--text-dim); }

.hero-visual { margin-top: 56px; }

/* ── Terminal ────────────────────────────────────── */
.terminal {
  background: #0d0d14; border: 1px solid var(--border); border-radius: var(--radius);
  text-align: left; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  max-width: 700px; margin: 0 auto;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green { background: var(--green); }
.terminal-title { margin-left: auto; font-size: 0.75rem; color: var(--text-dim); }
.terminal-body { padding: 20px; font-family: var(--mono); font-size: 0.85rem; line-height: 1.8; overflow-x: auto; }
.t-prompt { color: var(--green); }
.t-info { color: var(--accent-l); }
.t-step { color: var(--green); }
.t-dim { color: var(--text-dim); }
.t-success { color: var(--green); font-weight: 600; }

/* ── Sections ────────────────────────────────────── */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 2rem; font-weight: 800; text-align: center; letter-spacing: -0.02em; }
.section-sub { text-align: center; color: var(--text-dim); margin-top: 12px; font-size: 1.05rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ── Feature Grid ────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--accent); }
.feature-icon { margin-bottom: 14px; color: var(--accent-l); display: flex; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }

/* ── How It Works ────────────────────────────────── */
.steps-grid {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 20px; margin-top: 56px; flex-wrap: wrap;
}
.step {
  flex: 1; min-width: 220px; max-width: 300px;
  text-align: center; padding: 28px;
}
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; margin-bottom: 16px;
}
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 0.9rem; }
.step-arrow { color: var(--text-dim); padding-top: 40px; display: flex; align-items: flex-start; }

/* ── Code Blocks ─────────────────────────────────── */
.code {
  background: #0d0d14; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; font-family: var(--mono); font-size: 0.82rem;
  line-height: 1.8; overflow-x: auto; color: var(--text);
}
.code-dark { background: var(--surface); }
.c-comment { color: #6b6b88; }
.c-key { color: var(--accent-l); }
.c-str { color: var(--green); }
.c-num { color: var(--yellow); }

/* ── Examples ────────────────────────────────────── */
.example { margin-top: 48px; }
.example-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.example-header h3 { font-size: 1.1rem; font-weight: 700; }
.example-tag {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  padding: 3px 10px; border-radius: 12px;
  background: rgba(108, 92, 231, 0.15); color: var(--accent-l);
}
.example-video {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 12px;
  background: #000;
}
.example-video video {
  width: 100%; display: block;
}
.example-details {
  margin-top: 0;
}
.example-details summary {
  cursor: pointer; font-size: 0.85rem; font-weight: 500;
  color: var(--text-dim); padding: 8px 0;
  list-style: none; display: flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.example-details summary:hover { color: var(--text); }
.example-details summary::-webkit-details-marker { display: none; }
.example-details summary::before {
  content: ''; display: inline-block;
  width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.2s;
}
.example-details[open] summary::before {
  transform: rotate(90deg);
}
.example-details .code { margin-top: 8px; }

/* ── Action Reference Grid ───────────────────────── */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 48px; }
.ref-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.ref-card h4 { font-size: 1rem; font-weight: 700; color: var(--accent-l); margin-bottom: 10px; }
.ref-usage {
  display: block; background: #0d0d14; border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 0.78rem; line-height: 1.6;
  color: var(--green); margin-bottom: 10px; white-space: pre;
}
.ref-card p { color: var(--text-dim); font-size: 0.85rem; line-height: 1.5; }

/* ── Options Table ───────────────────────────────── */
.options-table-wrap { overflow-x: auto; margin-top: 24px; }
.options-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
.options-table th {
  text-align: left; padding: 12px 16px; font-weight: 600;
  border-bottom: 2px solid var(--border); color: var(--text-dim);
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.options-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.options-table td code {
  background: var(--surface); padding: 2px 8px; border-radius: 4px;
  font-size: 0.82rem;
}
.mt-lg { margin-top: 56px; }

/* ── CTA ─────────────────────────────────────────── */
.section-cta {
  padding: 100px 0; text-align: center;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}
.section-cta h2 { font-size: 2rem; font-weight: 800; margin-bottom: 40px; }
.cta-steps { max-width: 560px; margin: 0 auto; }

/* ── Footer ──────────────────────────────────────── */
.footer { padding: 32px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-text { color: var(--text-dim); font-size: 0.85rem; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 100px 16px 48px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 0.92rem; padding: 0 8px; word-break: break-word; }
  .install-cmd { padding: 10px 14px; gap: 4px 8px; flex-wrap: wrap; justify-content: center; }
  .install-cmd code { font-size: 0.78rem; }
  .copy-hint { font-size: 0.68rem; }
  .hero-visual { margin-top: 36px; }
  .terminal { margin: 0 -8px; }
  .terminal-body { font-size: 0.68rem; padding: 12px; line-height: 1.7; }
  .section { padding: 64px 0; }
  .section-title { font-size: 1.6rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); padding: 8px 0; }
  .nav-links a:not(.btn) { display: none; }
  .ref-grid { grid-template-columns: 1fr; }
  .code { font-size: 0.72rem; padding: 16px; }
  .section-cta h2 { font-size: 1.5rem; }
  .options-table { font-size: 0.82rem; }
}
