/* ============================================================
   心灵探索 — Psychology Test Platform
   Aesthetic: Glassmorphism Edition — 匹配琉璃工具集设计系统
   ============================================================ */

/* ----- CSS VARIABLES ----- */
:root {
  /* 玻璃令牌 */
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-bg-card: rgba(255, 255, 255, 0.55);
  --glass-bg-hover: rgba(255, 255, 255, 0.75);
  --glass-bg-dark: rgba(60, 60, 90, 0.5);
  --glass-border: rgba(200, 200, 220, 0.5);
  --glass-border-light: rgba(200, 200, 220, 0.3);
  --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.06);
  --glass-shadow-hover: 0 16px 48px rgba(31, 38, 135, 0.12);
  --glass-shadow-lg: 0 20px 60px rgba(31, 38, 135, 0.1);
  --glass-blur: blur(24px) saturate(180%);
  --glass-blur-light: blur(12px) saturate(150%);

  /* 品牌色 */
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-glow: #818cf8;
  --primary-bg: rgba(99, 102, 241, 0.15);
  --accent: #f472b6;
  --accent-glow: #f9a8d4;

  /* 功能色（保留语义命名，映射到玻璃色系） */
  --accent-sage: #818cf8;
  --accent-sage-dark: #6366f1;
  --accent-sage-light: #a5b4fc;
  --accent-sage-bg: rgba(99, 102, 241, 0.18);
  --accent-terracotta: #f472b6;
  --accent-terracotta-light: #f9a8d4;
  --accent-amber: #fbbf24;
  --accent-amber-bg: rgba(251, 191, 36, 0.15);
  --accent-rose: #f472b6;
  --accent-rose-light: #f9a8d4;
  --accent-rose-bg: rgba(244, 114, 182, 0.15);
  --accent-slate: #94a3b8;
  --accent-slate-light: #cbd5e1;
  --accent-slate-bg: rgba(148, 163, 184, 0.15);

  /* 背景色 */
  --bg-primary: transparent;
  --bg-secondary: rgba(255, 255, 255, 0.35);
  --bg-card: rgba(255, 255, 255, 0.5);
  --bg-card-hover: rgba(255, 255, 255, 0.75);

  /* 文字 */
  --text-primary: #1e1b4b;
  --text-secondary: #4c4a6e;
  --text-muted: #8b8aa0;

  /* 边框 */
  --border: rgba(180, 180, 200, 0.4);
  --border-light: rgba(200, 200, 220, 0.25);

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(31, 38, 135, 0.05);
  --shadow-md: 0 4px 20px rgba(31, 38, 135, 0.07);
  --shadow-lg: 0 8px 40px rgba(31, 38, 135, 0.1);
  --shadow-glow-sage: 0 0 40px rgba(99, 102, 241, 0.12);

  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* 字体 */
  --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif;
  --font-body: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 过渡 */
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* 布局 */
  --max-width: 720px;
  --max-width-wide: 1100px;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --glass-bg: rgba(30, 30, 60, 0.5);
    --glass-bg-card: rgba(30, 30, 60, 0.55);
    --glass-bg-hover: rgba(30, 30, 60, 0.75);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-light: rgba(255, 255, 255, 0.07);
    --text-primary: #e8e8f0;
    --text-secondary: #b0b0c8;
    --text-muted: #7c7aa0;
  }
}

