/* ===============================
   答题页样式 —— 清朗白卡
   =============================== */

/* ===== 页面背景 ===== */
.quiz-page {
  min-height: 100vh;
  padding: 40px 24px 60px;
  background-image: url('../images/quiz-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #e6dfd4;
  background-attachment: fixed;
}

.quiz-inner {
  max-width: 640px;
  margin: 0 auto;
}

/* ===== 顶栏 ===== */
.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.quiz-topbar-back {
  font-size: 0.85rem;
  color: #6d5c4a;
  transition: color 0.2s;
}

.quiz-topbar-back:hover {
  color: #2c2416;
}

.quiz-topbar-count {
  font-size: 0.82rem;
  color: #9a8a78;
  letter-spacing: 1px;
  font-feature-settings: 'tnum';
  background-color: rgba(255,255,255,0.7);
  padding: 3px 14px;
  border-radius: 10px;
}

/* ===== 进度条 ===== */
.quiz-track {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-track-bar {
  flex: 1;
  height: 4px;
  background-color: #d6cdc0;
  border-radius: 2px;
  overflow: hidden;
}

.quiz-track-fill {
  height: 100%;
  background-color: #b2815a;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.quiz-track-label {
  font-size: 0.75rem;
  color: #9a8a78;
  font-feature-settings: 'tnum';
  white-space: nowrap;
}

/* ===== 卡片 ===== */
.quiz-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(44, 36, 22, 0.10);
  overflow: hidden;
  animation: quizIn 0.35s ease;
}

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

.quiz-card-body {
  padding: 32px 36px 28px;
}

/* ===== 标签 ===== */
.quiz-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.quiz-card-tag {
  font-size: 0.7rem;
  color: #ffffff;
  letter-spacing: 1px;
  background-color: #b2815a;
  padding: 2px 12px;
  border-radius: 3px;
}

.quiz-card-idx {
  font-size: 0.75rem;
  color: #9a8a78;
  margin-left: 4px;
}

/* ===== 题目 ===== */
.quiz-card-q {
  font-size: 1.08rem;
  color: #2c2416;
  line-height: 1.8;
  margin-bottom: 28px;
  font-weight: 500;
}

/* ===== 选项 ===== */
.quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.quiz-opt {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid #e2dbd0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fcfaf8;
}

.quiz-opt:hover {
  border-color: #c4b09a;
  background-color: #f7f2eb;
}

.quiz-opt.selected {
  border-color: #a07652;
  background-color: #f4ede4;
  border-width: 1.5px;
}

.quiz-opt-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d4c8b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
  transition: all 0.2s ease;
}

.quiz-opt.selected .quiz-opt-radio {
  border-color: #a07652;
}

.quiz-opt-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #a07652;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.quiz-opt.selected .quiz-opt-radio::after {
  opacity: 1;
}

.quiz-opt-label {
  font-size: 0.82rem;
  color: #6d5c4a;
  font-weight: 600;
  margin-right: 6px;
  width: 18px;
  text-align: center;
}

.quiz-opt-text {
  font-size: 0.95rem;
  color: #3d2e22;
  line-height: 1.5;
}

/* ===== 文本框 ===== */
.quiz-tarea {
  width: 100%;
  min-height: 130px;
  padding: 16px 18px;
  border: 1px solid #e2dbd0;
  border-radius: 6px;
  background-color: #fcfaf8;
  font-size: 0.95rem;
  color: #2c2416;
  line-height: 1.9;
  resize: vertical;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.quiz-tarea:focus {
  border-color: #a07652;
  background-color: #ffffff;
  outline: none;
}

.quiz-tarea::placeholder {
  color: #c5b8a8;
}

.quiz-tarea:read-only {
  background-color: #f5f0e9;
  border-color: #d6cdc0;
}

/* ===== 卡片底栏 ===== */
.quiz-card-bottom {
  padding: 12px 36px;
  background-color: #faf7f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-card-hint {
  font-size: 0.72rem;
  color: #b8aa98;
  letter-spacing: 0.5px;
}

.quiz-card-status {
  font-size: 0.72rem;
  color: #b8aa98;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.quiz-card-status.done {
  color: #a07652;
  font-weight: 500;
}

/* ===== 导航按钮 ===== */
.quiz-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 12px;
}

