:root {
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f2f8;
  --border: #e2e4ec;
  --border-accent: #d0d4e0;
  --text: #1a1d2d;
  --text-dim: #5a6070;
  --text-muted: #8a8f9f;
  --accent: #00b861;
  --accent-dim: #009a50;
  --accent-glow: rgba(0, 184, 97, 0.12);
  --accent-glow-strong: rgba(0, 184, 97, 0.25);
  --red: #e63950;
  --blue: #3d7aed;
  --yellow: #e6a800;
  --purple: #9333ea;
}

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* ---- QUIZ MODAL ---- */
.quiz-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.quiz-overlay.active {
  opacity: 1;
  visibility: visible;
}

.quiz-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg-card);
  border-radius: 20px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.quiz-overlay.active + .quiz-modal,
.quiz-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.quiz-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-progress {
  display: flex;
  gap: 6px;
}

.quiz-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s;
}

.quiz-progress-dot.active {
  background: var(--accent);
}

.quiz-progress-dot.completed {
  background: var(--accent);
}

.quiz-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.quiz-close:hover {
  background: var(--border);
  color: var(--text);
}

.quiz-body {
  padding: 32px 28px;
}

.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block;
  animation: quizFadeIn 0.3s ease;
}

@keyframes quizFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.quiz-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.quiz-step-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.3;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-option:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.quiz-option.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.quiz-option-radio {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.quiz-option.selected .quiz-option-radio {
  border-color: var(--accent);
}

.quiz-option.selected .quiz-option-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.quiz-option-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.quiz-input {
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quiz-input::placeholder {
  color: var(--text-muted);
}

.quiz-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.quiz-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-input-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.quiz-contact-method {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.quiz-contact-btn {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  background: var(--bg);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.quiz-contact-btn:hover {
  border-color: var(--border-accent);
}

.quiz-contact-btn.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--text);
}

.quiz-contact-btn svg {
  width: 18px;
  height: 18px;
}

.quiz-contact-btn.phone svg { fill: var(--accent); }
.quiz-contact-btn.telegram svg { fill: #26A5E4; }
.quiz-contact-btn.whatsapp svg { fill: #25D366; }

.quiz-footer {
  padding: 20px 28px 28px;
  display: flex;
  gap: 12px;
}

.quiz-btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-btn-back {
  background: var(--bg);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.quiz-btn-back:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.quiz-btn-next {
  background: var(--accent);
  color: white;
}

.quiz-btn-next:hover {
  background: var(--accent-dim);
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}

.quiz-btn-next:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.quiz-success {
  text-align: center;
  padding: 20px 0;
}

.quiz-success-icon {
  width: 80px;
  height: 80px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 24px;
}

.quiz-success-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.quiz-success-text {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
}

@media (max-width: 480px) {
  .quiz-modal {
    width: 95%;
    max-height: 95vh;
  }
  .quiz-header, .quiz-body, .quiz-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .quiz-contact-method {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .quiz-contact-btn {
    flex: 1;
    padding: 10px 6px;
    font-size: 11px;
    gap: 4px;
  }
  .quiz-contact-btn svg {
    width: 14px;
    height: 14px;
  }
}
