/* ============================================================
 * 九型人格自测工具 —— 问卷页专属样式
 * ============================================================ */

/* —— 页头与进度 —— */
.quiz-head {
  text-align: center;
  margin-bottom: 18px;
}

.quiz-head .section-title {
  display: inline-block;
}

.quiz-sub {
  color: var(--sub);
  font-size: 14px;
}

.quiz-progress-wrap {
  max-width: 680px;
  margin: 0 auto 34px;
}

.quiz-progress-track {
  height: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 20px;
  transition: width var(--transition-normal);
}

.progress-text {
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--sub);
  margin-top: 6px;
}

/* —— 作答说明 —— */
.quiz-tips {
  max-width: 680px;
  margin: 0 auto 24px;
  padding: 18px 22px;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.quiz-tips h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.quiz-tips li {
  font-size: 13px;
  color: var(--text);
  margin: 4px 0 4px 18px;
}

/* —— 题目列表 —— */
.question-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.question-item:hover {
  border-color: var(--accent);
}

.question-item:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.question-item.checked {
  border-color: var(--accent);
  background: var(--gradient-card);
  box-shadow: var(--shadow-soft);
}

.question-item input.q-check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.q-checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.question-item.checked .q-checkbox {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
}

.q-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--sub);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.question-item.checked .q-num {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
}

.q-text {
  font-size: 14px;
  line-height: 1.75;
  flex: 1;
}

/* —— 提交与重置 —— */
.quiz-actions {
  max-width: 680px;
  margin: 28px auto 0;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.submit-btn {
  padding: 13px 42px;
  border: none;
  border-radius: 30px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-normal);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.reset-btn {
  padding: 11px 26px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.reset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.form-error {
  max-width: 680px;
  margin: 14px auto 0;
  text-align: center;
  color: #e06c75;
  font-size: 14px;
}

/* —— 结果区 —— */
.result-area {
  animation: fadeInUp 0.6s ease;
}

.result-summary {
  text-align: center;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

.result-label {
  font-size: 13px;
  color: var(--sub);
}

.result-main-name {
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.result-main-count {
  color: var(--sub);
  font-size: 13px;
}

.result-tie-note {
  max-width: 520px;
  margin: 12px auto 0;
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.8;
}

.type-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.type-detail-card .type-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.type-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.type-name b {
  font-size: 16px;
  display: block;
}

.type-alias {
  font-size: 12px;
  color: var(--sub);
}

.detail-row {
  font-size: 13px;
  line-height: 1.85;
  margin-bottom: 10px;
}

.detail-row b {
  color: var(--accent);
  font-weight: 600;
}

.detail-tip {
  font-size: 12.5px;
  color: var(--sub);
  margin-bottom: 0;
}

.second-note {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 16px;
}

.second-note b {
  color: var(--accent);
}

/* —— 得分明细 —— */
.score-section {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.sub-title {
  font-size: 15px;
  margin-bottom: 14px;
}

.score-row {
  display: grid;
  grid-template-columns: 120px 1fr 52px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.score-name {
  color: var(--sub);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.score-row.main .score-name {
  color: var(--text);
  font-weight: 700;
}

.score-bar-track {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 14px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  transition: width 0.9s ease;
}

.score-row.main .score-bar-fill {
  box-shadow: 0 0 8px rgba(255, 182, 193, 0.55);
}

.score-num {
  text-align: right;
  font-size: 12px;
  color: var(--text);
}

.disclaimer {
  max-width: 680px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 12px;
  color: var(--sub);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  line-height: 1.8;
}

.result-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.back-link.side {
  align-self: center;
  padding: 11px 0;
}

/* —— 返回链接 —— */
.back-wrap {
  text-align: center;
  margin-top: 30px;
}

.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  transition: transform var(--transition-fast);
}

.back-link:hover {
  transform: translateX(-4px);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .score-row {
    grid-template-columns: 92px 1fr 44px;
    gap: 8px;
  }
  .score-name {
    font-size: 11px;
  }
  .type-detail-card {
    padding: 16px;
  }
  .result-main-name {
    font-size: 20px;
  }
}
