/* ═══════════════════════════════════════════════════════
   views/challenge.css — 挑战赛视图样式
   奶白马卡龙 · 液态玻璃风格
   ═══════════════════════════════════════════════════════ */

.ch-page { padding: 0 16px 16px; width: 100%; }

.ch-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 12px; }
.ch-title   { font-size: 18px; font-weight: 700; color: #2D1B69; margin: 0; }
.ch-section-title { font-size: 15px; font-weight: 700; color: #4B3B8C; margin: 14px 0 8px 4px; }

/* ── 信息卡 ── */
.ch-info-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 16px; margin-bottom: 10px;
  background: linear-gradient(140deg, #CAB8FF 0%, #A99CFF 55%, #8B7EFF 100%);
  border: 1px solid rgba(255,255,255,0.50);
  box-shadow: 0 8px 28px rgba(139,92,246,0.25), inset 0 1px 0 rgba(255,255,255,0.45);
}
.ch-info-icon    { font-size: 32px; flex-shrink: 0; }
.ch-info-content { flex: 1; }
.ch-info-title   { font-size: 17px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.ch-info-desc    { font-size: 13px; color: rgba(255,255,255,0.85); }
.ch-best-score   { text-align: center; flex-shrink: 0; }
.ch-best-label   { font-size: 11px; color: rgba(255,255,255,0.75); font-weight: 600; }
.ch-best-num     { font-size: 26px; font-weight: 800; color: #fff; }

/* ── 规则 ── */
.ch-rules       { padding: 14px 16px; }
.ch-rules-title { font-size: 14px; font-weight: 700; color: #4B3B8C; margin-bottom: 10px; }
.ch-rule-item   { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #4B5563; margin-bottom: 8px; }
.ch-rule-dot    { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── 历史记录 ── */
.ch-history-list { padding: 10px 14px; }
.ch-history-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid rgba(167,139,250,0.12);
}
.ch-history-item:last-child { border-bottom: none; }
.ch-history-rank  { font-size: 12px; color: #C4B5E8; font-weight: 700; width: 20px; }
.ch-history-icon  { display: flex; align-items: center; flex-shrink: 0; }
.ch-history-info  { flex: 1; }
.ch-history-score { font-size: 16px; font-weight: 800; color: #2D1B69; display: block; }
.ch-history-meta  { font-size: 11px; color: #9CA3AF; }
.ch-history-date  { font-size: 11px; color: #C4B5E8; }

/* ── 开始按钮 ── */
.ch-start-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px; margin-top: 16px;
  border-radius: 20px; border: 1px solid rgba(255,255,255,0.55);
  background: linear-gradient(140deg, #CAB8FF 0%, #A99CFF 55%, #8B7EFF 100%);
  color: #fff; font-size: 17px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 8px 28px rgba(139,92,246,0.32), inset 0 1px 0 rgba(255,255,255,0.40);
  transition: transform 0.15s ease;
}
.ch-start-btn:active { transform: scale(0.97); }
.ch-start-btn svg { width: 20px; height: 20px; }

/* ── 答题头部 ── */
.ch-quiz-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; }
.ch-quit-btn {
  font-size: 13px; color: #6B7280; border: none;
  background: rgba(255,255,255,0.60); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.80);
  cursor: pointer; font-family: inherit; padding: 6px 10px; border-radius: 10px;
}
.ch-timer        { font-size: 20px; font-weight: 800; color: #2D1B69; font-variant-numeric: tabular-nums; }
.ch-score-display { font-size: 16px; font-weight: 800; color: #7C3AED; min-width: 48px; text-align: right; }

/* ── 进度条 ── */
.ch-progress-wrap  { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ch-progress-track { flex: 1; height: 6px; background: rgba(167,139,250,0.14); border-radius: 3px; overflow: hidden; }
.ch-progress-fill  { height: 100%; background: linear-gradient(90deg, #A78BFA, #EC4899); border-radius: 3px; transition: width 0.4s ease; }
.ch-progress-text  { font-size: 12px; color: #9CA3AF; white-space: nowrap; }

/* ── 题目卡 ── */
.ch-question-card { padding: 16px; margin-bottom: 12px; }
.ch-question-num  { font-size: 12px; color: #A78BFA; font-weight: 700; margin-bottom: 8px; }
.ch-question-text { font-size: 15px; font-weight: 700; color: #1F1040; line-height: 1.6; }

/* ── 选项 ── */
.ch-options { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.ch-option {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  cursor: pointer; text-align: left; width: 100%;
  font-family: inherit; transition: all 0.15s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.ch-option:not(:disabled):active { transform: scale(0.98); }
.ch-option.selected { border-color: rgba(139,92,246,0.45); background: rgba(139,92,246,0.07); }
.ch-option.correct  { border-color: rgba(34,197,94,0.50); background: rgba(34,197,94,0.08); }
.ch-option.wrong    { border-color: rgba(239,68,68,0.50); background: rgba(239,68,68,0.08); }
.ch-option.disabled { opacity: 0.45; }
.ch-option-letter {
  width: 28px; height: 28px; border-radius: 10px;
  background: rgba(167,139,250,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #7C3AED; flex-shrink: 0; line-height: 1;
}
.ch-option.selected .ch-option-letter { background: #7C3AED; color: #fff; }
.ch-option.correct  .ch-option-letter { background: #22C55E; color: #fff; }
.ch-option.wrong    .ch-option-letter { background: #EF4444; color: #fff; }
.ch-option-text { font-size: 14px; font-weight: 500; color: #374151; text-align: left; }

/* ── 反馈 ── */
.ch-feedback {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 14px; margin-bottom: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.5;
}
.ch-feedback.correct { background: rgba(34,197,94,0.10); border: 1px solid rgba(34,197,94,0.28); color: #16A34A; }
.ch-feedback.wrong   { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.22); color: #DC2626; }
.ch-feedback-icon    { font-size: 18px; flex-shrink: 0; }
.ch-feedback-hint    { font-size: 12px; font-weight: 400; margin-top: 3px; opacity: 0.75; }
.ch-next-btn {
  width: 100%; padding: 14px; border-radius: 16px; border: none;
  background: linear-gradient(140deg, #CAB8FF, #A99CFF);
  color: #fff; font-size: 16px; font-weight: 800;
  cursor: pointer; font-family: inherit; transition: transform 0.15s ease;
  box-shadow: 0 6px 20px rgba(139,92,246,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}
.ch-next-btn:active { transform: scale(0.97); }

/* ── 结果页 ── */
.ch-result-wrap { padding: 20px 0; display: flex; flex-direction: column; gap: 14px; }
.ch-new-record  { text-align: center; font-size: 16px; font-weight: 800; color: #D97706; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.30); border-radius: 12px; padding: 8px; }
.ch-grade-card  { display: flex; flex-direction: column; align-items: center; padding: 28px 16px 20px; text-align: center; }
.ch-grade-icon  { margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }
.ch-grade-title { font-size: 24px; font-weight: 800; margin-bottom: 6px; color: #2D1B69; }
.ch-grade-desc  { font-size: 14px; color: #6B7280; }
.ch-result-stats {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center; padding: 16px; gap: 0;
}
.ch-result-stat    { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ch-result-num     { font-size: 22px; font-weight: 800; color: #2D1B69; }
.ch-result-label   { font-size: 11px; color: #9CA3AF; }
.ch-result-divider { width: 1px; height: 36px; background: rgba(167,139,250,0.20); }
.ch-result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ch-retry-btn {
  padding: 14px; border-radius: 16px; border: none;
  background: linear-gradient(140deg, #CAB8FF, #A99CFF);
  color: #fff; font-size: 15px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 20px rgba(139,92,246,0.25);
}
.ch-home-btn {
  padding: 14px; border-radius: 16px; border: none;
  background: rgba(255,255,255,0.65); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.85);
  color: #6B7280; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
