/* ── VARIABLES ─────────────────────────────────────────── */
:root {
  --bg: #141210;
  --surface: #1e1a16;
  --surface2: #262018;
  --border: #342e24;
  --accent: #c9972a;
  --accent-light: #e8b84b;
  --accent-dim: rgba(201,151,42,0.12);
  --accent-glow: rgba(201,151,42,0.22);
  --text: #f2ede6;
  --muted: #7a6f60;
  --danger: #e05c5c;
  --radio-size: 20px;
}

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── BASE ──────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Onest', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
}

/* ── AMBIENT BACKGROUND ────────────────────────────────── */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 18s ease-in-out infinite alternate;
}
.bg-blob--1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(201,151,42,0.09) 0%, transparent 70%);
  top: -140px;
  right: -120px;
  animation-duration: 22s;
}
.bg-blob--2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(140,80,20,0.07) 0%, transparent 70%);
  bottom: -100px;
  left: -80px;
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}
@keyframes blobDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.08); }
}

/* ── SHELL ─────────────────────────────────────────────── */
.quiz-shell {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

/* ── TRUST BADGE ───────────────────────────────────────── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  transition: opacity 0.4s;
}
.trust-badge.hidden { opacity: 0; pointer-events: none; }
.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

/* ── PROGRESS ──────────────────────────────────────────── */
.progress-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.progress-seg {
  height: 3px;
  flex: 1;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.4s;
}
.progress-seg.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

/* ── STEP HEADER ───────────────────────────────────────── */
.step-label {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.step-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}
.step-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── OPTIONS (radio) ───────────────────────────────────── */
.options { display: flex; flex-direction: column; gap: 10px; }

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  user-select: none;
  font-size: 15px;
}
.option:hover {
  border-color: var(--muted);
  background: var(--surface2);
  transform: translateX(3px);
}
.option.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.option-meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  font-weight: 300;
}
.option.selected .option-meta { color: var(--accent-light); opacity: 0.8; }

/* radio dot */
.option-dot {
  width: var(--radio-size);
  height: var(--radio-size);
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.option.selected .option-dot { border-color: var(--accent); }
.option-dot::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  transform: scale(0.5);
}
.option.selected .option-dot::after { opacity: 1; transform: scale(1); }

/* ── STYLE GRID (checkbox) ─────────────────────────────── */
.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.style-card {
  border-radius: 12px;
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  background: var(--surface);
}
.style-card:hover { border-color: var(--muted); transform: translateY(-2px); }
.style-card.selected { border-color: var(--accent); }

.style-card-visual {
  width: 100%;
  height: 90px;
  position: relative;
  overflow: hidden;
  background: var(--surface2);
}
.style-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.style-card:hover .style-card-visual img { transform: scale(1.05); }

.style-card-label {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.style-card.selected .style-card-label { color: var(--accent-light); }

.style-check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--accent-glow);
}
.style-card.selected .style-check { display: flex; }

/* ── CONTACT FORM ──────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.form-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Onest', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder { color: var(--muted); }

.phone-wrap { display: flex; gap: 8px; }
.phone-code {
  width: 100px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px;
  color: var(--text);
  font-family: 'Onest', sans-serif;
  font-size: 14px;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.phone-code:focus { border-color: var(--accent); }

/* ── CONSENT ───────────────────────────────────────────── */
.consent-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
}
.consent-checkbox {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}
.consent-text a { color: var(--accent-light); text-decoration: none; }
.consent-text a:hover { text-decoration: underline; }

/* ── BUTTONS ───────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.btn {
  height: 52px;
  border-radius: 12px;
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.btn-back {
  width: 52px;
  flex-shrink: 0;
  background: var(--surface);
  color: var(--muted);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.btn-back:hover { border-color: var(--muted); color: var(--text); }

.btn-next, .btn-submit {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  color: #120e08;
  position: relative;
  overflow: hidden;
}
.btn-next::after, .btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.btn-next:hover::after, .btn-submit:hover::after { background: rgba(255,255,255,0.07); }
.btn-next:hover, .btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(201,151,42,0.35);
}
.btn-next:active, .btn-submit:active { transform: translateY(0); }
.btn-next:disabled, .btn-submit:disabled {
  background: var(--surface2);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── MESSAGES ──────────────────────────────────────────── */
.error-msg {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  display: none;
}
.error-msg.show { display: block; }

.api-error {
  background: rgba(224,92,92,0.08);
  border: 1px solid rgba(224,92,92,0.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 16px;
  display: none;
}
.api-error.show { display: block; }

/* ── SPINNER ───────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(18,14,8,0.25);
  border-top-color: #120e08;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── STEP ANIMATION ────────────────────────────────────── */
.step { animation: fadeUp 0.3s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SUCCESS SCREEN ────────────────────────────────────── */
.success-screen {
  text-align: center;
  padding: 32px 0;
  animation: fadeUp 0.4s ease;
}
.success-icon {
  width: 72px; height: 72px;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  font-size: 28px;
  box-shadow: 0 0 32px var(--accent-glow);
}
.success-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}
.success-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.success-divider {
  width: 40px; height: 2px;
  background: var(--border);
  margin: 20px auto;
  border-radius: 1px;
}
.success-stats {
  display: flex;
  gap: 0;
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.success-stat {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.success-stat:last-child { border-right: none; }
.success-stat-num {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 4px;
}
.success-stat-label {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── LANDING SCREEN ────────────────────────────────────── */
.landing {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  animation: fadeUp 0.4s ease;
}
.landing-hero {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--surface2);
}
.landing-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.landing-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(20,16,12,0.7) 100%);
}
.landing-body {
  padding: 28px 24px 32px;
}
.landing-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 28px;
}
.landing-bonus {
  font-size: 14px;
  color: #ffffff;
  font-weight: 500;
  margin: 0 0 32px 0;
  padding: 8px 16px;
  background: rgba(255,107,53,0.08);
  display: inline-block;
  border-radius: 40px;
  line-height: 1.4;
}

/* Единый блок действия — кнопка + бонус */
.landing-action {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.landing-btn {
  width: 100%;
  font-size: 16px;
  padding: 16px 24px;
  font-weight: 600;
  background: #ffc107;
  color: #1a1a1a;
  border: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.landing-btn:hover {
  background: #e0a800;
  transform: translateY(-1px);
}

.landing-action-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #ffc107;
  background: rgba(255,193,7,0.1);
  padding: 12px 16px;
  border-radius: 40px;
  text-align: center;
  font-weight: 500;
}

.landing-action-icon {
  font-size: 16px;
}

/* Адаптив для мобильных */
@media (max-width: 480px) {
  .landing-body {
    padding: 20px 16px 24px;
  }
  .landing-action-note {
    font-size: 12px;
    padding: 10px 12px;
  }
  .landing-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
}