/* style.css — Khám Phá Bản Thân | Typeform-style Redesign */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── TOKENS ─────────────────────────────────────────────────────────────────── */
:root {
  --yellow:       #EBBC01;
  --yellow-dark:  #C9A001;
  --yellow-light: #F5D233;
  --yellow-pale:  #FEF7D0;
  --on-yellow:    #1A1500;

  --dark:         #1C1B18;
  --dark-2:       #2A2924;
  --dark-3:       #38362F;

  --bg:           #FFFFFF;
  --bg-warm:      #FAFAF8;
  --text:         #1A1A1A;
  --text-2:       #555550;
  --text-muted:   #9E9E9A;
  --border:       #E8E8E3;
  --border-dark:  #D0D0C8;

  --success:      #2D8A55;
  --danger:       #D94040;
  --warning:      #E07A20;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.14);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── SCREEN MANAGER ─────────────────────────────────────────────────────────── */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; }

/* ── GLOBAL PROGRESS BAR (top of page) ─────────────────────────────────────── */
#global-progress-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 4px; background: rgba(235,188,1,0.15);
}
#global-progress-fill {
  height: 100%; width: 0%;
  background: var(--yellow);
  transition: width 0.5s var(--ease);
  box-shadow: 0 0 8px rgba(235,188,1,0.5);
}

/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — scrollable page with tabs + single CTA
══════════════════════════════════════════════════════════════════════════════ */
#screen-landing {
  background: var(--dark);
  /* Let the page scroll naturally — no overflow set here */
  position: relative;
}
#screen-landing::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(235,188,1,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 40% 60% at 90% 100%, rgba(235,188,1,0.05) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

.landing-wrap {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto;
  padding: 72px 32px 80px;
  display: flex; flex-direction: column; gap: 56px;
}

/* ── Hero ── */
.landing-hero { text-align: center; }
.landing-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(235,188,1,0.1);
  border: 1px solid rgba(235,188,1,0.25);
  color: var(--yellow); border-radius: 100px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 6px 16px;
  margin-bottom: 28px;
}

/* Credibility pills */
.landing-creds {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-top: 20px;
}
.cred-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  border-radius: 100px; padding: 5px 14px;
  font-size: 12px; font-weight: 500;
}
.landing-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(38px, 7vw, 60px);
  font-weight: 700; color: #FFFFFF;
  line-height: 1.15; margin-bottom: 20px;
}
.landing-title span { color: var(--yellow); }
.landing-desc {
  font-size: 16px; color: rgba(255,255,255,0.55);
  line-height: 1.8; max-width: 520px; margin: 0 auto;
}

/* ── Tab section ── */
.test-tabs-section {}
.tabs-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 14px;
}
/* Pill-style tabs that wrap naturally — no horizontal scroll */
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.tab-btn {
  flex: 0 0 auto;
  padding: 9px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  color: rgba(255,255,255,0.45);
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.tab-btn:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.2);
}
.tab-btn.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--on-yellow);
  box-shadow: 0 2px 12px rgba(235,188,1,0.3);
}

.tab-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 28px; min-height: 200px;
  animation: tabFadeIn 0.25s var(--ease) both;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-content-inner {}
.tab-test-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.tab-icon { font-size: 36px; }
.tab-test-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: white;
  line-height: 1.2;
}
.tab-test-code { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 3px; }
.tab-sections { display: flex; flex-direction: column; gap: 16px; }
.tab-section {}
.tab-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 8px;
}
.tab-section p {
  font-size: 15px; color: rgba(255,255,255,0.72); line-height: 1.75;
}
.tab-bullets { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.tab-bullet {
  font-size: 14px; color: rgba(255,255,255,0.62);
  padding-left: 18px; position: relative; line-height: 1.55;
}
.tab-bullet::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--yellow); font-size: 12px; top: 2px;
}