/* ===== 全局动画 ===== */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 100% 0%; }
  50%  { background-position: 100% 100%; }
  75%  { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #e0e7ff, #ede9fe, #fce7f3, #ede9fe, #e0e7ff);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

/* ===== 返回导航按钮 ===== */
.back-home {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 9000;
  padding: 8px 18px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.35s ease;
  font-weight: 500;
}
.back-home:hover {
  background: var(--glass-bg-hover);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

/* ===== BACKGROUND BLOBS ===== */
.bg-blobs {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.bg-blob {
  position: absolute;
  border-radius: 60% 40% 55% 45% / 55% 45% 55% 45%;
  filter: blur(100px);
  opacity: 0.12;
}
.bg-blob--1 { width: 600px; height: 600px; background: #818cf8; top: -200px; right: -150px; animation: blobFloat1 18s ease-in-out infinite; }
.bg-blob--2 { width: 500px; height: 500px; background: #a78bfa; bottom: -150px; left: -100px; animation: blobFloat2 22s ease-in-out infinite; }
.bg-blob--3 { width: 400px; height: 400px; background: #f472b6; top: 50%; left: 40%; animation: blobFloat3 20s ease-in-out infinite; }
.bg-blob--4 { width: 350px; height: 350px; background: #fbbf24; top: 30%; right: 20%; animation: blobFloat1 24s ease-in-out infinite reverse; }

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(40px, -30px) rotate(4deg) scale(1.06); }
  50% { transform: translate(-15px, -50px) rotate(-3deg) scale(0.94); }
  75% { transform: translate(-35px, -10px) rotate(2deg) scale(1.03); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(-30px, 25px) rotate(-5deg) scale(1.04); }
  50% { transform: translate(20px, 40px) rotate(3deg) scale(0.96); }
  75% { transform: translate(35px, -5px) rotate(-2deg) scale(1.05); }
}
@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(25px, -35px) rotate(3deg) scale(1.05); }
  66% { transform: translate(-30px, 20px) rotate(-4deg) scale(0.95); }
}

/* ===== TYPOGRAPHY ===== */
.display-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.3;
}
.text-body { font-size: 1rem; color: var(--text-secondary); line-height: 1.75; }
.text-small { font-size: 0.875rem; color: var(--text-muted); }

/* ===== NAVIGATION ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 24px;
  background: var(--glass-bg-dark);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border-light);
}
.nav__left { display: flex; align-items: center; }
.nav__right { display: flex; align-items: center; justify-content: flex-end; }
.nav__back {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__back:hover { color: var(--primary-glow); }
.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: 0.04em;
}

/* ===== Language Switcher ===== */
.lang-switcher { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.lang-switcher__btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  line-height: 1.4;
}
.lang-switcher__btn:hover {
  border-color: var(--primary-glow);
  color: #fff;
  background: var(--primary-bg);
}
.lang-switcher__btn--active {
  background: rgba(99,102,241,0.65);
  backdrop-filter: blur(8px);
  color: #fff;
  border-color: rgba(129,140,248,0.5);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(99,102,241,0.3);
}
.lang-switcher__btn--active:hover {
  background: var(--accent-sage-dark);
  color: #fff;
}

/* ===== LAYOUT ===== */
.page-container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.page-container--narrow { max-width: var(--max-width); }

/* ===== HERO (Index) ===== */
.hero {
  text-align: center;
  padding: 60px 24px 40px;
  position: relative;
}
.hero__decoration {
  display: inline-block;
  font-size: 3rem;
  margin-bottom: 12px;
  animation: gentlePulse 3s ease-in-out infinite;
}
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.15;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 30%, #f9a8d4 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}
.hero__divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-glow), var(--accent));
  border-radius: var(--radius-full);
  margin: 24px auto 0;
  opacity: 0.6;
}

/* ===== TEST CARDS (Index) ===== */
.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 0 24px;
  max-width: var(--max-width-wide);
  margin: 0 auto;
}
.test-card {
  position: relative;
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--glass-shadow);
}
.test-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-glow), var(--accent));
  opacity: 0;
  transition: opacity var(--transition-smooth);
}
.test-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glass-shadow-hover);
  background: var(--glass-bg-hover);
  border-color: rgba(255,255,255,0.3);
}
.test-card:hover::before { opacity: 1; }
.test-card__icon { font-size: 2.5rem; line-height: 1; }
.test-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary);
}
.test-card__desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }
.test-card__meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 8px;
}
.test-card--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
.test-card--disabled:hover {
  transform: none;
  box-shadow: var(--glass-shadow);
  background: var(--glass-bg-card);
  border-color: var(--glass-border);
}
.test-card--disabled:hover::before { opacity: 0; }
.test-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--glass-border-light);
  margin-top: 40px;
}
.footer__disclaimer {
  max-width: 500px;
  margin: 8px auto 0;
  line-height: 1.6;
  font-size: 0.75rem;
}

/* ============================================================
   QUIZ ENGINE STYLES
   ============================================================ */

