/* ============================================================
   theme.css — 心理测试平台统一风格
   适配手机优先，所有测试页面引入此文件
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  background: #f7f8fc;
  color: #333;
  line-height: 1.6;
  min-height: 100%;
}

/* ── 页面容器 ── */
.page-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 32px;
  min-height: 100vh;
}

/* ── 顶部 header ── */
.quiz-header {
  text-align: center;
  padding: 28px 0 18px;
}
.quiz-header .tag {
  display: inline-block;
  background: var(--color, #7c6af7);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.quiz-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin-bottom: 6px;
}
.quiz-header p {
  font-size: 13px;
  color: #888;
}

/* ── 引导开始卡片 ── */
.start-card {
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  margin-bottom: 16px;
}
.start-card .info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
}
.start-card .info-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #666;
  padding: 5px 0;
  border-bottom: 1px solid #f3f3f3;
}
.start-card .info-list li:last-child { border-bottom: none; }
.start-card .info-list li::before {
  content: '✦';
  color: var(--color, #7c6af7);
  font-size: 11px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── 开始按钮 ── */
.btn-start {
  display: block;
  width: 100%;
  background: var(--color, #7c6af7);
  color: #fff;
  border: none;
  padding: 15px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124,106,247,0.25);
  transition: opacity .2s, transform .15s;
  letter-spacing: 1px;
}
.btn-start:active { opacity: .88; transform: scale(.98); }

/* 多版本选择按钮组 */
.version-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.version-btns .btn-ver {
  display: block;
  width: 100%;
  border: none;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  color: #fff;
  transition: opacity .2s, transform .15s;
}
.version-btns .btn-ver:active { opacity: .88; transform: scale(.98); }
.btn-ver.v1 { background: #ff7043; box-shadow: 0 4px 14px rgba(255,112,67,.3); }
.btn-ver.v2 { background: #5c6bc0; box-shadow: 0 4px 14px rgba(92,107,192,.3); }
.btn-ver.v3 { background: #7b1fa2; box-shadow: 0 4px 14px rgba(123,31,162,.3); }

/* ── 进度条 ── */
.progress-area {
  margin-bottom: 14px;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 6px;
}
.progress-track {
  height: 5px;
  background: #ebebeb;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--color, #7c6af7);
  border-radius: 3px;
  transition: width .4s ease;
  width: 0%;
}

/* ── 题目卡片 ── */
.question-card {
  background: #fff;
  border-radius: 18px;
  padding: 24px 20px 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  margin-bottom: 14px;
  min-height: 90px;
}
.question-card .q-num {
  font-size: 12px;
  color: var(--color, #7c6af7);
  font-weight: 600;
  margin-bottom: 10px;
}
.question-card .q-text {
  font-size: 17px;
  color: #222;
  line-height: 1.65;
  font-weight: 500;
}

/* ── 选项 ── */
.options-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.options-wrap.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.opt-btn {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  color: #444;
  cursor: pointer;
  text-align: left;
  transition: all .2s;
  line-height: 1.4;
}
.options-wrap.grid2 .opt-btn { text-align: center; font-size: 14px; }
.opt-btn:active,
.opt-btn.selected {
  background: var(--color-light, #f0eeff);
  border-color: var(--color, #7c6af7);
  color: var(--color, #7c6af7);
  font-weight: 600;
}
/* 选项 hover（桌面端） */
@media (hover: hover) {
  .opt-btn:hover {
    background: var(--color-light, #f0eeff);
    border-color: var(--color, #7c6af7);
  }
}

/* ── 上下题导航 ── */
.nav-bar {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.nav-btn {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.nav-btn.prev {
  background: #f3f3f7;
  color: #888;
}
.nav-btn.next {
  background: var(--color, #7c6af7);
  color: #fff;
  box-shadow: 0 3px 12px rgba(124,106,247,.25);
}
.nav-btn:active { opacity: .85; transform: scale(.98); }
.nav-btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }

/* ── 结果卡片 ── */
.result-card {
  background: #fff;
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  margin-bottom: 14px;
  text-align: center;
}
.result-card .result-title {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}
.result-card .result-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}
.result-card .result-badge {
  display: inline-block;
  background: var(--color-light, #f0eeff);
  color: var(--color, #7c6af7);
  font-size: 28px;
  font-weight: 800;
  padding: 14px 32px;
  border-radius: 14px;
  margin: 14px 0;
}

/* ── 页脚 ── */
.page-footer {
  text-align: center;
  font-size: 12px;
  color: #bbb;
  padding: 10px 0 4px;
}

/* ── 通用工具 ── */
.hidden { display: none !important; }

/* ── 桌面端适配 ── */
@media (min-width: 600px) {
  .page-wrap { padding: 0 20px 40px; }
  .quiz-header h1 { font-size: 26px; }
  .question-card .q-text { font-size: 18px; }
}