/* ── CTA Section ── */
.landing-cta-section {
  text-align: center;
  padding: 40px 32px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
}
.landing-quote {
  font-family: 'Playfair Display', serif;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 400; font-style: italic;
  color: rgba(255,255,255,0.8); line-height: 1.6;
  margin-bottom: 12px; position: relative;
}
.quote-mark {
  font-size: 48px; color: var(--yellow);
  position: absolute; top: -16px; left: -8px;
  font-style: normal; opacity: 0.6; line-height: 1;
}
.quote-author {
  display: block; font-size: 12px; font-weight: 600;
  letter-spacing: 1px; color: var(--yellow);
  font-style: normal; margin-top: 10px;
  text-transform: uppercase;
}
.cta-sub {
  font-size: 15px; color: rgba(255,255,255,0.5);
  margin: 24px 0 28px; line-height: 1.6;
}
.btn-cta {
  background: var(--yellow);
  color: var(--on-yellow);
  font-family: 'Inter', sans-serif;
  font-size: 17px; font-weight: 700;
  padding: 18px 52px; border-radius: 100px;
  border: none; cursor: pointer;
  box-shadow: 0 8px 40px rgba(235,188,1,0.35);
  transition: all 0.2s var(--ease);
  letter-spacing: 0.2px; display: inline-block;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 50px rgba(235,188,1,0.45);
  background: var(--yellow-light);
}
.btn-cta:active { transform: translateY(0); }
.cta-meta {
  font-size: 12px; color: rgba(255,255,255,0.3);
  margin-top: 16px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   INFO SCREEN
══════════════════════════════════════════════════════════════════════════════ */
#screen-info {
  background: var(--dark); align-items: center; justify-content: center;
  padding: 40px 24px;
}
.info-outer {
  width: 100%; display: flex; align-items: center; justify-content: center;
  flex: 1;
}
.info-card {
  max-width: 480px; width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
}
.info-header { margin-bottom: 36px; }
.info-step-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 10px;
}
.info-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700;
  color: white; margin-bottom: 6px;
}
.info-header p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.6; }

.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.5); margin-bottom: 8px; letter-spacing: 0.3px;
  text-transform: uppercase;
}
.form-input {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); font-size: 15px;
  font-family: 'Inter', sans-serif; color: white;
  outline: none; transition: all 0.2s var(--ease);
}
.form-input::placeholder { color: rgba(255,255,255,0.25); }
.form-input:focus { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(235,188,1,0.12); background: rgba(255,255,255,0.1); }
.form-error { font-size: 12px; color: #FF8A8A; margin-top: 6px; min-height: 16px; }
.form-hint { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 6px; }

.team-code-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: rgba(235,188,1,0.1);
  border: 1px solid rgba(235,188,1,0.25);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  color: var(--yellow); letter-spacing: 1px;
}

.btn-info-submit {
  width: 100%; padding: 15px;
  background: var(--yellow); color: var(--on-yellow);
  font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 700;
  border: none; border-radius: 100px; cursor: pointer;
  transition: all 0.2s var(--ease); margin-top: 8px;
}
.btn-info-submit:hover { background: var(--yellow-light); transform: translateY(-1px); }

/* Optional label */
.form-optional {
  font-size: 10px; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: rgba(255,255,255,0.3);
  margin-left: 4px;
}

/* Important note callout */
.info-note-box {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 24px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
}
.note-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.note-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 5px;
}
.note-text {
  font-size: 14px; font-weight: 500;
  color: #FFFFFF; line-height: 1.6;
}

/* ── GLOBAL FOOTER ───────────────────────────────────────────────────────────── */
.global-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  padding: 8px 16px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  font-size: 11px; color: rgba(255,255,255,0.3);
  border-top: 1px solid rgba(255,255,255,0.06);
  pointer-events: none; /* don't block clicks except the link */
}
.global-footer strong { color: rgba(255,255,255,0.45); font-weight: 600; }
.footer-link {
  color: rgba(255,255,255,0.4); text-decoration: none;
  pointer-events: auto;
}
.footer-link:hover { color: var(--yellow); text-decoration: underline; }


