/* ==== Exam Wrapper / Layout ==== */
.exam-wrapper {
  /* max-width: 700px; */
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ==== Section Header / Timer ==== */
.exam-header h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.exam-timer {
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: #555;
}

/* ==== Question Styles ==== */
.exam-question-box {
  background: #f8f9fa;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
}

.exam-question-title {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.exam-option-label {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.exam-option-label input[type="radio"] {
  margin-right: 0.5rem;
}

.exam-textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* ==== Buttons ==== */
.exam-button {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.exam-button:hover {
  background-color: #005b8e;
}

/* ==== Completion Message ==== */
.exam-complete {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.2rem;
}

.exam-spinner {
  margin: 20px auto;
  width: 36px;
  height: 36px;
  border: 4px solid #ccc;
  border-top-color: #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==== Filter UI ==== */
.exam-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.exam-filter-wrap label {
  font-weight: 600;
  font-size: 1rem;
  color: #333;
  margin-bottom: 0;
}

.exam-filter-wrap select {
  padding: 0.45rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.2s ease;
  min-width: 180px;
}

.exam-filter-wrap select:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

/* ==== Exam List Layout ==== */
.exam-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.exam-card {
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.exam-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.exam-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

/* ==== Category Label ==== */
.exam-categories {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1rem;
}

/* ==== Category Badge (optional alt) ==== */
.exam-badge {
  display: inline-block;
  background: #eef6fb;
  color: #0073aa;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  margin-right: 0.5rem;
}


.exam-reading-passage {
  background-color: #f3f4f6;
  padding: 1rem 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.word-count {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.25rem;
  text-align: right;
}

.exam-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.exam-toast.show {
  opacity: 1;
  pointer-events: auto;
}


.exam-question-box audio {
  width: 100%;
  margin: 0.75rem 0;
}

.exam-question-box img {
  display: block;
  margin: 0.75rem 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  max-width: 100%;
}

.exam-listening-intro {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
}
