/* Quiz Question */
#questionText {
  font-size: 2.2rem;
  margin-bottom: 5px;
  color: var(--text-primary, #F8FAFC);
}

.instruction {
  font-size: 0.9rem;
  color: var(--text-secondary, #8B949E);
  margin-bottom: 20px;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 25px;
}

.quiz-item {
  height: 100px;
  background-color: #adadad;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s;
  user-select: none;
}

.quiz-item:hover {
  filter: brightness(1.2);
}

.quiz-item.selected {
  background-color: #5a5a5c;
  color: white;
  outline: 2px solid #fff;
}

.quiz-item.error {
  background-color: #721c24 !important;
  animation: shake 0.4s ease-in-out;
}

.controls {
  margin-top: 20px;
}

.result-message {
  margin-top: 20px;
  padding: 20px;
  border-radius: 8px;
  line-height: 1.5;
}

.result-message h3 { font-size: 1.8rem; }
.result-message p { font-size: 1.2rem; }

.win { background-color: #538d4e; color: white; }
.loss { background-color: #9d656a; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 480px) {
  .quiz-item { font-size: 0.75rem; padding: 5px; }
  .quiz-grid { grid-template-columns: repeat(3, 1fr); }
}

.quiz-item.correct-permanent {
  background-color: #538d4e !important;
  color: white !important;
  border-color: #538d4e !important;
  cursor: default;
  transform: scale(1.05);
  pointer-events: none;
}

.quiz-item.error {
  background-color: #721c24 !important;
  border-color: #dc3545 !important;
  color: white !important;
}

#attemptsCounter {
  font-weight: bold;
  color: var(--text-secondary, #8B949E);
  font-size: 0.9rem;
}

.btn-disabled-red {
  opacity: 0.6;
  cursor: not-allowed;
}
