/* ============================================================
   测验页面样式
   ============================================================ */

.quiz-score-bar {
  text-align: center;
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--tg-text);
}

.quiz-mode-tabs {
  margin-bottom: 16px;
}

.quiz-question-area {
  margin-bottom: 12px;
}

.quiz-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--tg-hint);
  font-size: 15px;
}

.quiz-question-card {
  text-align: center;
  padding: 24px 20px;
}
.quiz-question__text {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
  word-break: break-word;
}
.quiz-question__hint {
  font-size: 13px;
  color: var(--tg-hint);
  margin-bottom: 16px;
}

/* 文本输入 */
.quiz-input-row {
  display: flex;
  gap: 8px;
}
.quiz-input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 2px solid var(--tg-secondary-bg);
  border-radius: 8px;
  font-size: 16px;
  background: var(--tg-bg);
  color: var(--tg-text);
  outline: none;
  transition: border-color 0.15s;
}
.quiz-input:focus {
  border-color: var(--tg-button);
}

/* 声调按钮 */
.tone-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tone-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background: var(--tg-secondary-bg);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.tone-btn:active {
  border-color: var(--tg-button);
  transform: scale(0.96);
}
.tone-mark {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--tg-text);
}
.tone-btn span {
  font-size: 12px;
  color: var(--tg-hint);
}

/* 结果反馈 */
.quiz-result {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  animation: resultPop 0.3s ease;
}
@keyframes resultPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.quiz-result--correct {
  background: rgba(52, 199, 89, 0.15);
  border: 1px solid #34c759;
}
.quiz-result--wrong {
  background: rgba(236, 57, 66, 0.1);
  border: 1px solid var(--tg-destructive);
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.quiz-result__icon {
  font-size: 32px;
  margin-bottom: 4px;
}
.quiz-result__text {
  font-size: 16px;
  font-weight: 600;
  color: var(--tg-text);
}
.quiz-result__text small {
  font-size: 13px;
  font-weight: 400;
  color: var(--tg-hint);
}

/* 会话统计 */
.quiz-session-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px;
  background: var(--tg-secondary-bg);
  border-radius: 8px;
  font-size: 13px;
}
.quiz-session__correct { color: #34c759; font-weight: 500; }
.quiz-session__wrong { color: var(--tg-destructive); font-weight: 500; }
.quiz-session__accuracy { color: var(--tg-hint); font-weight: 500; }
