/* ============================================================
   pages/mbti-quiz.html 样式（P0-4-T17 <style> 块外联）
   - 页面 style="..." 与 on* 仍在本页（P0-4-T18 整改）
   ============================================================ */

/* Design Token：项目级 Glassmorphism 规范（与 topbar.8d4aa38f.css 一致） */
:root {
  --glass-bg-light:           rgba(255, 255, 255, 0.55);
  --glass-border-light:        rgba(15, 23, 42, 0.06);
  --glass-highlight-light:     rgba(255, 255, 255, 0.6);
  --glass-shadow-light:        rgba(15, 23, 42, 0.06);
  --glass-bg-dark:             rgba(10, 14, 39, 0.72);
  --glass-border-dark:         rgba(255, 255, 255, 0.06);
  --glass-highlight-dark:      rgba(255, 255, 255, 0.08);
  --glass-shadow-dark:         rgba(0, 0, 0, 0.32);
  --glass-blur:                blur(20px) saturate(180%);
}

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #e8eaf0;
    background:
      radial-gradient(ellipse 80% 60% at 50% 0%,  rgba(59,130,246,0.20) 0%, transparent 60%),
      radial-gradient(ellipse 50% 40% at 100% 100%, rgba(139,92,246,0.12) 0%, transparent 60%),
      #05071a;
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
  }
  a { color: inherit; text-decoration: none; }

  .wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 60px; }

  /* 进度 + 计时 */
  .top-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
  }
  .progress-text { font-size: 12px; color: rgba(232,234,240,0.6); letter-spacing: 0.1em; }
  .progress-text b { color: #fff; font-size: 16px; }
  .timer {
    font-size: 14px;
    color: rgba(232,234,240,0.7);
    padding: 6px 12px;
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 4px;
    font-family: "Consolas", monospace;
  }
  .timer.warn { color: #f59e0b; border-color: rgba(245,158,11,0.4); }
  .timer.danger { color: #ef4444; border-color: rgba(239,68,68,0.4); animation: pulse 1s infinite; }
  @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

  .progress-bar {
    width: 100%; height: 4px; background: rgba(59,130,246,0.15);
    border-radius: 2px; overflow: hidden; margin-bottom: 36px;
  }
  .progress-fill {
    height: 100%; background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0; transition: width 0.3s ease;
  }

  /* 题目 */
  .qcard {
    background: rgba(11,18,32,0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 16px;
    padding: 40px;
    min-height: 420px;
    display: flex; flex-direction: column;
  }
  .q-num {
    font-size: 11px; letter-spacing: 0.3em;
    color: rgba(232,234,240,0.5); text-transform: uppercase;
    margin-bottom: 16px;
  }
  .q-content {
    font-size: 22px;
    color: #fff;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 32px;
  }
  .opts { display: flex; flex-direction: column; gap: 14px; }
  .opt {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 18px 22px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex; align-items: center; gap: 14px;
    color: rgba(232,234,240,0.85);
    font-size: 15px;
  }
  .opt:hover { background: rgba(59,130,246,0.10); border-color: rgba(59,130,246,0.4); }
  .opt.selected {
    background: rgba(59,130,246,0.18);
    border-color: #3b82f6;
    color: #fff;
  }
  .opt-letter {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border: 1px solid currentColor;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
  }
  .opt-text { flex: 1; }

  /* 上一题/下一题/提交 */
  .nav-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 32px;
  }
  .nav-btn {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(59,130,246,0.3);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .nav-btn:hover { background: rgba(59,130,246,0.15); border-color: #3b82f6; }
  .nav-btn[disabled] { opacity: 0.3; cursor: not-allowed; }
  .nav-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-color: transparent;
  }
  .nav-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59,130,246,0.4); }

  /* 加载中 */
  .loading {
    text-align: center; padding: 80px 0; color: rgba(232,234,240,0.6);
  }

  @media (max-width: 720px) {
    .qcard { padding: 24px; }
    .q-content { font-size: 18px; }
    .nav-row { flex-direction: column-reverse; gap: 12px; }
    .nav-row .nav-btn { width: 100%; }
  }
