:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: #334155;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-bg: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 0.6rem 2rem;
  background: rgba(15, 23, 42, 0.95);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.btn-large {
  padding: 0.9rem 2.2rem;
  font-size: 1.05rem;
  border-radius: 12px;
}

/* ===== HERO ===== */
.hero {
  padding: 10rem 2rem 6rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.03em;
}

.hero h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* ===== CODE DEMO ===== */
.code-demo {
  max-width: 750px;
  margin: 4rem auto 0;
  position: relative;
}

.code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.2rem;
  background: rgba(30, 41, 59, 0.8);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-title {
  margin-left: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.code-body {
  padding: 1.5rem;
  overflow-x: auto;
}

.code-body pre {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #e6edf3;
}

.code-body .comment { color: #8b949e; }
.code-body .keyword { color: #ff7b72; }
.code-body .string { color: #a5d6ff; }
.code-body .function { color: #d2a8ff; }
.code-body .property { color: #79c0ff; }
.code-body .number { color: #79c0ff; }

/* ===== SECTIONS ===== */
section {
  padding: 6rem 2rem;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto;
}

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 2rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 52px;
  height: 52px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 auto 1.2rem;
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== API RESPONSE DEMO ===== */
.response-demo {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 800px;
  margin: 3rem auto 0;
  overflow: hidden;
}

.response-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.response-tab {
  padding: 0.8rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s;
}

.response-tab.active {
  color: var(--primary-light);
  border-bottom: 2px solid var(--primary);
}

.response-body {
  padding: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.response-body pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #e6edf3;
}

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.testimonial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.testimonial-role {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ===== CTA ===== */
.cta-section {
  text-align: center;
  padding: 6rem 2rem;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 8rem 1.5rem 4rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1.05rem; }
  .hero-stats { gap: 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .price-card.popular { transform: none; }
  .price-card.popular:hover { transform: translateY(-4px); }
  .testimonials-grid { grid-template-columns: 1fr; }
  section { padding: 4rem 1.5rem; }
  .section-header h2 { font-size: 1.8rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ===== LIVE DEMO ===== */
.live-demo-input {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.live-demo-input input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.live-demo-input input:focus {
  outline: none;
  border-color: var(--primary);
}

.live-demo-input input::placeholder {
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .live-demo-input { flex-direction: column; }
}

/* ===== FEEDBACK FORM ===== */
.feedback-form-container {
  max-width: 700px;
  margin: 0 auto;
}

.feedback-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group select {
  cursor: pointer;
}

.star-rating {
  display: flex;
  gap: 0.3rem;
  padding-top: 0.25rem;
}

.star-rating .star {
  font-size: 1.8rem;
  color: var(--border);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}

.star-rating .star.active,
.star-rating .star.hover {
  color: #f59e0b;
}

.star-rating .star:hover {
  transform: scale(1.15);
}

.feedback-result {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
}

.feedback-result.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.feedback-result.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .feedback-form { padding: 1.5rem; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
