@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

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

:root {
  --bg: #0A0A0A;
  --surface: #111111;
  --surface2: #1A1A1A;
  --border: #222222;
  --text: #E0E0E0;
  --text-muted: #888888;
  --accent: #00FF88;
  --accent-dim: #00CC6A;
  --danger: #FF4444;
  --radius: 12px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- NAV --- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
}
.nav-logo { font-weight: 700; font-size: 20px; color: var(--accent); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 14px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover { background: var(--accent-dim); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* --- HERO --- */
.hero {
  text-align: center;
  padding: 100px 32px 60px;
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

/* --- SECTIONS --- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 32px;
}
.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 48px;
}

/* --- HOW IT WORKS --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.step-number {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 14px; }

/* --- TEMPLATE GRID --- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.template-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.template-card:hover { border-color: var(--accent); }
.template-card .icon { font-size: 32px; margin-bottom: 12px; }
.template-card h3 { font-size: 16px; margin-bottom: 6px; }
.template-card p { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }

/* --- PRICING --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.pricing-card.featured { border-color: var(--accent); }
.pricing-card .badge {
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 16px;
}
.pricing-card h3 { font-size: 24px; margin-bottom: 8px; }
.pricing-card .price { font-size: 36px; font-weight: 700; }
.pricing-card .price span { font-size: 16px; color: var(--text-muted); font-weight: 400; }
.pricing-card ul { list-style: none; margin: 24px 0; }
.pricing-card li { padding: 6px 0; font-size: 14px; color: var(--text-muted); }
.pricing-card li::before { content: '\2713 '; color: var(--accent); margin-right: 8px; }

/* --- MODAL --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 420px;
  width: 90%;
}
.modal h2 { font-size: 22px; margin-bottom: 20px; }
.modal .close {
  position: absolute;
  top: 16px;
  right: 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 20px;
}

/* --- FORMS --- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 6px; }

/* --- DASHBOARD --- */
.dashboard { display: none; }
.dashboard.active { display: block; }
.landing { display: block; }
.landing.hidden { display: none; }

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.bot-list { display: grid; gap: 16px; }
.bot-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bot-item-info h3 { font-size: 16px; }
.bot-item-info p { color: var(--text-muted); font-size: 13px; }
.bot-item-actions { display: flex; gap: 8px; }

/* --- BOT EDITOR --- */
.editor-view { display: none; }
.editor-view.active { display: block; }
.editor-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.editor-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.editor-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.editor-panel { display: none; }
.editor-panel.active { display: block; }

/* --- CHAT --- */
.chat-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 500px;
  display: flex;
  flex-direction: column;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.chat-msg {
  margin-bottom: 12px;
  max-width: 80%;
}
.chat-msg.user { margin-left: auto; text-align: right; }
.chat-msg .bubble {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.chat-msg.user .bubble { background: var(--accent); color: #000; border-bottom-right-radius: 4px; }
.chat-msg.bot .bubble { background: var(--surface2); border-bottom-left-radius: 4px; }
.chat-msg.typing .bubble { color: var(--text-muted); }
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.chat-input-row input:focus { outline: none; border-color: var(--accent); }

/* --- USAGE BAR --- */
.usage-bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.usage-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
}

/* --- DEMO CHAT (landing) --- */
.demo-section {
  max-width: 600px;
  margin: 0 auto;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .steps { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .nav { padding: 12px 16px; }
  .section { padding: 48px 16px; }
}
@media (max-width: 480px) {
  .template-grid { grid-template-columns: 1fr; }
}

/* --- TOAST --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  z-index: 300;
  animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- EMBED CODE BOX --- */
.embed-code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
  margin-top: 12px;
}
