/* ════════════════════════════════════════════════════════
   HOLLAND RIASEC — Test tính cách nghề nghiệp
   Styles tách riêng — không chứa CSS của trang khác
   ════════════════════════════════════════════════════════ */

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

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --pink: #ec4899;
  --bg-grad: linear-gradient(145deg, #e8eeff 0%, #dde8ff 20%, #e5deff 50%, #d6e9ff 80%, #e0f0ff 100%);
  --shadow-sm: 0 4px 12px rgba(99,102,241,0.08);
  --shadow-md: 0 10px 32px rgba(99,102,241,0.15);
  --shadow-lg: 0 24px 60px rgba(99,102,241,0.22);
  --text: #1a1a3e;
  --text-mid: #3a3a6e;
  --text-soft: #6b7aaa;
  --radius-lg: 28px;
  --radius-md: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  background: var(--bg-grad);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

#bg-layer {
  position: fixed; inset: 0; z-index: -1;
  background: var(--bg-grad);
  pointer-events: none;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* === NAVBAR === */
.bw-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(99,102,241,0.10);
  padding: 14px 24px;
}
.bw-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bw-logo {
  font-family: 'Quicksand', sans-serif;
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.bw-nav-links { display: flex; gap: 8px; align-items: center; }
.bw-nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all .2s;
}
.bw-nav-links a:hover { background: rgba(99,102,241,0.10); color: var(--primary); }
.bw-nav-links a.active { background: rgba(99,102,241,0.14); color: var(--primary); }

/* === HERO === */
.bw-hero { padding: 64px 24px 32px; text-align: center; }
.bw-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,102,241,0.10);
  border: 1px solid rgba(99,102,241,0.22);
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.bw-hero h1 {
  font-family: 'Quicksand', sans-serif;
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.bw-hero h1 .grad {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bw-hero .lede {
  font-size: 17px;
  color: var(--text-mid);
  max-width: 620px;
  margin: 0 auto 24px;
  line-height: 1.65;
}
.bw-hero .meta {
  display: inline-flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-soft);
  flex-wrap: wrap;
  justify-content: center;
}
.bw-hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.bw-hero .meta span::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

/* === 6 NHÓM HOLLAND INTRO === */
.import-section { padding: 8px 24px 28px; scroll-margin-top: 88px; }
.holland-start-card {
  max-width: 960px; margin: 0 auto 16px; padding: 28px 36px 24px;
  border: 1.5px solid rgba(99,102,241,.2); border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(247,242,255,.9));
  box-shadow: var(--shadow-sm); text-align: center;
}
.holland-start-card h2 { display:flex; align-items:center; justify-content:center; gap:10px; font-family:'Quicksand',sans-serif; font-size:30px; line-height:1.3; }
.holland-start-card h2 img { width:34px; height:34px; object-fit:contain; }
.holland-start-card > p { max-width:780px; margin:12px auto 22px; color:var(--text-mid); font-size:16px; line-height:1.7; }
.holland-start-groups { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-bottom:22px; }
.holland-start-groups a { display:flex; flex-direction:column; gap:5px; padding:14px 6px; border:1px solid #e1daff; border-radius:14px; background:#fff; color:var(--text-mid); text-decoration:none; font-size:13px; transition:all .2s; }
.holland-start-groups a:hover { background:#f8f5ff; border-color:#9c83ec; transform:translateY(-2px); }
.holland-start-groups strong { color:#7453d6; font:800 25px 'Quicksand',sans-serif; }
.holland-start-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; }
.holland-start-actions .quiz-btn { padding:13px 26px; }
.import-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 24px;
  border: 1.5px solid rgba(99,102,241,0.24);
  border-radius: 20px;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow-sm);
}
.import-card summary {
  cursor: pointer;
  font-family: 'Quicksand', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.import-card summary span { display: block; margin: 3px 0 0 24px; font-family: 'Be Vietnam Pro', sans-serif; font-size: 13px; font-weight: 500; color: var(--text-mid); }
.import-form { padding-top: 20px; }
.import-form label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.import-form-row { display: flex; gap: 10px; align-items: stretch; }
.import-form input {
  min-width: 0;
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: 700 18px 'Quicksand', sans-serif;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.import-form input:focus { outline: 3px solid rgba(99,102,241,.2); border-color: var(--primary); }
.import-form input[aria-invalid="true"] { border-color: #dc2626; }
.import-hint { margin-top: 10px; font-size: 13px; color: var(--text-mid); }
.import-error { margin-top: 8px; font-size: 13px; font-weight: 700; color: #b91c1c; }
.import-error[hidden] { display: none; }
.types-intro { padding: 32px 24px 48px; }
.types-intro h2 {
  font-family: 'Quicksand', sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  text-align: center;
  margin: 0 0 12px;
}
.types-intro .sub {
  text-align: center;
  color: var(--text-mid);
  font-size: 15px;
  margin: 0 auto 28px;
  max-width: 600px;
}
.types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.type-card {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,0.9);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  transition: all .25s ease;
}
.type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99,102,241,0.30);
}
.type-card .emoji { font-size: 36px; margin-bottom: 8px; display: block; }
.type-card h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}
.type-card .code {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-soft);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.type-card p { font-size: 13px; color: var(--text-mid); line-height: 1.55; margin: 0; }

