/* Quiz-specific styles — Question Screen, Timer, Answer Buttons */

/* Question Header */
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Progress Indicator */
.question-progress {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Countdown Timer */
.countdown-timer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  min-width: 80px;
}

.timer-text {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* Timer Bar Container */
.timer-bar-container {
  width: 100%;
  height: 6px;
  background-color: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.timer-bar {
  height: 100%;
  width: 100%;
  border-radius: 3px;
  transition: width 0.25s linear, background-color 0.3s ease;
}

/* Timer Color States */
.timer-bar.timer-green {
  background-color: var(--success);
}

.timer-bar.timer-yellow {
  background-color: var(--warning);
}

.timer-bar.timer-red {
  background-color: var(--racing-red);
}

/* Question Text */
.question-text {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--bg-card);
  border-radius: 8px;
  border-left: 4px solid var(--racing-red);
}

/* Answer Options Grid */
.answer-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

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

/* Answer Button */
.btn-answer {
  display: block;
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid var(--bg-input);
  border-radius: 8px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.btn-answer:hover {
  background-color: var(--bg-input);
  border-color: var(--racing-red);
  transform: translateY(-2px);
}

.btn-answer:active {
  transform: translateY(0);
}

.btn-answer:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  border-color: var(--bg-input);
  background-color: var(--bg-card);
}

/* Answer button colors — each option gets an accent on the left border */
.btn-answer:nth-child(1) {
  border-left: 4px solid #E10600;
}

.btn-answer:nth-child(2) {
  border-left: 4px solid #0090D0;
}

.btn-answer:nth-child(3) {
  border-left: 4px solid #FFF200;
}

.btn-answer:nth-child(4) {
  border-left: 4px solid #00C853;
}

.btn-answer:nth-child(1):hover {
  border-color: #E10600;
}

.btn-answer:nth-child(2):hover {
  border-color: #0090D0;
}

.btn-answer:nth-child(3):hover {
  border-color: #FFF200;
}

.btn-answer:nth-child(4):hover {
  border-color: #00C853;
}


/* Timer red-zone pulse animation */
.timer-bar.timer-red {
  animation: timerPulse 0.8s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Answer button selected states (correct/incorrect feedback) */
.btn-answer.answer-correct {
  background-color: rgba(0, 200, 83, 0.15);
  border-color: var(--success) !important;
  box-shadow: 0 0 12px rgba(0, 200, 83, 0.4);
  animation: glowCorrect 0.5s ease-out;
}

.btn-answer.answer-incorrect {
  background-color: rgba(255, 82, 82, 0.15);
  border-color: var(--error) !important;
  box-shadow: 0 0 12px rgba(255, 82, 82, 0.4);
  animation: glowIncorrect 0.5s ease-out;
}

@keyframes glowCorrect {
  0% { box-shadow: 0 0 0 rgba(0, 200, 83, 0); }
  50% { box-shadow: 0 0 20px rgba(0, 200, 83, 0.6); }
  100% { box-shadow: 0 0 12px rgba(0, 200, 83, 0.4); }
}

@keyframes glowIncorrect {
  0% { box-shadow: 0 0 0 rgba(255, 82, 82, 0); }
  50% { box-shadow: 0 0 20px rgba(255, 82, 82, 0.6); }
  100% { box-shadow: 0 0 12px rgba(255, 82, 82, 0.4); }
}
