:root {
  --bg: #0b1020;
  --card: #141b2d;
  --card-border: #243049;
  --text: #f4f7ff;
  --muted: #9aa8c7;
  --accent: #3d8bfd;
  --accent-hover: #5ca0ff;
  --success: #2dd4a8;
  --danger: #ff6b8a;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(61, 139, 253, 0.25), transparent), var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body { display: flex; justify-content: center; padding: 24px 16px 48px; }
button, input { font: inherit; }
.quiz-shell { width: 100%; max-width: 520px; }
.quiz-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px; }
.quiz-header { text-align: center; margin-bottom: 28px; }
.quiz-logo { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, #3d8bfd, #7c5cff); font-size: 1.5rem; font-weight: 800; margin-bottom: 16px; }
.quiz-title { margin: 0 0 8px; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.quiz-subtitle { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.step-label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.question-text { margin: 0 0 20px; font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.lang-grid { display: grid; gap: 10px; }
.option-btn, .lang-btn { width: 100%; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.03); color: var(--text); cursor: pointer; }
.option-btn:hover, .lang-btn:hover { border-color: var(--accent); background: rgba(61,139,253,0.08); }
.option-btn.selected, .lang-btn.selected { border-color: var(--accent); background: rgba(61,139,253,0.15); box-shadow: inset 0 0 0 1px var(--accent); }
.lang-btn { display: flex; align-items: center; gap: 12px; font-size: 1.05rem; }
.lang-flag { font-size: 1.5rem; line-height: 1; }
.suggest-btn { margin-top: 12px; width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--card-border); background: transparent; color: var(--muted); cursor: pointer; }
.nav-row { display: flex; gap: 10px; margin-top: 24px; }
.nav-btn { flex: 1; padding: 14px 16px; border-radius: 12px; border: none; cursor: pointer; font-weight: 600; }
.nav-btn.primary { background: var(--accent); color: #fff; }
.nav-btn.primary:disabled { opacity: 0.45; cursor: not-allowed; }
.nav-btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--card-border); }
.progress { display: flex; gap: 6px; margin-bottom: 20px; }
.progress-dot { flex: 1; height: 4px; border-radius: 99px; background: var(--card-border); }
.progress-dot.active { background: var(--accent); }
.progress-dot.done { background: var(--success); }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: var(--muted); }
.form-field input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--card-border); background: rgba(0,0,0,0.2); color: var(--text); }
.field-error { margin-top: 6px; color: var(--danger); font-size: 0.85rem; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.modal { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.status-msg { margin-top: 12px; color: var(--success); }
.error-msg { margin-top: 12px; color: var(--danger); }
