/* ============================================================
   Bible Quiz — quiz.html 전용 스타일 (styles.css의 --변수 재사용)
   ============================================================ */

.quiz-body {
  background: #eef2f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#quiz-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.quiz-header h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.quiz-back {
  color: var(--blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.quiz-back:hover { text-decoration: underline; }
.quiz-header-spacer { flex: 1; }

.quiz-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 24px 16px 40px;
}

@media (max-width: 760px) {
  .quiz-main {
    padding-bottom: calc(40px + var(--map-nav-h, 0px));
  }
}

.quiz-screen {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.quiz-screen.hidden { display: none; }
.quiz-screen--wide { max-width: 640px; }

/* ---------- 시작 화면 ---------- */
.quiz-lead {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  margin: 8px 0 24px;
  line-height: 1.5;
}

.quiz-filter-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px;
}

.quiz-cat-group {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.quiz-cat-btn {
  flex: 1;
  padding: 14px 8px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.quiz-cat-btn:hover { border-color: var(--blue); }
.quiz-cat-btn.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.quiz-cat-count {
  display: block;
  font-size: 12px;
  font-weight: 400;
  opacity: .75;
  margin-top: 2px;
}

.quiz-diff-group {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.quiz-diff-btn {
  flex: 1;
  padding: 10px 8px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.quiz-diff-btn:hover { border-color: var(--blue); }
.quiz-diff-btn.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.quiz-type-group {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.quiz-type-btn {
  flex: 1;
  padding: 10px 8px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.quiz-type-btn:hover { border-color: var(--blue); }
.quiz-type-btn.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.quiz-selected-count {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 16px;
}

.quiz-start-btn {
  padding: 16px;
  border: none;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.quiz-start-btn:hover { filter: brightness(1.05); }
.quiz-start-btn:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

.quiz-retry-btn {
  margin-top: 12px;
  padding: 14px;
  border: 1.5px solid var(--amber);
  border-radius: 10px;
  background: #fff8e1;
  color: #8a6d00;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.quiz-retry-btn.hidden { display: none; }

.quiz-reset-link {
  display: block;
  margin: 8px auto 0;
  padding: 4px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.quiz-reset-link.hidden { display: none; }
.quiz-reset-link:hover { color: var(--text); }

.quiz-hint {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 20px;
}

/* ---------- 문제 화면 (전체 리스트) ---------- */
.quiz-stickybar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #eef2f5;
  padding: 10px 0;
  margin: -10px 0 6px;
}
.quiz-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quiz-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  transition: width .25s ease;
}
.quiz-progress-text, .quiz-score-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.quiz-score-text { color: var(--green); }

.quiz-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px 20px;
}
.quiz-card.answered { box-shadow: 0 1px 3px rgba(60, 64, 67, .18); }

.quiz-q-index {
  color: var(--blue);
  font-weight: 800;
}

.quiz-tag-row {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
}

.quiz-cat-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}
.quiz-cat-tag--acts { background: #e8f0fe; color: var(--blue); }
.quiz-cat-tag--gospels { background: #e6f4ea; color: var(--green); }

.quiz-diff-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}
.quiz-diff-tag--easy { background: #e6f4ea; color: #0d652d; }
.quiz-diff-tag--medium { background: #fff8e1; color: #8a6d00; }
.quiz-diff-tag--hard { background: #fce8e6; color: #b3261e; }

.quiz-question {
  font-size: 19px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px;
}

.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-choice-btn {
  text-align: left;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.quiz-choice-btn:hover:not(:disabled) {
  border-color: var(--blue);
  background: #eef4fe;
}
.quiz-choice-btn:disabled { cursor: default; }
.quiz-choice-btn.correct {
  border-color: var(--green);
  background: #e6f4ea;
  color: #0d652d;
  font-weight: 700;
}
.quiz-choice-btn.incorrect {
  border-color: #d93025;
  background: #fce8e6;
  color: #b3261e;
  font-weight: 700;
}

.quiz-feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.quiz-feedback.hidden { display: none; }

.quiz-feedback-result {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
}
.quiz-feedback-result.is-correct { color: #0d652d; }
.quiz-feedback-result.is-incorrect { color: #b3261e; }

.quiz-feedback-answer {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.quiz-explain {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}

.quiz-verse {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.quiz-bottom-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}
.quiz-bottom-bar .quiz-start-btn { width: 100%; }
.quiz-bottom-bar .quiz-start-btn:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

.quiz-quit-btn {
  margin: 0 auto;
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

/* ---------- 종료 화면 ---------- */
.quiz-end-title {
  text-align: center;
  font-size: 22px;
  margin: 8px 0 4px;
  color: var(--text);
}
.quiz-end-score {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 20px;
}

.quiz-wrong-list { display: flex; flex-direction: column; gap: 10px; }
.quiz-wrong-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 4px 0 2px;
}
.quiz-wrong-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.quiz-wrong-q { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.quiz-wrong-a { margin: 0; font-size: 13.5px; font-weight: 700; color: #0d652d; }
.quiz-wrong-explain { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--text); }
.quiz-wrong-verse { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

.quiz-end-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.quiz-home-btn {
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  color: var(--blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.quiz-home-btn:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .quiz-main { padding: 16px 12px 32px; }
  .quiz-card { padding: 18px 14px; }
  .quiz-question { font-size: 17px; }
}