/* === QUIZ SECTION === */
.quiz-section { padding: 24px 24px 40px; }
.quiz-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255,255,255,0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 32px 36px;
  max-width: 760px;
  margin: 0 auto;
}
.quiz-progress-wrap { margin-bottom: 24px; }
.quiz-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 8px;
  gap: 12px;
}
.quiz-progress-pct {
  font-family: 'Quicksand', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
/* === TIMER === */
.q-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-mid);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(99,102,241,0.08);
  transition: all .3s;
}
.q-timer.warning { background: rgba(245,158,11,0.15); color: #b45309; }
.q-timer.danger { background: rgba(239,68,68,0.18); color: #b91c1c; animation: pulse 1s ease infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.quiz-progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8, #ec4899);
  border-radius: 999px;
  transition: width .5s cubic-bezier(.22,1,.36,1);
  width: 0%;
}

/* === Question cards (multi-per-page) === */
.q-list { display: flex; flex-direction: column; gap: 24px; }
.q-card {
  padding: 20px;
  background: rgba(99,102,241,0.03);
  border: 1.5px solid rgba(99,102,241,0.08);
  border-radius: 16px;
  transition: all .2s;
}
.q-card:hover { border-color: rgba(99,102,241,0.20); background: rgba(99,102,241,0.05); }
.q-card.answered { border-color: rgba(16,185,129,0.30); background: rgba(16,185,129,0.04); }

.q-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.q-type-badge {
  display: inline-block;
  background: rgba(99,102,241,0.10);
  border: 1px solid rgba(99,102,241,0.22);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.q-text {
  font-family: 'Quicksand', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin: 0 0 18px;
}
.q-scale {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.q-scale-lbl {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 76px;
}
.q-scale-lbl.right { text-align: right; }
.q-scale-btns {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.q-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  color: #64748b;
  font-family: 'Quicksand', sans-serif;
  transition: all .2s cubic-bezier(.22,1,.36,1);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.q-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.08);
}
.q-btn.selected {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border-color: var(--primary);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(99,102,241,0.35);
}

/* === JUMP BAR === */
.jump-bar-wrap {
  max-width: 760px;
  margin: 20px auto 0;
}
.jump-bar-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.jump-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.jump-btn {
  padding: 8px 14px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.jump-btn:hover { border-color: var(--primary); color: var(--primary); }
.jump-btn.done { background: rgba(16,185,129,0.10); border-color: rgba(16,185,129,0.35); color: #047857; }
.jump-btn.current { background: #6154cf; border-color: #6154cf; color: #fff; }

/* === NAV BUTTONS === */
.quiz-nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
}
.quiz-btn {
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  font-family: inherit;
  transition: all .25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.quiz-btn-primary {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(99,102,241,0.32);
}
.quiz-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(99,102,241,0.40); }
.quiz-btn-secondary { background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0; }
.quiz-btn-secondary:hover { background: #e2e8f0; }
.quiz-btn-finish {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #fff;
  box-shadow: 0 8px 20px rgba(236,72,153,0.32);
}
.quiz-btn-finish:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(236,72,153,0.40); }
.quiz-btn:disabled { opacity: .35; cursor: not-allowed; transform: none !important; }

/* === RESULT === */
.result-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 32px;
  max-width: 760px;
  margin: 0 auto;
  display: none;
  animation: slideIn .5s cubic-bezier(.22,1,.36,1);
}
.result-card.show { display: block; }
.result-top {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(99,102,241,0.10);
}
.result-emoji {
  font-size: 64px;
  margin-bottom: 12px;
  display: block;
  animation: pop .6s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-type {
  font-family: 'Quicksand', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}
.result-code {
  display: inline-flex;
  gap: 8px;
  background: rgba(99,102,241,0.10);
  border: 1px solid rgba(99,102,241,0.20);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.result-desc {
  color: var(--text-mid);
  font-size: 16px;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}
.result-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 50px;
  align-items: center;
  gap: 12px;
}
.bar-lbl {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bar-track {
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 1s cubic-bezier(.22,1,.36,1);
}
.bar-val {
  font-family: 'Quicksand', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-mid);
  text-align: right;
}
.majors {
  background: linear-gradient(135deg, #f0f4ff, #fdf2f8);
  border: 1.5px solid rgba(99,102,241,0.12);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}
.majors h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
}
.majors-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.majors-tag {
  background: #fff;
  border: 1.5px solid rgba(99,102,241,0.18);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: all .2s;
}
.majors-tag:hover {
  border-color: var(--primary);
  background: rgba(99,102,241,0.08);
}
.majors-tag:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === TOAST === */
.bw-toast {
  position: fixed;
  top: 80px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #ef4444, #f43f5e);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 12px 28px rgba(239,68,68,0.35);
  opacity: 0;
  transition: all .3s;
  z-index: 1000;
  pointer-events: none;
}
.bw-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === FOOTER === */
.bw-footer {
  background: rgba(26,26,62,0.92);
  color: #c7c9e0;
  padding: 32px 24px;
  text-align: center;
  margin-top: 60px;
}
.bw-footer .logo {
  font-family: 'Quicksand', sans-serif;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg,#a78bfa 0%,#c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.bw-footer p { margin: 4px 0; font-size: 13px; }
.bw-footer .small { font-size: 12px; color: #9ca3c8; margin-top: 12px; }

/* === RESPONSIVE === */
@media (max-width: 720px) {
  .holland-start-card { padding:22px 16px; border-radius:22px; }
  .holland-start-card h2 { font-size:22px; }
  .holland-start-card > p { font-size:14px; }
  .holland-start-groups { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .holland-start-actions .quiz-btn { width:auto; }
  .types-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .quiz-card { padding: 24px 18px 28px; border-radius: 22px; }
  .q-card { padding: 16px; }
  .q-text { font-size: 16px; }
  .q-btn { width: 44px; height: 44px; font-size: 14px; }
  .q-scale-lbl { min-width: 60px; font-size: 11px; }
  .bar-row { grid-template-columns: 90px 1fr 44px; }
  .bar-lbl { font-size: 12px; }
  .result-card { padding: 28px 20px; }
  .result-type { font-size: 22px; }
  .bw-nav-links a { padding: 6px 10px; font-size: 13px; }
  .jump-btn { padding: 7px 12px; font-size: 11px; }
}
@media (max-width: 460px) {
  .holland-start-actions .quiz-btn { width:100%; justify-content:center; }
  .q-scale { display:grid; grid-template-columns:1fr; gap:5px; }
  .q-scale-lbl { min-width:0; text-align:center; }
  .q-scale-lbl.right { text-align:center; }
  .q-scale-btns { order:2; width:100%; }
  .import-card { padding: 18px; }
  .import-form-row { flex-direction: column; }
  .types-grid { grid-template-columns: 1fr; }
  .quiz-nav { flex-direction: column-reverse; }
  .quiz-btn { width: 100%; justify-content: center; }
  .q-scale { gap: 6px; }
  .q-scale-btns { gap: 4px; }
  .q-btn { width: 40px; height: 40px; font-size: 13px; }
}
