.exam-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}
.exam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  position: sticky;
  top: 10px;
  z-index: 10;
  will-change: transform;
}
.exam-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-heading);
}
.exam-timer.warning { color: var(--error); animation: pulse 1s ease-in-out infinite; }

/* Progress bar */
.exam-progress-bar {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 3px;
  margin-bottom: 8px;
  overflow: hidden;
}
.exam-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #2BB8E0);
  border-radius: 3px;
  transition: width .4s ease;
}
.exam-progress-text {
  font-size: .78rem;
  color: var(--text-muted);
  text-align: left;
  margin-bottom: 16px;
}
.exam-progress-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 8px 0;
}
.exam-progress-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  background: var(--card);
  color: var(--text-secondary);
  font-size: .75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.exam-progress-dot.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.exam-progress-dot.answered { border-color: var(--success); background: var(--success-bg); color: var(--success); }
.exam-progress-dot.wrong { border-color: var(--error); background: rgba(239,68,68,.12); color: var(--error); }

/* Question card */
.exam-question {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  animation: fadeUp .3s ease;
}
.exam-question h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.7;
}
.exam-question .media-wrap {
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.exam-question .media-wrap img,
.exam-question .media-wrap video {
  max-width: 100%;
  border-radius: var(--radius-md);
  display: block;
}
.exam-question .media-wrap iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--radius-md);
}

/* Options */
.exam-options { display: flex; flex-direction: column; gap: 10px; }
.exam-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--bg-alt);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: .95rem;
  user-select: none;
}
.exam-option:hover {
  border-color: var(--primary-light);
  background: rgba(35,156,196,.05);
}
.exam-option.selected {
  border-color: var(--primary);
  background: rgba(35,156,196,.1);
}
.exam-option input[type="radio"],
.exam-option input[type="checkbox"] { display: none; }
.exam-option .radio-circle {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.exam-option.selected .radio-circle {
  border-color: var(--primary);
  background: var(--primary);
}
.exam-option.selected .radio-circle::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
}
.exam-option .check-box {
  width: 20px; height: 20px;
  border-radius: 4px;
  border: 2px solid var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.exam-option.selected .check-box {
  border-color: var(--primary);
  background: var(--primary);
}
.exam-option.selected .check-box::after {
  content: '';
  width: 6px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

/* Dropdown */
.exam-dropdown {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
.exam-dropdown:focus { border-color: var(--primary); outline: none; }

/* Text input */
.exam-text-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--card);
  color: var(--text);
  transition: var(--transition);
  resize: vertical;
}
.exam-text-input:focus { border-color: var(--primary); outline: none; }
.exam-text-input.large { min-height: 120px; }

/* Navigation */
.exam-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

/* Save indicator */
.save-indicator {
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.save-indicator.saving { color: var(--accent); }
.save-indicator.saved { color: var(--success); }

/* Warning banner */
.exam-warning {
  background: rgba(239,68,68,.1);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: .85rem;
  margin-top: 12px;
  text-align: center;
}

/* Submit area */
.exam-submit-area {
  text-align: center;
  padding: 60px 20px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.exam-submit-area .success-icon { width: 80px; height: 80px; margin: 0 auto 16px; color: var(--success); }

/* Offline banner */
.offline-banner {
  background: rgba(239,68,68,.12);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: .82rem;
  margin-bottom: 12px;
  display: none;
  align-items: center;
  gap: 8px;
}

/* Review mode */
.exam-option.correct {
  border-color: var(--success);
  background: rgba(34,197,94,.1);
}
.exam-option.wrong {
  border-color: var(--error);
  background: rgba(239,68,68,.1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

@media (max-width:768px) {
  .exam-header { flex-direction: column; gap: 8px; }
  .exam-question { padding: 16px; }
}