/* ----- Quiz Container ----- */
.quiz-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ----- Intro Screen ----- */
.quiz-intro {
  text-align: center;
  padding: 40px 0;
  animation: fadeInUp 0.6s ease-out;
}
.quiz-intro__icon { font-size: 3.5rem; margin-bottom: 16px; display: block; }
.quiz-intro__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 8px;
  line-height: 1.2;
  color: var(--text-primary);
}
.quiz-intro__subtitle { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 28px; }
.quiz-intro__info {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.quiz-intro__info span { display: flex; align-items: center; gap: 6px; }
.quiz-intro__desc {
  max-width: 480px;
  margin: 0 auto 32px;
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 0.95rem;
}
.quiz-intro__instructions {
  text-align: left;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  max-width: 480px;
  margin: 0 auto 32px;
}
.quiz-intro__instructions h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.quiz-intro__instructions p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ----- Progress Bar ----- */
.quiz-progress { margin-bottom: 32px; animation: fadeInUp 0.4s ease-out; }
.quiz-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.quiz-progress__text { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.quiz-progress__percent { font-size: 0.85rem; color: var(--primary-glow); font-weight: 600; }
.quiz-progress__track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.quiz-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-glow));
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px rgba(99,102,241,0.5);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Question Card ----- */
.quiz-question { animation: fadeInUp 0.45s ease-out; }
.quiz-question__card {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-smooth);
}
.quiz-question__number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--primary-glow);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.quiz-question__text {
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 500;
}

