.exam-timer {
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
  color: var(--color-primary-active);
  font-weight: 900;
  padding: 0.75rem 1rem;
}

/* ─── صفحه امتحان — امنیتی ─── */

.exam-secure {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* فقط textarea و input قابل انتخاب باشند */
.exam-secure .exam-answer-textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* جلوگیری از drag تصاویر */
.exam-secure img {
  -webkit-user-drag: none;
  pointer-events: none;
}

.exam-secure img.exam-question-image {
  pointer-events: auto;
}

/* ─── ناوگر سوالات ─── */

.exam-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.exam-nav-pill {
  align-items: center;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  min-width: 36px;
  padding: 0 0.4rem;
  transition: all 0.15s;
}

.exam-nav-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-active);
}

.exam-nav-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.exam-nav-pill.done {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary-active);
}

.exam-nav-pill.done.active {
  background: var(--color-primary);
  color: white;
}

/* ─── کارت سوال ─── */

.exam-question-card {
  animation: exam-q-fade 0.3s ease;
}

@keyframes exam-q-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.exam-question-image {
  border: 1px solid var(--color-border);
  max-height: 400px;
  object-fit: contain;
}

/* ─── آپلود فایل ─── */

.exam-file-upload {
  padding: 0.75rem;
  background: var(--color-surface-muted);
  border-radius: var(--radius-sm);
}

/* ─── overlay خروج از صفحه ─── */

.exam-leave-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 99999;
}

.exam-leave-box {
  align-items: center;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 400px;
}

.exam-leave-box h2 {
  font-size: 1.2rem;
  margin: 0;
}

.exam-leave-box p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 0;
}

/* ─── موبایل ─── */

@media (max-width: 768px) {
  .exam-nav-pills {
    gap: 0.3rem;
  }

  .exam-nav-pill {
    font-size: 0.76rem;
    height: 32px;
    min-width: 32px;
  }

  .exam-question-image {
    max-height: 280px;
  }
}
