/* ═══════════════════════════════════════════════════════════════
   MIS Testing — 頁面專屬樣式（需搭配 global.css）
   ═══════════════════════════════════════════════════════════════ */

/* ── Container ── */
.quiz-container {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.5s ease;
}

/* ── Header ── */
.quiz-header {
  text-align: center;
  padding: 48px 0 0;
  margin-bottom: 28px;
}
.quiz-header-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f3a2e, #0a2920);
  border: 1px solid rgba(52, 211, 153, 0.25);
  font-size: 14px;
  font-weight: 900;
  font-family: var(--mono);
  color: var(--green);
  margin-bottom: 24px;
  box-shadow: 0 12px 40px rgba(52, 211, 153, 0.1);
}

h2 {
  font-size: 22px;
  font-weight: 900;
  color: #e8edf5;
  letter-spacing: -0.3px;
  border: none;
  padding: 0;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ── Chapter Select ── */
#chapter-select {
  display: block;
  width: 100%;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 12px 16px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2360a5fa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.15s, background 0.15s;
}
#chapter-select:hover,
#chapter-select:focus {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.06);
  outline: none;
}
#chapter-select option {
  background: #111827;
  color: var(--text);
}

/* ── Progress ── */
.progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text2);
}

/* ── Question Card ── */
.question {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 22px;
  margin-bottom: 18px;
  animation: fadeUp 0.25s ease;
}
.question-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.75;
  margin-bottom: 20px;
  color: #e8edf5;
}

/* ── Options ── */
.options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
button.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  text-align: left;
  transition: all 0.15s;
  line-height: 1.55;
  width: 100%;
}
button.option:hover {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(96, 165, 250, 0.05);
}
button.option:disabled { cursor: default; }
button.option:disabled:hover {
  border-color: var(--border);
  background: transparent;
}
button.correct {
  border-color: var(--green) !important;
  background: rgba(52, 211, 153, 0.1) !important;
  color: var(--green) !important;
  font-weight: 700;
}
button.wrong {
  border-color: var(--red) !important;
  background: rgba(251, 113, 133, 0.1) !important;
  color: var(--red) !important;
}

/* ── Result Area ── */
#result-area {
  display: none;
  text-align: center;
  padding: 56px 0 0;
  animation: fadeUp 0.5s ease;
}
#result-area h3 {
  font-size: 28px;
  font-weight: 900;
  color: #e8edf5;
  margin-bottom: 12px;
}
#score-text {
  font-size: 22px !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #93c5fd, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}

.btn-primary { margin-top: 16px; }

/* ── Wrong Review ── */
.wrong-review {
  margin-top: 28px;
  text-align: left;
}
.wrong-review h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 14px;
}
.wrong-item {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-left: 4px solid var(--red);
}
.wrong-q {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #e8edf5;
  line-height: 1.6;
}
.wrong-your {
  font-size: 12px;
  color: var(--red);
  margin-bottom: 4px;
}
.wrong-correct {
  font-size: 12px;
  color: var(--green);
  font-weight: 700;
}

/* ── RWD ── */
@media (max-width: 600px) {
  .quiz-container { padding: 16px 14px 32px; }
  .quiz-header { padding-top: 24px; }
  h2 { font-size: 18px; }
  .question-text { font-size: 15px; }
  button.option {
    font-size: 13px;
    padding: 13px 14px;
  }
}
