/* ========================================
   Capitol Boxes — Question & Help Modals
   ======================================== */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-overlay.visible {
  display: flex;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--gold);
  border-radius: 12px;
  width: 600px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.25s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--edge-undrawn);
}

.modal-category {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 700;
}

/* ========================================
   Timer Bar
   ======================================== */

.timer-bar-container {
  width: 120px;
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: var(--correct);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.timer-bar.warning {
  background: var(--gold);
}

.timer-bar.danger {
  background: var(--incorrect);
}

/* ========================================
   Question Body
   ======================================== */

.modal-body {
  padding: 1.5rem;
}

.question-text {
  font-size: 1.15rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  color: var(--cream);
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-primary);
  border: 2px solid var(--edge-undrawn);
  border-radius: 8px;
  color: var(--cream);
  font-size: 1rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.option-btn:hover:not(.answered) {
  border-color: var(--gold);
  background: var(--bg-board);
}

.option-btn .option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--edge-undrawn);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.option-btn .option-text {
  flex: 1;
}

/* Answer feedback states */
.option-btn.correct-answer {
  border-color: var(--correct);
  background: rgba(78, 203, 113, 0.15);
}

.option-btn.correct-answer .option-letter {
  background: var(--correct);
  color: var(--bg-primary);
}

.option-btn.wrong-answer {
  border-color: var(--incorrect);
  background: rgba(231, 76, 95, 0.15);
}

.option-btn.wrong-answer .option-letter {
  background: var(--incorrect);
  color: var(--bg-primary);
}

.option-btn.dimmed {
  opacity: 0.4;
  pointer-events: none;
}

.option-btn.answered {
  pointer-events: none;
}

/* ========================================
   Explanation Footer
   ======================================== */

.modal-footer {
  padding: 0 1.5rem 1.5rem;
}

.explanation-box {
  display: none;
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 1rem;
  border-left: 3px solid var(--gold);
}

.explanation-box.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.explanation-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--cream);
  opacity: 0.85;
}

/* ========================================
   Help Modal
   ======================================== */

.help-modal-content {
  width: 500px;
}

.help-close-btn {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  line-height: 1;
}

.help-close-btn:hover {
  opacity: 1;
}

.help-body {
  padding: 1.5rem;
}

.help-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
}

.help-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.7;
}
