/* psychometrictest.ai — mobile-first, playful-gen */

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

:root {
  --purple:   #7C3AED;
  --purple-l: #EDE9FE;
  --green:    #10B981;
  --green-l:  #D1FAE5;
  --orange:   #F59E0B;
  --orange-l: #FEF3C7;
  --bg:       #F8F7FF;
  --card:     #FFFFFF;
  --text:     #1F1435;
  --muted:    #6B7280;
  --radius:   16px;
  --shadow:   0 4px 24px rgba(124,58,237,0.10);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

/* ── SCREENS ─────────────────────────────────── */

.screen {
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  padding: 24px 20px 40px;
  gap: 20px;
}

.screen.active { display: flex; }

/* ── TOP BAR ─────────────────────────────────── */

.top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

.back-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--purple);
}

.progress-label {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

/* ── PROGRESS BAR ────────────────────────────── */

.progress-bar {
  height: 6px;
  background: var(--purple-l);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 99px;
  transition: width 0.35s ease;
  width: 0%;
}

/* ── CARDS ───────────────────────────────────── */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card h2 { font-size: 20px; line-height: 1.35; }
.card p  { font-size: 15px; color: var(--muted); line-height: 1.55; }

/* ── SECTION CHIP ────────────────────────────── */

.section-chip {
  display: inline-block;
  background: var(--purple-l);
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 6px;
  padding: 4px 12px;
  width: fit-content;
  align-self: flex-start;
}

/* ── SECTION PILLS (landing) ─────────────────── */

.section-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pill {
  background: var(--card);
  border: 1.5px solid #E5E7EB;
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
}

/* ── STATEMENT CARD ──────────────────────────── */

.statement-card { justify-content: center; min-height: 140px; }
.statement-text { font-size: 18px; font-weight: 600; line-height: 1.5; color: var(--text); }

/* ── LIKERT SCALE ────────────────────────────── */

.likert-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.likert-btn {
  background: var(--card);
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius);
  padding: 12px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.likert-btn:hover  { border-color: var(--purple); background: var(--purple-l); }
.likert-btn:active { transform: scale(0.95); }
.likert-btn.selected { border-color: var(--purple); background: var(--purple-l); }

.lk-num  { font-size: 20px; font-weight: 700; color: var(--purple); }
.likert-btn small { font-size: 9px; color: var(--muted); text-align: center; line-height: 1.3; }

/* ── FORCED CHOICE ───────────────────────────── */

.fc-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fc-btn {
  background: var(--card);
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  line-height: 1.4;
}

.fc-btn:hover  { border-color: var(--purple); background: var(--purple-l); }
.fc-btn:active { transform: scale(0.98); }
.fc-btn.selected { border-color: var(--purple); background: var(--purple-l); }

.fc-label {
  background: var(--purple);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.fc-or {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 2px;
}

/* ── TRANSITION SCREEN ───────────────────────── */

.transition-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  gap: 16px;
  padding: 20px;
}

.transition-icon { font-size: 64px; }
.transition-center h2 { font-size: 24px; }
.transition-center p  { font-size: 15px; color: var(--muted); max-width: 300px; }

/* ── LANDING ─────────────────────────────────── */

.brand {
  text-align: center;
  padding-top: 32px;
}

.logo-mark { font-size: 52px; margin-bottom: 8px; }

.brand h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--purple);
  letter-spacing: -0.5px;
}

.dot { color: var(--green); }

.tagline {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.hero-text { text-align: center; }
.hero-text h2 { font-size: 26px; font-weight: 700; line-height: 1.3; }
.hero-text em { color: var(--purple); font-style: normal; }
.hero-text p  { font-size: 15px; color: var(--muted); margin-top: 8px; }

.fine-print { text-align: center; font-size: 12px; color: var(--muted); margin-top: -8px; }

/* ── BUTTONS ─────────────────────────────────── */

.btn-primary {
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:active { transform: scale(0.97); }
.btn-primary:hover  { background: #6D28D9; }

/* ── FORM ────────────────────────────────────── */

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.optional { font-weight: 400; color: var(--muted); }

input, select {
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}

input:focus, select:focus { border-color: var(--purple); }

/* ── INTEREST SWIPE ──────────────────────────── */

.swipe-card { align-items: center; text-align: center; padding: 32px 24px; }
.interest-icon { font-size: 56px; }
.swipe-card h2 { font-size: 19px; }

.rate-label { text-align: center; font-size: 13px; color: var(--muted); font-weight: 500; }

.rating-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.rate-btn {
  background: var(--card);
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius);
  padding: 14px 6px;
  font-size: 22px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  text-align: center;
  line-height: 1.4;
}

.rate-btn small { font-size: 10px; color: var(--muted); display: block; }
.rate-btn:hover  { border-color: var(--purple); background: var(--purple-l); }
.rate-btn:active { transform: scale(0.95); }
.rate-btn.selected { border-color: var(--purple); background: var(--purple-l); }

/* ── APTITUDE ────────────────────────────────── */

.section-tag {
  display: inline-block;
  background: var(--purple-l);
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 6px;
  padding: 3px 10px;
  width: fit-content;
}

.options-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

.option-btn {
  background: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.option-btn:hover    { border-color: var(--purple); background: var(--purple-l); }
.option-btn.correct  { border-color: var(--green);  background: var(--green-l); }
.option-btn.wrong    { border-color: #EF4444;        background: #FEE2E2; }

.apt-note { font-size: 12px; color: var(--muted); text-align: center; }

/* ── RESULTS ─────────────────────────────────── */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 16px;
  color: var(--muted);
}

.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--purple-l);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.section-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.match-list { display: flex; flex-direction: column; gap: 10px; }

.match-row {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.match-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.match-name  { font-weight: 600; font-size: 15px; }
.match-pct   { font-weight: 700; color: var(--purple); font-size: 15px; }

.bar-track { height: 6px; background: var(--purple-l); border-radius: 99px; }
.bar-fill  { height: 100%; background: var(--purple); border-radius: 99px; }

.career-cards { display: flex; flex-direction: column; gap: 12px; }

.career-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--purple);
}

.career-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.career-name   { font-weight: 700; font-size: 16px; flex: 1; }
.career-fit    { font-weight: 800; font-size: 18px; color: var(--purple); white-space: nowrap; }
.career-sector { font-size: 13px; color: var(--muted); margin-top: 4px; }
.career-what   { font-size: 13px; color: var(--text); margin-top: 8px; line-height: 1.5; }

.ai-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--green-l);
  color: #065F46;
}

.ai-tag.pressure  { background: var(--orange-l); color: #92400E; }
.ai-tag.transform { background: #FEE2E2; color: #991B1B; }

.student-snapshot h2 { font-size: 22px; }

.cta-block {
  background: var(--purple);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cta-block p { color: rgba(255,255,255,0.85); font-size: 15px; }
.cta-block .btn-primary { background: #fff; color: var(--purple); }
.cta-block .btn-primary:hover { background: #F3F4F6; }
