#shared/quiz-engine.css
#quiz-app {
  max-width: 900px;
  margin: 2rem auto;
  font-family: Inter, -apple-system, sans-serif;
}
.quiz-header {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.quiz-header h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
}
.quiz-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.9rem;
}
.quiz-best-score {
  float: right;
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  margin-left: 1rem;
}
.progress-indicator {
  float: right;
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
}
.questions-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
}
.question-block {
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
}
.question-block:last-child {
  border-bottom: none;
}
.question-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.question-number {
  background: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 30px;
  text-align: center;
}
.question-number.answered {
  background: #3b82f6;
  color: white;
}
.module-link {
  font-size: 0.7rem;
  color: #2563eb;
  text-decoration: none;
  margin-left: 8px;
}
.module-link:hover {
  text-decoration: underline;
}
.category-badge {
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}
.question-text {
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
}
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.option {
  display: flex;
  align-items: flex-start;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.option:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.option.selected {
  background: #eff6ff;
  border-color: #3b82f6;
}
.option input[type="radio"] {
  margin-right: 0.5rem;
  margin-top: 0.1rem;
  cursor: pointer;
}
.option-label {
  font-size: 0.9rem;
  line-height: 1.3;
  cursor: pointer;
}
.submit-section {
  margin-top: 2rem;
  text-align: center;
}
.quiz-button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.quiz-button:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.quiz-button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}
.warning {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}
.results-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
}
.score-display {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 12px;
  margin-bottom: 2rem;
}
.score-display h2 {
  margin: 0 0 0.5rem 0;
  color: #1e40af;
}
.score-percentage {
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.results-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.result-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
}
.result-item.correct {
  border-color: #10b981;
  background: #f0fdf4;
}
.result-item.incorrect {
  border-color: #ef4444;
  background: #fef2f2;
}
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.result-question {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.result-answer {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}
.user-answer {
  background: #fee2e2;
}
.correct-answer {
  background: #dcfce7;
}
.explanation {
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 4px;
  border-left: 3px solid #8b5cf6;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.restart-btn {
  background: #3b82f6;
  color: white;
  margin: 2rem auto;
  display: block;
}

/* Numeric input type */
.numeric-input-container {
  max-width: 300px;
}
.numeric-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  transition: all 0.2s;
  outline: none;
  box-sizing: border-box;
}
.numeric-input:focus {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.numeric-input::placeholder {
  color: #9ca3af;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 0.9rem;
}

/* Ordering question type */
.ordering-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ordering-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  transition: all 0.2s;
}
.ordering-item:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.ordering-select {
  width: 52px;
  padding: 0.4rem 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  background: white;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ordering-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.ordering-item-text {
  font-size: 0.9rem;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .options {
    grid-template-columns: 1fr;
  }
}
