/* ─── Deduction / Reasoning Quiz Phase ─── */

#screen-deduction {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 16px;
  gap: 16px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(26, 10, 46, 0.85) 0%, rgba(26, 10, 46, 0.9) 100%), url('../assets/backgrounds/investigation_bg.webp') center/cover no-repeat;
}

.deduction-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deduction-intro {
  font-size: 14px;
  color: var(--color-text-secondary, #a89cc8);
  text-align: center;
  margin-bottom: 4px;
  opacity: 0;
  animation: deductionFadeIn 0.5s ease forwards;
}

/* Question Card */
.deduction-question-card {
  background: linear-gradient(135deg, rgba(42, 26, 78, 0.95), rgba(30, 18, 58, 0.95));
  border: 2px solid var(--color-accent, #ff6b6b);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.15);
  opacity: 0;
  animation: deductionSlideUp 0.5s ease 0.3s forwards;
}

.deduction-question-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text, #e8d8f8);
}

/* Options Grid */
.deduction-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  opacity: 0;
  animation: deductionSlideUp 0.4s ease 0.6s forwards;
}

/* Individual Option Card */
.deduction-option-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(42, 26, 78, 0.7);
  border: 2px solid rgba(120, 100, 160, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text, #e8d8f8);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.deduction-option-btn::before {
  content: attr(data-letter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(120, 100, 160, 0.25);
  color: var(--color-accent, #ff6b6b);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.deduction-option-btn:hover {
  border-color: rgba(255, 107, 107, 0.5);
  background: rgba(42, 26, 78, 0.9);
  transform: translateX(4px);
}

.deduction-option-btn:hover::before {
  background: rgba(255, 107, 107, 0.2);
}

.deduction-option-btn:active {
  transform: translateX(2px) scale(0.99);
}

/* Selected states */
.deduction-option-btn.correct {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.12);
  box-shadow: 0 0 16px rgba(76, 175, 80, 0.2);
  animation: deductionCorrectPop 0.4s ease;
}

.deduction-option-btn.correct::before {
  background: #4caf50;
  color: #fff;
  content: "✓";
}

.deduction-option-btn.wrong {
  border-color: #f44336;
  background: rgba(244, 67, 54, 0.08);
  animation: deductionShake 0.4s ease;
}

.deduction-option-btn.wrong::before {
  background: #f44336;
  color: #fff;
  content: "✗";
}

.deduction-option-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
}

.deduction-option-btn.disabled:not(.correct):not(.wrong) {
  border-color: rgba(120, 100, 160, 0.15);
}

/* Feedback Card */
.deduction-feedback {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text, #e8d8f8);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.deduction-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

.deduction-feedback.correct {
  background: rgba(76, 175, 80, 0.08);
  border-left: 4px solid #4caf50;
}

.deduction-feedback.wrong {
  background: rgba(244, 67, 54, 0.06);
  border-left: 4px solid #f44336;
}

.deduction-feedback p {
  margin: 0 0 8px 0;
}

.deduction-feedback p:last-child {
  margin-bottom: 0;
}

/* Continue Button */
.deduction-continue-btn {
  margin-top: 8px;
  padding: 12px 32px;
  opacity: 0;
  animation: deductionFadeIn 0.3s ease forwards;
}

/* Animations */
@keyframes deductionFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes deductionSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes deductionCorrectPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes deductionShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
