.quiz-page { padding: 24px 40px; max-width: 900px; margin: 0 auto; }
.loading-center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 16px; }
.loading-text { font-size: 14px; color: var(--text-muted); }
.error-state, .success-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 16px; text-align: center; }
.error-state h2, .success-state h2 { color: var(--text-primary); font-size: 22px; margin: 0; }
.success-state p { color: var(--text-muted); }

.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 16px; }
.quiz-title-area h1 { color: var(--text-primary); font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.q-counter { color: var(--text-muted); font-size: 13px; }

/* Right cluster groups violation badge + fullscreen indicator + timer */
.header-right-cluster { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Violation Badge */
.violation-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--warning-light); border: 1px solid var(--warning-border);
  color: var(--warning); padding: 7px 14px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 700; transition: all 0.3s;
}
.violation-badge .material-symbols-rounded { font-size: 18px; }
.violation-badge.critical {
  background: var(--danger-light); border-color: var(--danger-border);
  color: var(--danger); animation: pulse 1s infinite;
}

/* Fullscreen indicator */
.fullscreen-indicator {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-md);
  border: 1px solid var(--border-color); background: var(--bg-card);
  color: var(--text-muted); transition: all 0.3s; cursor: default;
}
.fullscreen-indicator.active {
  border-color: var(--success-border); background: var(--success-light);
  color: var(--success);
}
.fullscreen-indicator .material-symbols-rounded { font-size: 20px; }

.timer {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  padding: 10px 20px; border-radius: var(--radius-md); transition: all 0.3s;
}
.timer .material-symbols-rounded { font-size: 20px; color: var(--text-muted); }
.timer.warning { border-color: var(--warning-border); background: var(--warning-light); }
.timer.danger { border-color: var(--danger-border); background: var(--danger-light); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.7; } }
.timer-value { color: var(--text-primary); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.warning .timer-value { color: var(--warning); }
.timer.danger .timer-value { color: var(--danger); }

.progress-track { width: 100%; height: 4px; background: var(--bg-tertiary); border-radius: 2px; margin-bottom: 24px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent-gradient); border-radius: 2px; transition: width 0.3s ease; }

.question-card { margin-bottom: 24px; }
.q-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.q-badge { background: var(--accent-primary-light); color: var(--accent-primary); padding: 6px 14px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; }
.q-text { color: var(--text-primary); font-size: 17px; font-weight: 600; line-height: 1.6; margin: 0 0 24px; }

.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 18px; background: var(--bg-input);
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  color: var(--text-primary); font-size: 14px; cursor: pointer;
  transition: all 0.2s; text-align: left; font-family: inherit;
}
.option-btn:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.option-btn.selected { background: var(--accent-primary-light); border-color: var(--accent-primary); }
.option-letter {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--bg-tertiary); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
  color: var(--text-secondary); transition: all 0.2s;
}
.option-btn.selected .option-letter { background: var(--accent-primary); color: #fff; }
.option-text { flex: 1; }
.check-icon { color: var(--accent-primary); font-size: 20px; }

/* Dots: scrollable strip with arrow buttons */
.quiz-nav { display: flex; justify-content: center; align-items: center; gap: 16px; position: relative; }
.quiz-nav .btn { position: absolute; }
.quiz-nav .btn:first-child { left: 0; }
.quiz-nav .btn:last-child { right: 0; }
.dots-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 350px;
  min-width: 0;
  overflow: hidden;
}
.dots-scroll-btn {
  flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
  padding: 0;
}
.dots-scroll-btn:hover { background: var(--bg-hover); border-color: var(--border-strong); color: var(--text-primary); }
.dots-scroll-btn .material-symbols-rounded { font-size: 20px; }
.question-dots {
  display: flex; gap: 6px;
  overflow-x: auto; flex: 1;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px;
}
.question-dots::-webkit-scrollbar { display: none; }
.dot {
  width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--border-color);
  background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.dot:hover { border-color: var(--border-strong); color: var(--text-primary); }
.dot.active { background: var(--accent-primary-light); border-color: var(--accent-primary); color: var(--accent-primary); }
.dot.answered { background: var(--success-light); border-color: var(--success-border); color: var(--success); }
.dot.active.answered { background: var(--accent-primary-light); border-color: var(--accent-primary); color: var(--accent-primary); }

/* ════════════════════════════════════════════════════
   Anti-Cheat Warning Modal
   ════════════════════════════════════════════════════ */

.ac-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 24px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.ac-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 40px 36px;
  max-width: 460px; width: 100%;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}

.ac-icon-wrap {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--warning-light); border: 2px solid var(--warning-border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.ac-icon-wrap.danger {
  background: var(--danger-light); border-color: var(--danger-border);
}
.ac-icon {
  font-size: 36px !important;
  color: var(--warning);
}
.ac-icon-wrap.danger .ac-icon { color: var(--danger); }

.ac-title {
  color: var(--text-primary);
  font-size: 20px; font-weight: 700;
  margin: 0; line-height: 1.3;
}

.ac-message {
  color: var(--text-secondary);
  font-size: 14px; line-height: 1.7;
  margin: 0;
}

/* Violation progress dots */
.ac-violation-dots {
  display: flex; gap: 10px; align-items: center; justify-content: center;
}
.ac-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-tertiary); border: 2px solid var(--border-color);
  transition: all 0.3s;
}
.ac-dot.filled {
  background: var(--danger); border-color: var(--danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}
.ac-dot-label {
  color: var(--text-muted); font-size: 12px; margin: -4px 0 0;
}

.ac-dismiss-btn {
  width: 100%; justify-content: center; gap: 8px; font-size: 14px;
  padding: 12px 24px; border-radius: var(--radius-md);
}

.ac-note {
  color: var(--text-muted); font-size: 12px; margin: 0; line-height: 1.5;
}

.ac-submitting {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 14px;
}

/* ════════════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .quiz-page { padding: 16px; }
  .question-card { padding: 20px; }
  .quiz-nav { flex-direction: column; position: static; }
  .quiz-nav .btn { position: static; width: 100%; }
  .dots-wrapper { order: -1; width: 100%; flex: 1; max-width: none; }
  .header-right-cluster { width: 100%; justify-content: flex-end; }
  .ac-modal { padding: 28px 20px; }
}