.quiz-btn {
  padding: 12px 32px;
  font-size: 0.88rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
  border: 1px solid #d6cdc0;
  background-color: #ffffff;
  color: #5a4a3a;
}

.quiz-btn:hover:not(:disabled) {
  border-color: #b8aa98;
  background-color: #faf7f3;
}

.quiz-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.quiz-btn-primary {
  background-color: #a07652;
  color: #ffffff;
  border-color: #a07652;
}

.quiz-btn-primary:hover:not(:disabled) {
  background-color: #886343;
  border-color: #886343;
}

.quiz-btn-primary:disabled {
  opacity: 0.25;
  background-color: #a07652;
  cursor: default;
}

/* ===== 结果区 ===== */
.quiz-result {
  display: none;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(44, 36, 22, 0.10);
  margin-top: 32px;
  overflow: hidden;
  animation: quizIn 0.4s ease;
}

.quiz-result.show {
  display: block;
}

.quiz-result-body {
  padding: 32px 36px 28px;
}

.quiz-result-head {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #ece6de;
}

.quiz-result-title {
  font-size: 1.15rem;
  color: #2c2416;
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 0;
}

.quiz-result-note {
  font-size: 0.85rem;
  color: #5a4a3a;
  line-height: 1.8;
  padding: 14px 18px;
  background-color: #faf7f3;
  border-radius: 6px;
  margin-bottom: 28px;
}

.quiz-result-item {
  padding: 16px 0;
  border-bottom: 1px solid #ece6de;
}

.quiz-result-item:last-of-type {
  border-bottom: none;
}

.quiz-result-item-q {
  font-size: 0.85rem;
  color: #2c2416;
  line-height: 1.6;
  margin-bottom: 8px;
}

.quiz-result-item-a {
  font-size: 0.83rem;
  color: #5a4a3a;
  padding: 10px 14px;
  background-color: #faf7f3;
  border-radius: 4px;
  display: block;
  line-height: 1.6;
}

.quiz-result-foot {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #ece6de;
}

.quiz-result-home {
  display: inline-block;
  padding: 12px 44px;
  background-color: #a07652;
  color: #ffffff;
  font-size: 0.9rem;
  border-radius: 6px;
  letter-spacing: 1px;
  transition: background-color 0.2s;
}

.quiz-result-home:hover {
  background-color: #886343;
}

/* ===== 响应式 ===== */
@media screen and (min-width: 1400px) {
  .quiz-inner {
    max-width: 700px;
  }

  .quiz-card-body {
    padding: 38px 44px 32px;
  }

  .quiz-card-bottom {
    padding: 14px 44px;
  }
}

@media screen and (max-width: 1024px) {
  .quiz-page {
    padding: 32px 20px 48px;
  }

  .quiz-card-body {
    padding: 28px 28px 24px;
  }

  .quiz-card-bottom {
    padding: 10px 28px;
  }

  .quiz-result-body {
    padding: 28px;
  }
}

@media screen and (max-width: 900px) {
  .quiz-page {
    padding: 24px 12px 36px;
  }

  .quiz-inner {
    max-width: 100%;
  }

  .quiz-card-body {
    padding: 24px 18px 20px;
  }

  .quiz-card-q {
    font-size: 0.98rem;
  }

  .quiz-opt {
    padding: 12px 14px;
  }

  .quiz-opt-text {
    font-size: 0.88rem;
  }

  .quiz-tarea {
    font-size: 0.88rem;
    min-height: 100px;
    padding: 14px;
  }

  .quiz-card-bottom {
    padding: 10px 18px;
  }

  .quiz-btn {
    padding: 10px 20px;
    font-size: 0.82rem;
  }

  .quiz-result-body {
    padding: 24px 18px;
  }
}