/* ══════════════════════════════════════════════════════════════════════════════
   TEST INTRO (chapter break between tests)
══════════════════════════════════════════════════════════════════════════════ */
#screen-test-intro {
  background: var(--dark);
  align-items: center; justify-content: center;
  padding: 40px 24px;
  position: relative; overflow: hidden;
}
#screen-test-intro::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 50% at 50% 0%, rgba(235,188,1,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.chapter-card {
  max-width: 540px; width: 100%; position: relative; z-index: 1;
  text-align: center;
}
.chapter-num {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 24px; display: block;
}
.chapter-icon { font-size: 56px; margin-bottom: 20px; display: block; }
.chapter-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 700; color: white; margin-bottom: 8px; line-height: 1.25;
}
.chapter-code {
  font-size: 13px; color: rgba(255,255,255,0.35);
  margin-bottom: 32px; font-weight: 500;
}
.chapter-sections {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: 40px; text-align: left;
}
.chapter-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 18px 22px;
}
.chapter-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 8px;
}
.chapter-section p {
  font-size: 15px; color: rgba(255,255,255,0.7); line-height: 1.7;
}
.btn-chapter-start {
  background: var(--yellow); color: var(--on-yellow);
  font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 700;
  padding: 16px 48px; border-radius: 100px;
  border: none; cursor: pointer;
  box-shadow: 0 6px 30px rgba(235,188,1,0.3);
  transition: all 0.2s var(--ease);
}
.btn-chapter-start:hover {
  background: var(--yellow-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(235,188,1,0.4);
}

/* ══════════════════════════════════════════════════════════════════════════════
   TEST SCREEN — TYPEFORM STYLE (dark theme)
══════════════════════════════════════════════════════════════════════════════ */
#screen-test {
  background: var(--dark);
  /* display controlled by .screen / .screen.active — do NOT set display here */
}

/* Top meta bar */
.test-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
}
.test-meta-left {
  display: flex; align-items: center; gap: 8px;
}
.meta-icon { font-size: 16px; }
.meta-test-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.55); }
.meta-progress {
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.3);
}
.meta-pct {
  display: inline-block;
  background: rgba(235,188,1,0.15); color: var(--yellow);
  font-size: 11px; font-weight: 700; padding: 2px 10px;
  border-radius: 100px;
}

/* In-test progress bar (below meta) */
.test-progress-track {
  height: 3px; background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.test-progress-fill {
  height: 100%;
  background: var(--yellow);
  transition: width 0.5s var(--ease);
  box-shadow: 0 0 6px rgba(235,188,1,0.4);
}

/* Question area — vertically centered, fills remaining height */
.question-area {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 48px 40px;
  overflow-y: auto;
}
.question-content {
  max-width: 620px; width: 100%;
}

/* Slide animations */
@keyframes qIn {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes qOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-36px); }
}
.q-animate-in  { animation: qIn  0.38s var(--ease) both; }
.q-animate-out { animation: qOut 0.26s var(--ease) both; }

/* Question number label (Typeform style "3 →") */
.q-prefix {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--yellow);
  margin-bottom: 16px;
}
.q-prefix-num { font-size: 14px; }
.q-prefix-arrow { font-size: 12px; opacity: 0.7; }

/* Question text — white on dark */
.q-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 600; color: #FFFFFF;
  line-height: 1.45; margin-bottom: 36px;
}

/* Instruction — below scale, readable hint */
.q-instruction {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 22px;
  line-height: 1.6;
  font-style: italic;
  text-align: center;
  padding: 0 8px;
}

/* Scale */
.scale-wrap { margin-bottom: 0; width: 100%; }
.scale-buttons {
  display: flex;
  justify-content: space-between; /* spread evenly so labels align perfectly */
  width: 100%;
  margin-bottom: 10px;
}
.scale-btn {
  width: 52px; height: 52px; padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  font-size: 17px; font-weight: 600;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  font-family: 'Inter', sans-serif;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.scale-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(235,188,1,0.1);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 16px rgba(235,188,1,0.2);
}
.scale-btn.selected {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--on-yellow);
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 24px rgba(235,188,1,0.4);
}