/* ----- Option Buttons ----- */
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.quiz-option {
  width: 100%;
  padding: 16px 22px;
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiz-option::before {
  content: '';
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  transition: all 0.25s ease;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.quiz-option:hover {
  border-color: var(--primary-glow);
  background: rgba(99,102,241,0.15);
  transform: translateX(4px);
  box-shadow: 0 0 20px rgba(99,102,241,0.15);
}
.quiz-option:hover::before { border-color: var(--primary-glow); }
.quiz-option--selected {
  border-color: rgba(129,140,248,0.6);
  background: rgba(99,102,241,0.5);
  backdrop-filter: blur(12px);
  color: #fff;
  font-weight: 600;
  transform: translateX(6px);
  box-shadow: 0 0 24px rgba(99,102,241,0.35);
}
.quiz-option--selected::before {
  border-color: #fff;
  background: #fff;
  box-shadow: inset 0 0 0 4px var(--primary);
}

/* ----- Question Navigation ----- */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.quiz-nav__dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.quiz-nav__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all var(--transition-smooth);
  cursor: pointer;
}
.quiz-nav__dot--answered { background: var(--primary-glow); box-shadow: 0 0 6px rgba(99,102,241,0.5); }
.quiz-nav__dot--current { background: #fff; width: 24px; border-radius: 4px; box-shadow: 0 0 10px rgba(255,255,255,0.4); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-smooth);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.btn--primary {
  background: rgba(99,102,241,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  border: 1px solid rgba(129,140,248,0.35);
  box-shadow: 0 0 20px rgba(99,102,241,0.25);
}
.btn--primary:hover {
  background: rgba(99,102,241,0.9);
  box-shadow: 0 0 28px rgba(99,102,241,0.5);
  transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0) scale(0.97); }
.btn--ghost {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  border: 1.5px solid var(--glass-border);
}
.btn--ghost:hover {
  border-color: var(--primary-glow);
  color: #fff;
  background: rgba(99,102,241,0.15);
  transform: translateY(-2px);
}
.btn--large { padding: 18px 40px; font-size: 1.05rem; }
.btn--outline {
  background: transparent;
  border: 2px solid var(--primary-glow);
  color: var(--primary-glow);
  backdrop-filter: blur(8px);
}
.btn--outline:hover {
  background: rgba(99,102,241,0.6);
  color: #fff;
  box-shadow: 0 0 20px rgba(99,102,241,0.3);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ============================================================
   RESULTS PAGE
   ============================================================ */

/* ----- Result Type Badge ----- */
.result-type {
  text-align: center;
  padding: 20px 0 28px;
  animation: resultReveal 0.7s ease-out;
}
@keyframes resultReveal {
  0% { opacity: 0; transform: scale(0.9); }
  60% { opacity: 1; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
.result-type__icon { font-size: 4rem; display: block; margin-bottom: 12px; animation: gentlePulse 3s ease-in-out infinite; }
.result-type__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 8px;
  line-height: 1.2;
  color: var(--text-primary);
}
.result-type__summary { font-size: 1.05rem; color: var(--text-secondary); max-width: 400px; margin: 0 auto; }

/* ----- Score Bars ----- */
.result-scores {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
  animation: fadeInUp 0.5s ease-out 0.15s both;
}
.result-scores__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #fff;
}
.score-bar { margin-bottom: 16px; }
.score-bar:last-child { margin-bottom: 0; }
.score-bar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.score-bar__label { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); }
.score-bar__value { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.score-bar__track {
  width: 100%; height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.score-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.score-bar__fill--secure { background: linear-gradient(90deg, #818cf8, #6366f1); box-shadow: 0 0 12px rgba(99,102,241,0.5); }
.score-bar__fill--anxious { background: linear-gradient(90deg, #fbbf24, #f59e0b); box-shadow: 0 0 12px rgba(251,191,36,0.5); }
.score-bar__fill--avoidant { background: linear-gradient(90deg, #94a3b8, #64748b); box-shadow: 0 0 12px rgba(148,163,184,0.5); }
.score-bar__fill--disorganized { background: linear-gradient(90deg, #f472b6, #ec4899); box-shadow: 0 0 12px rgba(244,114,182,0.5); }
.score-bar--highlight { position: relative; }
.score-bar--highlight .score-bar__label { color: var(--primary-glow); font-weight: 700; }

/* ----- Interpretation Cards ----- */
.result-interpretation { display: grid; gap: 16px; margin-bottom: 24px; }
.interp-card {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--glass-shadow);
  animation: fadeInUp 0.5s ease-out both;
}
.interp-card:nth-child(1) { animation-delay: 0.25s; }
.interp-card:nth-child(2) { animation-delay: 0.35s; }
.interp-card:nth-child(3) { animation-delay: 0.45s; }
.interp-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.interp-card__icon { font-size: 1.2rem; }
.interp-card__content { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.interp-card__list { list-style: none; padding: 0; }
.interp-card__list li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.6;
}
.interp-card__list li::before {
  content: '•';
  color: var(--primary-glow);
  font-weight: bold;
  flex-shrink: 0;
}

/* ----- Statistics Section ----- */
.result-stats {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
  animation: fadeInUp 0.5s ease-out 0.55s both;
}
.result-stats__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: #fff;
}
.result-stats__subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.stats-bar { margin-bottom: 12px; }
.stats-bar:last-child { margin-bottom: 0; }
.stats-bar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.stats-bar__label {
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stats-bar__label--you { font-weight: 700; color: var(--primary-glow); }
.stats-bar__count { font-size: 0.8rem; color: var(--text-muted); }
.stats-bar__track {
  width: 100%; height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.stats-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.stats-bar__fill--secure { background: var(--primary-glow); }
.stats-bar__fill--anxious { background: var(--accent-amber); }
.stats-bar__fill--avoidant { background: var(--accent-slate); }
.stats-bar__fill--disorganized { background: var(--accent-rose); }
.stats-empty { text-align: center; color: var(--text-muted); padding: 20px; font-size: 0.9rem; }

/* ----- Result Actions ----- */
.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 8px;
  animation: fadeInUp 0.5s ease-out 0.65s both;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav { padding: 12px 16px; }
  .page-container { padding: 24px 16px 60px; }
  .quiz-container { padding: 20px 16px 60px; }
  .hero { padding: 40px 16px 28px; }
  .test-grid { grid-template-columns: 1fr; gap: 16px; padding: 0 16px; }
  .test-card { padding: 24px 20px; }
  .quiz-question__card { padding: 24px 20px; }
  .quiz-question__text { font-size: 1.05rem; }
  .quiz-option { padding: 14px 16px; font-size: 0.9rem; }
  .result-scores, .result-stats, .interp-card { padding: 20px; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .quiz-intro__info { flex-direction: column; align-items: center; gap: 8px; }
}

@media (max-width: 480px) {
  .display-title { font-size: 1.8rem; }
  .hero__title { font-size: 2rem; }
  .quiz-options { gap: 8px; }
  .quiz-nav__dots { gap: 4px; }
  .quiz-nav__dot { width: 6px; height: 6px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
