/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg2: #f8f8fa;
  --bg3: #f1f1f5;
  --border: rgba(0,0,0,0.07);
  --border-hover: rgba(0,0,0,0.15);
  --text: #0a0a0f;
  --text-muted: #6b6b80;
  --text-dim: #c0c0cc;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --gradient: linear-gradient(135deg, #1a1a2e, #16213e);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ===========================
   PARTICLE CANVAS
   =========================== */
#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===========================
   SCROLLBAR
   =========================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 999px; }

/* ===========================
   NAVBAR
   =========================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 2.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 1.3rem;
}

.nav-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.nav-links a:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text);
}

.nav-cta {
  padding: 8px 20px;
  background: var(--text);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s, transform 0.2s;
}

.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); }

/* ===========================
   BUTTONS
   =========================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--text);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  opacity: 0.9;
}

.btn-xl { padding: 18px 36px; font-size: 1.05rem; border-radius: 999px; flex-direction: column; gap: 4px; }
.btn-sub { font-size: 0.72rem; font-weight: 400; opacity: 0.6; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: all 0.2s;
  background: rgba(255,255,255,0.7);
  font-weight: 500;
}

.btn-ghost:hover {
  border-color: rgba(0,0,0,0.25);
  color: var(--text);
  background: rgba(0,0,0,0.03);
  transform: translateY(-1px);
}

/* ===========================
   GRADIENT TEXT
   =========================== */
.gradient-text {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   HERO
   =========================== */
.hero {
  min-height: 100vh;
  padding: 120px 2rem 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-bg { display: none; }

.hero-content {
  flex: 1;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2563eb;
  width: fit-content;
  letter-spacing: 0.2px;
}

.hero-title {
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2.5px;
  color: var(--text);
}

.hero-sub {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.5px; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ===========================
   HERO EDITOR
   =========================== */
.hero-editor {
  flex: 1;
  max-width: 520px;
}

.editor-window {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.1);
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.08),
    0 32px 80px rgba(0,0,0,0.12);
  animation: editorFloat 6s ease-in-out infinite;
}

@keyframes editorFloat {
  0%, 100% { transform: translateY(0px) rotate(-0.5deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes editorFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.editor-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f7f7f9;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.traffic-lights { display: flex; gap: 6px; }
.tl { width: 12px; height: 12px; border-radius: 50%; }
.tl.red { background: #ff5f57; }
.tl.yellow { background: #febc2e; }
.tl.green { background: #28c840; }

.editor-filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #999;
  margin-left: 4px;
}

.editor-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; background: #fff; }

.code-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.9;
  color: #333;
}

.ln { color: #ccc; margin-right: 16px; user-select: none; font-size: 0.72rem; }
.kw { color: #7c3aed; font-weight: 600; }
.mod { color: #2563eb; }
.fn { color: #059669; }
.op { color: #0ea5e9; }
.va { color: #dc2626; }
.ty { color: #d97706; }
.st { color: #16a34a; }
.cm { color: #aaa; font-style: italic; }

.ai-suggestion {
  background: #f0f4ff;
  border: 1px solid #c7d7fe;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #4f46e5;
  letter-spacing: 0.5px;
}

.ai-text {
  font-size: 0.83rem;
  color: #6b7280;
}

/* ===========================
   SECTION COMMON
   =========================== */
.section-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #2563eb;
  text-transform: uppercase;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  text-align: center;
  line-height: 1.7;
}

/* ===========================
   FEATURES
   =========================== */
.features {
  padding: 100px 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  grid-template-rows: auto auto;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  border-color: rgba(0,0,0,0.14);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.feature-large {
  grid-column: span 2;
}

.feature-icon { font-size: 2rem; }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-tag {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  background: rgba(37,99,235,0.06);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: 999px;
  font-size: 0.72rem;
  color: #2563eb;
  font-weight: 600;
  margin-top: auto;
}

/* ===========================
   DOWNLOAD
   =========================== */
.download {
  padding: 60px 2rem 120px;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.download-card {
  background: var(--text);
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-glow {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.download-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.download-buttons { margin-top: 0.5rem; }

.download-content .section-tag { color: rgba(255,255,255,0.5); }
.download-content h2 { color: #fff; }
.download-content .gradient-text {
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.download-content .section-sub { color: rgba(255,255,255,0.55); }
.download-content .btn-primary {
  background: #fff;
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.download-content .btn-primary:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.4); opacity: 0.95; }

.install-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.5);
}

.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}

.step-arrow { color: rgba(255,255,255,0.2); font-size: 0.8rem; }

.step code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: rgba(255,255,255,0.8);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 2rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    padding-top: 100px;
    text-align: center;
  }

  .hero-content { align-items: center; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-editor { width: 100%; max-width: 520px; }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-large { grid-column: span 2; }

  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-large { grid-column: span 1; }
  .download-card { padding: 40px 20px; }
  .install-steps { display: none; }
}