/* Smaller buttons for 7-scale */
.scale-btn.sm {
  width: 44px; height: 44px; font-size: 15px;
}

/* Scale labels — align to first and last button edges */
.scale-labels-row {
  display: flex; justify-content: space-between;
  width: 100%;
}
.scale-label {
  font-size: 11px; color: rgba(255,255,255,0.3);
  max-width: 130px; line-height: 1.3;
}
.scale-label:last-child { text-align: right; }

/* Bottom bar */
.test-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px 46px; /* 46px = 18px + 28px footer */
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--dark);
  flex-shrink: 0;
}
.btn-back-subtle {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.3);
  background: none; border: none; cursor: pointer;
  padding: 8px 4px; transition: color 0.15s;
}
.btn-back-subtle:hover { color: rgba(255,255,255,0.6); }
.btn-back-subtle.hidden { visibility: hidden; }
.press-hint {
  font-size: 12px; color: rgba(255,255,255,0.25);
  display: flex; align-items: center; gap: 6px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CALCULATING
══════════════════════════════════════════════════════════════════════════════ */
#screen-calculating {
  background: var(--dark);
  align-items: center; justify-content: center;
}
.calc-wrap { text-align: center; }
.calc-ring {
  width: 64px; height: 64px;
  border: 3px solid rgba(235,188,1,0.2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.calc-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: white; margin-bottom: 8px;
}
.calc-sub { font-size: 13px; color: rgba(255,255,255,0.45); }

/* ══════════════════════════════════════════════════════════════════════════════
   RESULTS
══════════════════════════════════════════════════════════════════════════════ */
#screen-results {
  background: var(--bg-warm);
  flex-direction: column;
}

/* Results header */
.results-hero {
  background: var(--dark);
  padding: 60px 24px 80px;
  text-align: center; position: relative; overflow: hidden;
}
.results-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(235,188,1,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.results-hero::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 60px; background: var(--bg-warm);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.results-hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.results-congrats {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 16px;
}
.results-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700; color: white;
  line-height: 1.3; margin-bottom: 8px;
}
.results-meta { font-size: 13px; color: rgba(255,255,255,0.45); margin-bottom: 28px; }
.results-badge-row {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.r-badge {
  background: rgba(235,188,1,0.12);
  border: 1px solid rgba(235,188,1,0.25);
  color: var(--yellow); border-radius: 100px;
  padding: 5px 14px; font-size: 12px; font-weight: 600;
}

/* Results cards */
.results-body { max-width: 760px; margin: 0 auto; padding: 32px 24px 80px; }

.r-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  animation: cardUp 0.4s var(--ease) both;
  text-align: left;
}
@keyframes cardUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.r-card:nth-child(1) { animation-delay: 0.05s; }
.r-card:nth-child(2) { animation-delay: 0.1s; }
.r-card:nth-child(3) { animation-delay: 0.15s; }
.r-card:nth-child(4) { animation-delay: 0.2s; }
.r-card:nth-child(5) { animation-delay: 0.25s; }
.r-card:nth-child(6) { animation-delay: 0.3s; }
.r-card:nth-child(7) { animation-delay: 0.35s; }
.r-card:nth-child(8) { animation-delay: 0.4s; }
.r-card:nth-child(9) { animation-delay: 0.45s; }

.r-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--yellow-dark); margin-bottom: 4px;
}
.r-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--text); margin-bottom: 20px;
}

