
.app { width: 100%; max-width: 700px; margin: 0 auto; }

/* 头部 */
.quiz-header { text-align: center; padding: 0 0 16px; }
.quiz-header h1 { font-size: 20px; font-weight: 700; color: #5A8A6C; letter-spacing: 1px; }
.quiz-header .sub { font-size: 12px; color: #aaa; margin-top: 4px; }

/* 进度条 */
.progress-wrap { margin-bottom: 20px; }
.progress-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.progress-num { font-size: 13px; font-weight: 600; color: #5A8A6C; }
.progress-right { font-size: 12px; color: #bbb; }
.progress-track { height: 8px; background: #e8ede9; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #5A8A6C, #6fa882); border-radius: 4px; transition: width 0.4s ease; }
.progress-dots { display: flex; justify-content: space-between; margin-top: 10px; padding: 0 2px; }
.progress-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0e5e1; transition: all 0.3s; }
.progress-dot.done { background: #5A8A6C; }
.progress-dot.current { background: #5A8A6C; transform: scale(1.4); box-shadow: 0 0 8px rgba(90,138,106,0.4); }
.progress-dot.wrong { background: #c0392b; }

/* 卡片 */
.card {
  background: #fff; border: 1px solid #D4E5DB; border-radius: 16px;
  padding: 36px 28px 28px; text-align: center; min-height: 300px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 2px 16px rgba(90,138,106,0.06);
}
.card-number { font-size: 13px; font-weight: 700; color: #5A8A6C; letter-spacing: 2px; margin-bottom: 12px; }
.card-label {
  display: inline-block; background: #E8F5EC; color: #5A8A6C; font-size: 12px;
  font-weight: 600; padding: 5px 16px; border-radius: 20px; margin-bottom: 20px; letter-spacing: 1px;
}
.card-question { font-size: 19px; font-weight: 600; color: #333; line-height: 1.7; margin-bottom: 28px; padding: 0 4px; }
.card-answer { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease; border-top: 1px dashed transparent; }
.card-answer.show { max-height: 500px; opacity: 1; padding-top: 18px; border-top-color: #D4E5DB; margin-top: 4px; }
.answer-label { font-size: 13px; color: #5A8A6C; margin-bottom: 10px; font-weight: 500; letter-spacing: 1px; }
.answer-text { font-size: 20px; font-weight: 700; color: #333; line-height: 1.7; }
.answer-extra { font-size: 13px; color: #999; margin-top: 10px; }

/* 按钮 */
.btn-group { display: flex; gap: 12px; margin-top: 20px; }
.btn {
  flex: 1; padding: 15px 20px; border-radius: 12px; font-size: 15px;
  font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
  font-family: inherit; letter-spacing: 0.5px;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: linear-gradient(135deg, #5A8A6C, #6fa882); color: #fff; box-shadow: 0 3px 12px rgba(90,138,106,0.2); }
.btn-primary:hover { box-shadow: 0 4px 16px rgba(90,138,106,0.3); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-outline { background: #fff; color: #5A8A6C; border: 1.5px solid #5A8A6C; }
.btn-outline:hover { background: #E8F5EC; }
.btn-success { background: linear-gradient(135deg, #5A8A6C, #6fa882); color: #fff; box-shadow: 0 3px 12px rgba(90,138,106,0.2); }
.btn-danger { background: #fff; color: #c0392b; border: 1.5px solid #e0b4b4; }
.btn-danger:hover { background: #fdf2f2; }
.btn-ghost { background: transparent; color: #999; border: 1px solid #e0e0e0; flex: 0; padding: 10px 16px; font-size: 13px; }
.btn-ghost:hover { background: #f5f5f5; color: #666; }
.btn-block { width: 100%; flex: none; }

/* 开始页 */
.start-card {
  background: #fff; border: 1px solid #D4E5DB; 
  padding: 36px 28px; text-align: center; box-shadow: 0 2px 16px rgba(90,138,106,0.06);
}
.start-card .icon { font-size: 48px; margin-bottom: 10px; display: block; }
.start-card h2 { font-size: 20px; color: #333; margin-bottom: 6px; font-weight: 700; }
.start-card .desc { font-size: 13px; color: #999; margin-bottom: 20px; line-height: 1.8; }

/* 题库选择 */
.bank-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; text-align: left; }
.bank-row {
  display: flex; align-items: center; gap: 8px; padding: 5px;
  border: 1px solid #e8ede9; border-radius: 10px; cursor: pointer;
  transition: all 0.15s; background: #fafcfa;
}
.bank-row:hover { border-color: #c8d8cc; }
.bank-row input[type="checkbox"] {
  appearance: none; width: 16px; height: 16px; border: 2px solid #ccc;
  border-radius: 4px; flex-shrink: 0; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.bank-row input[type="checkbox"]:checked { background: #5A8A6C; border-color: #5A8A6C; }
.bank-row input[type="checkbox"]:checked::after { content: '✓'; color: #fff; font-size: 11px; font-weight: 700; }
.bank-row .bn { font-size: 13px; color: #333; flex: 1; }

/* 题数选择器 */
.count-selector {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
  padding: 12px 0; border-top: 1px solid #f0f0f0; flex-wrap: wrap;
}
.count-label { font-size: 13px; color: #999; white-space: nowrap; }
.count-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.count-pill {
  padding: 5px; border-radius: 10px; font-size: 13px; 
  border: 1px solid #e0e0e0; background: #fff; color: #999; cursor: pointer;
  transition: all 0.15s; font-family: inherit;
}
.count-pill:hover { border-color: #5A8A6C; color: #5A8A6C; }
.count-pill.active { background: #5A8A6C; color: #fff; border-color: #5A8A6C; }
.count-custom {
  width: 80px; padding: 6px 8px; border-radius: 10px; font-size: 13px;
  border: 1px solid #e0e0e0; background: #fff; color: #333; text-align: center;
  font-family: inherit; outline: none; transition: border-color 0.15s;
}
.count-custom:focus { border-color: #5A8A6C; }
.count-custom::placeholder { color: #ccc; }

/* 结果页 */
.result-card {
  background: #fff; border: 1px solid #D4E5DB; border-radius: 16px;
  padding: 36px 28px; text-align: center; box-shadow: 0 2px 16px rgba(90,138,106,0.06);
}
.result-ring {
  display: inline-flex; align-items: center; justify-content: center;
  width: 120px; height: 120px; border-radius: 50%; margin-bottom: 16px;
}
.result-ring.perfect { background: #eafaf1; border: 4px solid #27ae60; }
.result-ring.good { background: #ecf5ef; border: 4px solid #5A8A6C; }
.result-ring.ok { background: #fef9f0; border: 4px solid #e67e22; }
.result-ring.low { background: #fdf2f2; border: 4px solid #c0392b; }
.result-score { font-size: 42px; font-weight: 700; line-height: 1; }
.result-score.perfect { color: #27ae60; }
.result-score.good { color: #5A8A6C; }
.result-score.ok { color: #e67e22; }
.result-score.low { color: #c0392b; }
.result-label { font-size: 15px; color: #666; margin: 0 0 4px; font-weight: 500; }
.result-msg { font-size: 14px; color: #999; margin-bottom: 24px; }
.result-stats { display: flex; justify-content: center; gap: 24px; margin-bottom: 24px; }
.result-stat { text-align: center; }
.result-stat .val { font-size: 22px; font-weight: 700; }
.result-stat .val.green { color: #5A8A6C; }
.result-stat .val.red { color: #c0392b; }
.result-stat .lbl { font-size: 12px; color: #999; margin-top: 2px; }
.wrong-list { text-align: left; border-top: 1px solid #f0f0f0; padding-top: 20px; margin-top: 4px; }
.wrong-list h3 { font-size: 15px; color: #c0392b; margin-bottom: 14px; font-weight: 600; }
.wrong-item { background: #fdf5f5; border: 1px solid #f5e0e0; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.wrong-item .wn { font-size: 11px; color: #c0392b; font-weight: 600; margin-bottom: 4px; }
.wrong-item .wl { display: inline-block; font-size: 11px; background: #fff; color: #5A8A6C; padding: 2px 10px; border-radius: 10px; margin-bottom: 6px; font-weight: 600; }
.wrong-item .q { font-size: 14px; color: #333; margin-bottom: 6px; font-weight: 500; }
.wrong-item .a { font-size: 14px; color: #5A8A6C; font-weight: 600; }
.wrong-item .e { font-size: 12px; color: #999; margin-top: 4px; }

.topbar {align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* 响应式 */
@media (max-width: 768px) {
  .app { max-width: 100%; }
  .card { padding: 28px 20px 24px; min-height: 260px; }
  .card-question { font-size: 17px; }
  .answer-text { font-size: 18px; }
  .start-card,.result-card { padding: 28px 20px; }
  .result-score { font-size: 38px; }
  .result-ring { width: 100px; height: 100px; }
  .btn { padding: 7px 8px; font-size: 12px; }
  .quiz-header h1 { font-size: 14px; }
}
