/* ===== Restore working quiz modal + loading bar styles (for test.html) ===== */

.modal {
  /* JS should set display:block when opening */
  display: none;
  position: fixed;
  z-index: 999999; /* make sure it sits above everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  background-color: #fff;
  margin: 8% auto;
  padding: 20px;
  border-radius: 10px;
  width: 92%;
  max-width: 900px;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
  position: relative;
}

/* test.html uses id="closeQuiz", not class="close" */
#closeQuiz {
  float: right;
  cursor: pointer;
  font-size: 18px;
  user-select: none;
}

/* IMPORTANT: do NOT hide the quiz container */
#quizContainer {
  margin-top: 20px;
  visibility: visible;
}

/* Question layout (your JS uses .question-block and #explanation) */
.question-block {
  margin-bottom: 20px;
}

.question-block button,
#quizContainer button {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  background: #f2f2f2;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.question-block button:hover,
#quizContainer button:hover {
  background: #e6e6e6;
}

.explanation {
  margin-top: 12px;
  font-style: italic;
  opacity: 1;
}

/* Loading bar elements (your JS likely injects these) */
#timeBarWrapper {
  width: 80%;
  max-width: 420px;
  height: 8px;
  background: #e6e6e6;
  border-radius: 999px;
  overflow: hidden;
  margin: 15px auto;
  display: block; /* let JS hide/show if it wants */
}

#timeBar,
#loadingBar {
  width: 0%;
  height: 100%;
  background: #0078ff;
  transition: width 2s ease-out;
}

#topicPreview {
  margin-top: 15px;
  font-weight: bold;
  font-size: 18px;
  text-align: center;
}