/* DISC type badge */
.disc-badge-row {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.disc-type-badge {
  background: var(--yellow-pale);
  border: 2px solid rgba(235,188,1,0.3);
  border-radius: var(--radius-sm); padding: 8px 20px;
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700; color: var(--yellow-dark);
}
.disc-type-name { font-size: 17px; font-weight: 700; color: var(--text); }
.disc-type-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* Bar charts */
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-item {}
.bar-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.bar-label { font-size: 13px; font-weight: 500; color: var(--text); }
.bar-score { font-size: 13px; font-weight: 700; color: var(--yellow-dark); }
.bar-track {
  height: 8px; background: var(--border); border-radius: 100px; overflow: hidden;
}
.bar-fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--yellow-dark), var(--yellow));
  transition: width 1s var(--ease);
}

/* Description */
.r-desc {
  font-size: 14px; line-height: 1.8; color: var(--text-2);
}
.r-desc p { margin-bottom: 12px; }
.r-desc p:last-child { margin-bottom: 0; }

/* In practice list */
.r-subhead {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  margin: 20px 0 10px;
}
.bullet-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.bullet-item {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.bullet-item::before {
  content: '→'; color: var(--yellow-dark); font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}

/* VIA ranking */
.strength-list { display: flex; flex-direction: column; gap: 12px; }
.strength-item {
  display: flex; gap: 16px; align-items: center;
  padding: 16px; background: var(--bg-warm);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.strength-num {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: var(--yellow);
  flex-shrink: 0; line-height: 1; min-width: 28px;
}
.strength-num.top1 { color: var(--yellow-dark); }
.strength-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.strength-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* Big 5 radar */
.radar-wrap { display: flex; justify-content: center; margin-bottom: 24px; }
#radarChart { max-width: 300px; max-height: 300px; }

/* Big 5 dim list */
.big5-list { display: flex; flex-direction: column; gap: 16px; }
.big5-item {}
.big5-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.big5-label { font-size: 14px; font-weight: 600; color: var(--text); }
.big5-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-top: 6px; }

/* EI total */
.ei-total {
  text-align: center; padding: 20px;
  background: var(--yellow-pale);
  border: 1px solid rgba(235,188,1,0.25);
  border-radius: var(--radius-sm); margin-bottom: 20px;
}
.ei-num {
  font-family: 'Playfair Display', serif;
  font-size: 48px; font-weight: 700; color: var(--yellow-dark); line-height: 1;
}
.ei-num-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Stress */
.stress-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px; border-radius: 100px;
  font-size: 15px; font-weight: 700; margin-bottom: 14px;
}
.mindset-block {
  display: flex; gap: 16px; align-items: center; justify-content: center;
  padding: 18px; background: var(--bg-warm);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 14px;
  text-align: center;
}
.mindset-ico { font-size: 36px; }
.mindset-name { font-size: 17px; font-weight: 700; color: var(--text); }
.mindset-pct { font-size: 12px; color: var(--text-muted); }

/* Dev plan */
.skill-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.skill-card {
  display: flex; gap: 14px; padding: 16px;
  background: var(--bg-warm);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  align-items: center;
}
.skill-num {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700; color: var(--yellow);
  flex-shrink: 0; min-width: 24px;
}
.skill-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.skill-reason { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.skill-action {
  font-size: 13px; color: var(--text-2); line-height: 1.5;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.habit-list { display: flex; flex-direction: column; gap: 10px; }
.habit-item {
  padding: 14px 16px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--yellow);
}
.habit-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.habit-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; }

/* Comm guide */
.comm-style-box {
  padding: 18px; background: var(--yellow-pale);
  border: 1px solid rgba(235,188,1,0.25);
  border-radius: var(--radius-sm); margin-bottom: 24px;
  font-size: 14px; line-height: 1.7; color: var(--text-2);
}
.comm-with-list { display: flex; flex-direction: column; gap: 14px; }
.comm-item {
  padding: 16px; background: var(--bg-warm);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.comm-type { font-size: 14px; font-weight: 700; color: var(--yellow-dark); margin-bottom: 10px; }
.comm-tips { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.comm-tip {
  font-size: 13px; color: var(--text-2); padding-left: 18px;
  position: relative; line-height: 1.5;
}
.comm-tip::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-size: 11px; top: 2px; }
.comm-avoid { font-size: 12px; color: var(--danger); font-style: italic; }
.recognize-box {
  padding: 16px; background: var(--bg-warm);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-2); line-height: 1.6;
  margin-top: 20px;
}

