:root {
  --bg: #fff7ed;
  --card: #ffffff;
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --text: #1f2937;
  --muted: #6b7280;
  --correct: #16a34a;
  --wrong: #dc2626;
  --border: #e5e7eb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 24px 12px;
  min-height: 100vh;
}
.app { width: 100%; max-width: 640px; }
header { text-align: center; margin-bottom: 20px; }
header h1 { font-size: 1.4rem; margin: 0 0 4px; color: var(--primary-dark); }
header p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}
.progress-fill { height: 100%; background: var(--primary); transition: width 0.3s ease; }
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.q-index { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; text-align: left; }
.q-statement { font-size: 1.1rem; line-height: 1.6; margin-bottom: 20px; text-align: left; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  text-align: left;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.option:hover:not(.disabled) { border-color: var(--primary); }
.option.selected { border-color: var(--primary); background: #fff7ed; }
.option.correct { border-color: var(--correct); background: #f0fdf4; color: var(--correct); font-weight: 600; }
.option.wrong { border-color: var(--wrong); background: #fef2f2; color: var(--wrong); font-weight: 600; }
.option.disabled { cursor: default; }
.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.feedback { margin-top: 16px; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.source { margin-top: 6px; font-size: 0.8rem; color: var(--muted); }
.actions { margin-top: 20px; display: flex; justify-content: flex-end; }
button.next-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}
button.next-btn:disabled { background: #fbbf9a; cursor: not-allowed; }
button.next-btn:hover:not(:disabled) { background: var(--primary-dark); }
.poll-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--primary-dark);
  background: #ffedd5;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.result-screen { text-align: center; }
.result-score { font-size: 2.2rem; font-weight: 700; color: var(--primary-dark); margin: 12px 0; }
.result-note { color: var(--muted); margin-bottom: 20px; line-height: 1.6; }
.poll-summary { text-align: left; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.poll-summary h3 { font-size: 1rem; margin-bottom: 10px; }
.poll-summary p { margin: 4px 0; font-size: 0.95rem; }
.result-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.restart-btn { background: var(--text); }

.certificate-screen { text-align: center; }
.certificate-canvas {
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* lead form */
.lead-heading { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 14px; text-align: left; }
.lead-form { display: flex; flex-direction: column; gap: 14px; }
.lead-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: left;
}
.lead-form input,
.lead-form select {
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  text-align: left;
}
.lead-form input:focus,
.lead-form select:focus {
  outline: none;
  border-color: var(--primary);
}
.lead-error { color: var(--wrong); font-size: 0.85rem; min-height: 1.2em; text-align: left; }

/* GenZ submit popup */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.popup-overlay.show { opacity: 1; pointer-events: auto; }
.popup-card {
  position: relative;
  background: linear-gradient(160deg, #ffffff 0%, #fff7ed 100%);
  border-radius: 20px;
  padding: 32px 24px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.popup-overlay.show .popup-card { transform: scale(1) translateY(0); }
.popup-emoji { font-size: 2.5rem; margin-bottom: 8px; }
.popup-title {
  font-size: 1.25rem;
  margin: 0 0 10px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), #db2777);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.popup-text { color: var(--text); font-size: 0.95rem; line-height: 1.6; margin-bottom: 22px; }
.popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.popup-btn { width: 100%; }
