/* بوابة اختبار الطالب */
.exam-body {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--color-primary-dark) 0%, var(--color-primary) 45%, var(--color-primary-light) 100%);
}

.exam-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.exam-header-bar {
  text-align: center;
  color: white;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
}

.exam-header-bar h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.exam-header-bar p {
  opacity: 0.85;
  font-size: 0.95rem;
}

.exam-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  animation: fadeUp 0.35s ease;
}

.exam-step { display: none; }
.exam-step.active { display: block; }

.exam-timer-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--color-primary-dark);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exam-timer-bar .timer {
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent-light);
}

.exam-timer-bar.warning .timer {
  color: #fbbf24;
  animation: pulse 1s infinite;
}

.exam-timer-bar.danger .timer {
  color: #f87171;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.exam-progress {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.exam-progress .q-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: white;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--color-text-muted);
}

.exam-progress .q-dot.answered {
  background: #dbeafe;
  border-color: var(--color-primary-light);
  color: var(--color-primary);
}

.exam-progress .q-dot.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: scale(1.1);
}

.question-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.question-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  background: #fafbfc;
}

.option-item:hover {
  border-color: var(--color-primary-light);
  background: #f0f7ff;
}

.option-item.selected {
  border-color: var(--color-primary);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.option-item.selected .option-letter {
  background: var(--color-primary);
  color: white;
}

.exam-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.result-hero {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.result-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-md);
}

.result-score-circle .score-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.result-score-circle .score-label {
  font-size: 0.75rem;
  opacity: 0.9;
}

.student-info-bar {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  font-size: 0.9rem;
}

.student-info-bar strong {
  color: var(--color-primary);
}

.exam-footer-link {
  text-align: center;
  margin-top: 1.5rem;
}

.exam-footer-link a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  text-decoration: underline;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.confirm-modal.hidden { display: none; }

.confirm-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.confirm-box h3 {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.confirm-box p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

@media (max-width: 768px) {
  .exam-container {
    padding: 1rem 0.75rem 2rem;
  }

  .exam-header-bar h1 {
    font-size: 1.2rem;
  }

  .exam-header-bar p {
    font-size: 0.85rem;
  }

  .exam-timer-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .exam-nav-buttons {
    flex-direction: column-reverse;
  }

  .exam-nav-buttons .btn {
    width: 100%;
  }

  .confirm-actions {
    flex-direction: column;
  }

  .confirm-actions .btn {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .exam-card { padding: 1.25rem; }
  .question-text { font-size: 1rem; }
  .exam-progress .q-dot { width: 28px; height: 28px; font-size: 0.7rem; }
  .brand-logo--exam { width: 96px; }
}