/* AI Prompt */
.prompt-box {
  background: var(--dark); border-radius: var(--radius-sm);
  padding: 24px; overflow: hidden;
}
.prompt-text {
  font-family: 'Courier New', monospace;
  font-size: 12px; line-height: 1.7;
  color: rgba(255,255,255,0.8); white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px; overflow-y: auto;
}
.prompt-text::-webkit-scrollbar { width: 4px; }
.prompt-text::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.prompt-text::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
/* AI Prompt — actual classes used in HTML */
.ai-prompt-card {}
.ai-prompt-box {
  background: var(--dark); border-radius: var(--radius-sm);
  padding: 20px 24px; overflow: hidden;
  font-family: 'Courier New', monospace;
  font-size: 12px; line-height: 1.7;
  color: rgba(255,255,255,0.8); white-space: pre-wrap;
  word-break: break-word; overflow-wrap: anywhere;
  max-height: 300px; overflow-y: auto;
  margin-bottom: 14px;
}
.ai-prompt-box::-webkit-scrollbar { width: 4px; }
.ai-prompt-box::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.ai-prompt-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.btn-copy-prompt {
  display: block; width: 100%;
  padding: 13px 24px;
  background: var(--yellow); color: var(--on-yellow);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: center;
  -webkit-appearance: none;
}
.btn-copy-prompt:hover { background: var(--yellow-light); }
.btn-copy-prompt.copied { background: var(--success); color: white; }

/* Scale note (thang điểm hint) */
.scale-note {
  font-size: 11px; color: rgba(255,255,255,0.25);
  text-align: center; margin-top: 10px;
  font-style: italic; line-height: 1.4;
}

/* VIA strength application bullets */
.strength-apply {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--border);
}
.strength-apply-item {
  font-size: 12px; color: var(--text-2);
  padding-left: 16px; position: relative; line-height: 1.5;
}
.strength-apply-item::before {
  content: '•'; position: absolute; left: 4px;
  color: var(--yellow-dark); font-weight: 700;
}

/* Skill step list */
.skill-steps {
  list-style: none; display: flex; flex-direction: column; gap: 4px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border-dark);
}
.skill-step {
  font-size: 12px; color: var(--text-2);
  padding-left: 18px; position: relative; line-height: 1.5;
}
.skill-step::before {
  content: '→'; position: absolute; left: 0;
  color: var(--yellow-dark); font-weight: 700; font-size: 11px; top: 1px;
}

/* Divider */
.r-divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ══════════════════════════════════════════════════════════════════════════════
   CELEBRATION SCREEN (between sessions)
