@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-glass: rgba(15, 23, 42, 0.72);
  --bg-glass-card: rgba(30, 41, 59, 0.45);
  --bg-glass-hover: rgba(51, 65, 85, 0.5);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-focus: rgba(99, 102, 241, 0.4);
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-emerald: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
  --glow-indigo: 0 0 25px rgba(99, 102, 241, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Ambient glow blobs in background */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.glow-1 {
  width: 450px;
  height: 450px;
  top: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
}
.glow-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12), transparent 70%);
}

/* Container */
.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  position: relative;
  z-index: 10;
}

/* Glassmorphism utility */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05) inset;
  border-radius: var(--radius-xl);
}

.glass-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  transition: all 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-glass-hover);
}

/* Header Banner */
.hero-header {
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-indigo), transparent);
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 70%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* Step Wizard Navigation */
.step-nav-wrapper {
  margin-bottom: 24px;
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  width: 14.28%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  border-radius: 9999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.step-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.step-chips::-webkit-scrollbar {
  display: none;
}

.step-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-glass);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.step-chip.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.step-chip.completed {
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.step-chip-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.step-chip.active .step-chip-num {
  background: var(--accent-indigo);
  color: #ffffff;
}

.step-chip.completed .step-chip-num {
  background: var(--accent-emerald);
  color: #064e3b;
  font-weight: 800;
}

/* Question Section & Cards */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-head {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.question-block {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.question-block:last-child {
  border-bottom: none;
}

.q-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.q-badge {
  flex-shrink: 0;
  margin-top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.q-helper {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-left: 32px;
}

/* Pill / Chip Selector Buttons */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 32px;
  margin-bottom: 12px;
}

.preset-chip {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.preset-chip:hover {
  background: rgba(51, 65, 85, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.preset-chip.selected {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-indigo);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
}

.preset-chip.selected::before {
  content: '✓';
  font-weight: 800;
  color: var(--accent-cyan);
}

/* Custom Text inputs & Textarea */
.input-indent {
  padding-left: 32px;
}

.custom-input,
.custom-textarea,
.custom-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.custom-input:focus,
.custom-textarea:focus,
.custom-select:focus {
  outline: none;
  border-color: var(--accent-indigo);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.custom-input::placeholder,
.custom-textarea::placeholder {
  color: #475569;
  font-size: 0.85rem;
}

.custom-textarea {
  resize: vertical;
  min-height: 72px;
}

/* Button Controls */
.action-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  text-decoration: none;
}

.btn-secondary {
  background: rgba(51, 65, 85, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.7);
  color: #ffffff;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #20ba59;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

/* Review Step Cards */
.review-group {
  padding: 18px 20px;
  margin-bottom: 14px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
}

.review-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.review-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #93c5fd;
}

.review-item {
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.review-item-label {
  color: var(--text-dim);
  font-weight: 500;
}

.review-item-val {
  color: #f1f5f9;
  font-weight: 600;
  margin-top: 2px;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* Toast alert */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: #1e293b;
  border: 1px solid var(--accent-indigo);
  color: #ffffff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* Code badge */
.code-badge {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .hero-header {
    padding: 24px 16px;
  }
  .hero-title {
    font-size: 1.45rem;
  }
  .question-block {
    padding: 18px 14px;
  }
  .q-helper, .chip-grid, .input-indent {
    padding-left: 0;
  }
  .action-footer {
    padding: 16px 14px;
  }
  .preset-chip {
    font-size: 0.8rem;
    padding: 7px 11px;
  }
}

/* Print Friendly Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .ambient-glow, .action-footer, .step-nav-wrapper, .badge-tag, .btn {
    display: none !important;
  }
  .glass-panel, .glass-card, .review-group {
    background: none !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  .hero-title {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
  }
}
