:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #EEF2FF;
  --text: #1F2937;
  --text-light: #6B7280;
  --bg: #FFFFFF;
  --bg-alt: #F9FAFB;
  --border: #E5E7EB;
  --success: #10B981;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; color: var(--text); line-height: 1.6; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1 { font-size: 3rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 8px; }
h3 { font-size: 1.25rem; font-weight: 600; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: var(--radius);
  background: var(--primary); color: #fff; text-decoration: none;
  font-weight: 500; font-size: 0.9rem; border: 2px solid var(--primary);
  cursor: pointer; transition: all 0.15s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; text-align: center; }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.25rem; font-weight: 700; text-decoration: none; color: var(--text); }
.logo-ai { color: var(--primary); margin-left: 2px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { text-decoration: none; color: var(--text-light); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* Hero */
.hero { padding: 140px 0 80px; text-align: center; background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%); }
.badge { display: inline-block; padding: 6px 16px; background: var(--primary); color: #fff; border-radius: 20px; font-size: 0.8rem; font-weight: 500; margin-bottom: 24px; }
.hero-sub { max-width: 560px; margin: 16px auto 0; font-size: 1.15rem; color: var(--text-light); }
.hero-cta { margin-top: 32px; }
.hero-note { display: block; margin-top: 12px; font-size: 0.85rem; color: var(--text-light); }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 48px; }
.stat { font-size: 0.9rem; color: var(--text-light); }
.stat strong { display: block; font-size: 1.5rem; color: var(--text); }

/* Demo Section */
.demo-section { padding: 80px 0; background: var(--bg); }
.section-sub { text-align: center; color: var(--text-light); max-width: 480px; margin: 0 auto 40px; }
.demo-app { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.demo-controls { display: flex; flex-direction: column; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.optional { color: var(--text-light); font-weight: 400; }
select, textarea, input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: 0.9rem; background: #fff; color: var(--text);
  transition: border-color 0.15s;
}
select:focus, textarea:focus, input:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; }
.demo-output {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; min-height: 400px; overflow-y: auto; font-size: 0.9rem; line-height: 1.7;
}
.output-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-light); text-align: center; }
.output-placeholder svg { margin-bottom: 12px; opacity: 0.4; }
.demo-limit { font-size: 0.8rem; color: var(--text-light); text-align: center; }
.generating { opacity: 0.7; }

/* Features */
.features-section { padding: 80px 0; background: var(--bg-alt); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.feature { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature p { margin-top: 8px; font-size: 0.9rem; color: var(--text-light); }

/* Pricing */
.pricing-section { padding: 80px 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.price-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 28px; text-align: center; position: relative; }
.price-card.popular { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 4px 16px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.price { font-size: 2.5rem; font-weight: 700; margin: 16px 0; }
.price span { font-size: 1rem; font-weight: 400; color: var(--text-light); }
.price-card ul { list-style: none; margin: 20px 0; text-align: left; }
.price-card li { padding: 6px 0; font-size: 0.85rem; color: var(--text-light); border-bottom: 1px solid var(--border); }
.price-card li:last-child { border-bottom: none; }
.price-card li::before { content: '✓ '; color: var(--success); font-weight: 600; }
.price-card .btn { margin-top: 8px; width: 100%; }

/* Footer */
.footer { padding: 48px 0; background: var(--text); color: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer .logo { color: #fff; }
.footer-brand p { font-size: 0.85rem; color: #9CA3AF; margin-top: 4px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #9CA3AF; text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 0.8rem; color: #6B7280; }

/* Loading spinner */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.6s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Generated content formatting */
.generated-content h1, .generated-content h2, .generated-content h3 { margin-top: 16px; margin-bottom: 8px; }
.generated-content p { margin-bottom: 12px; }
.generated-content ul, .generated-content ol { margin-left: 20px; margin-bottom: 12px; }
.generated-content li { margin-bottom: 4px; }
.copy-btn { position: absolute; top: 8px; right: 8px; background: var(--primary); color: #fff; border: none; padding: 6px 12px; border-radius: var(--radius); cursor: pointer; font-size: 0.8rem; }
.copy-btn:hover { background: var(--primary-dark); }
.output-wrapper { position: relative; }

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .demo-app { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 24px; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 480px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