══════════════════════════════════════════════════════════════════════════════ */
#screen-celebration {
  background: var(--dark);
  align-items: center; justify-content: center;
  padding: 48px 24px;
  position: relative; overflow: hidden;
}
#screen-celebration::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(235,188,1,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.celebration-wrap {
  position: relative; z-index: 1;
  max-width: 520px; width: 100%;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 0;
}
.celebration-emoji {
  font-size: 72px; margin-bottom: 16px;
  animation: celebPop 0.5s var(--ease) both;
}
@keyframes celebPop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.celebration-progress {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 12px;
  animation: celFadeUp 0.5s 0.1s var(--ease) both;
}
.celebration-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700; color: white;
  margin-bottom: 8px; line-height: 1.2;
  animation: celFadeUp 0.5s 0.15s var(--ease) both;
}
.celebration-sub {
  font-size: 15px; color: rgba(255,255,255,0.5);
  margin-bottom: 36px; line-height: 1.6;
  animation: celFadeUp 0.5s 0.2s var(--ease) both;
}
@keyframes celFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.celebration-quote-box {
  background: rgba(235,188,1,0.06);
  border: 1px solid rgba(235,188,1,0.2);
  border-radius: var(--radius-md);
  padding: 28px 32px; margin-bottom: 40px;
  animation: celFadeUp 0.5s 0.25s var(--ease) both;
}
.cel-quote-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(15px, 2.5vw, 18px);
  font-style: italic; font-weight: 400;
  color: rgba(255,255,255,0.82); line-height: 1.7;
  margin-bottom: 14px;
}
.cel-quote-author {
  font-size: 12px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--yellow);
}
.btn-cel-continue {
  background: var(--yellow); color: var(--on-yellow);
  font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 700;
  padding: 16px 48px; border-radius: 100px;
  border: none; cursor: pointer;
  box-shadow: 0 6px 30px rgba(235,188,1,0.3);
  transition: all 0.2s var(--ease);
  animation: celFadeUp 0.5s 0.3s var(--ease) both;
  margin-bottom: 16px;
}
.btn-cel-continue:hover {
  background: var(--yellow-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(235,188,1,0.4);
}
.cel-next-hint {
  font-size: 12px; color: rgba(255,255,255,0.25);
  animation: celFadeUp 0.5s 0.35s var(--ease) both;
}

/* ── Email action section ─────────────────────────────────────────────────── */
.email-action-section {
  max-width: 800px; margin: 32px auto 0;
  padding: 0 24px;
}
.email-action-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  background: #1C1B18;
  border-radius: 16px;
  padding: 24px 28px;
}
.email-action-title {
  font-size: 16px; font-weight: 700; color: #FFFFFF;
  margin-bottom: 4px;
}
.email-action-sub {
  font-size: 13px; color: rgba(255,255,255,0.5);
}
.email-action-sub strong { color: rgba(255,255,255,0.75); }
.email-action-btns { display: flex; gap: 10px; flex-shrink: 0; }

.btn-send-email {
  padding: 12px 24px;
  background: var(--yellow); color: var(--on-yellow);
  border: none; border-radius: 100px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.2s var(--ease);
  font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.btn-send-email:hover:not(:disabled) {
  background: var(--yellow-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(235,188,1,0.35);
}
.btn-send-email:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-send-email.sent {
  background: #22C55E; color: white;
  pointer-events: none;
}

.btn-download-pdf {
  padding: 12px 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px; color: rgba(255,255,255,0.7);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s var(--ease);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.btn-download-pdf:hover:not(:disabled) {
  background: rgba(255,255,255,0.15);
  color: white;
}
.btn-download-pdf:disabled { opacity: 0.5; cursor: not-allowed; }

.email-status {
  text-align: center; margin-top: 12px;
  font-size: 13px; min-height: 20px;
}
.email-status.success { color: #22C55E; }
.email-status.error   { color: #EF4444; }

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.email-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(28,27,24,0.3);
  border-top-color: var(--on-yellow);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile first
══════════════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 900px) ── */
@media (max-width: 900px) {
  .landing-wrap { max-width: 100%; padding: 60px 28px 72px; }
  .tabs-nav { flex-wrap: wrap; gap: 8px; justify-content: center; }
  .tab-btn { border-radius: 50px; }

  /* Question screen — add side padding on tablet */
  .question-area { padding: 60px 44px 40px; }
}

/* ── Small tablet / large phone (≤ 768px) ── */
@media (max-width: 768px) {
  .landing-wrap { padding: 52px 20px 64px; gap: 48px; }
  .landing-title { font-size: clamp(30px, 8vw, 46px); }
  .landing-desc { font-size: 15px; }
  .landing-cta-section { padding: 32px 20px; }
  .landing-quote { font-size: 17px; }

  .tab-btn { font-size: 12px; padding: 8px 14px; }
  .tab-panel { padding: 22px; }
  .tab-section p { font-size: 14px; }
  .tab-bullet { font-size: 13px; }

  .info-card { padding: 36px 28px; }

  /* Question screen */
  .test-meta { padding: 12px 20px; }
  .question-area { padding: 40px 32px 28px; }
  .q-text { font-size: clamp(18px, 4vw, 24px); }
  .test-bottom { padding: 10px 20px 14px; }

  /* AI Prompt — mobile */
  .ai-prompt-box { font-size: 11px; padding: 16px; max-height: 220px; }

  /* Results */
  .results-hero { padding: 52px 20px 72px; }
  .results-body { padding: 24px 16px 64px; }
  .r-card { padding: 24px 20px; }
  .disc-badge-row { flex-direction: column; gap: 10px; }
  .disc-type-badge { font-size: 22px; align-self: flex-start; }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .landing-wrap { padding: 48px 16px 56px; gap: 40px; }
  .landing-title { font-size: 28px; }
  .landing-desc { font-size: 14px; line-height: 1.7; }
  .landing-tag { font-size: 10px; padding: 5px 12px; }
  .landing-cta-section { padding: 24px 16px; }
  .landing-quote { font-size: 16px; }
  .quote-mark { font-size: 36px; left: -2px; top: -10px; }
  .btn-cta { font-size: 15px; padding: 16px 36px; }
  .cta-meta { font-size: 11px; }

  .tab-btn { font-size: 11px; padding: 7px 12px; }
  .tab-panel { padding: 18px 14px; }
  .tab-test-name { font-size: 18px; }
  .tab-section p { font-size: 13px; }
  .tab-bullet { font-size: 12px; }

  .info-card { padding: 28px 18px; }
  .info-header h1 { font-size: 22px; }
  .info-step-label { font-size: 10px; }

  .chapter-card { padding: 0 8px; }
  .chapter-title { font-size: 22px; }
  .chapter-section p { font-size: 13px; }
  .btn-chapter-start { padding: 14px 36px; font-size: 15px; }

  .test-meta { padding: 10px 16px; }
  .meta-test-name { font-size: 12px; }
  /* Mobile question area — +20px padding each side */
  .question-area { padding: 32px 28px 20px; align-items: flex-start; padding-top: 40px; }
  .q-text { font-size: 18px; line-height: 1.45; }
  .q-instruction { font-size: 12px; margin-bottom: 28px; }
  .scale-buttons { gap: 7px; }
  .scale-btn { min-width: 44px; height: 44px; font-size: 15px; }
  .scale-btn.sm { min-width: 36px; height: 36px; font-size: 12px; }
  .scale-label { font-size: 10px; max-width: 100px; }
  .test-bottom { padding: 10px 16px 16px; }
  .press-hint { font-size: 11px; }

  /* AI Prompt — small mobile */
  .ai-prompt-box { font-size: 10.5px; padding: 14px; max-height: 200px; }
  .btn-copy-prompt { font-size: 13px; padding: 12px; }

  .celebration-wrap { padding: 0 8px; }
  .celebration-emoji { font-size: 56px; }
  .celebration-title { font-size: 28px; }
  .celebration-quote-box { padding: 20px; }
  .cel-quote-text { font-size: 14px; }
  .btn-cel-continue { padding: 14px 36px; }

  .results-hero { padding: 48px 16px 68px; }
  .results-headline { font-size: 20px; }
  .results-body { padding: 20px 12px 60px; }
  .r-card { padding: 20px 14px; border-radius: var(--radius-md); }
  .r-title { font-size: 19px; }
  .strength-item { flex-direction: row; }
  .ei-num { font-size: 40px; }
  .skill-card { flex-direction: row; }
  .results-badge-row { gap: 6px; }
  .r-badge { font-size: 11px; padding: 4px 10px; }
}

/* ── Very small (≤ 360px) ── */
@media (max-width: 360px) {
  .landing-title { font-size: 26px; }
  .tab-btn { font-size: 10px; padding: 6px 10px; }
  .scale-btn { min-width: 38px; height: 38px; font-size: 13px; }
  .scale-btn.sm { min-width: 32px; height: 32px; font-size: 11px; }
  .q-text { font-size: 16px; }
}
