.file-upload-zone {
  border: 3px dashed #9333ea;
  transition: all 0.3s ease;
}
.file-upload-zone.dragover {
  background-color: #f3e8ff;
  border-color: #7c3aed;
}
.question-index-item {
  transition: all 0.2s;
}
.question-index-item:hover {
  background-color: #f3f4f6;
}
.question-index-item.current {
  background-color: #ddd6fe;
  font-weight: 600;
}
.question-index-item.answered {
  background-color: #d1fae5;
}

/* Fix dark mode contrast for correct answers */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  }
  .bg-white {
    background-color: #1f2937 !important;
    color: #f3f4f6;
  }
  .text-gray-800 {
    color: #f3f4f6 !important;
  }
  .bg-green-50 {
    background-color: #065f46 !important;
    color: #ecfdf5 !important; /* Better visibility */
  }
  .bg-red-50 {
    background-color: #7f1d1d !important;
    color: #fee2e2 !important;
  }
  .bg-gray-50 {
    background-color: #374151 !important;
    color: #f3f4f6;
  }

  /* === Dark mode readability fix for correct answers === */
  @media (prefers-color-scheme: dark) {
    .bg-green-50 {
      background-color: #065f46 !important;
      color: #f9fafb !important;
    }
    /* === Fix Previous Button visibility in dark mode === */
    #prevBtn {
      background-color: #374151 !important; /* dark gray */
      color: #f3f4f6 !important; /* light text */
    }
    #prevBtn:hover {
      background-color: #4b5563 !important;
    }
    /* Text visibility adjustments */
    .text-gray-600,
    .text-gray-700,
    .text-gray-800 {
      color: #e5e7eb !important; /* Light gray */
    }

    /* Filter and header summaries */
    summary,
    #headerDetails summary,
    #categoryFilterDetails summary {
      color: #e5e7eb !important;
    }

    /* Sidebar and badges */
    h3.font-bold,
    .font-semibold.text-gray-800,
    .font-bold.text-gray-800 {
      color: #f9fafb !important;
    }

    /* Option text inside answers */
    #optionsContainer button span,
    #optionsContainer button {
      color: #f3f4f6 !important;
    }

    /* Explanation box fix */
    #explanationBox {
      background-color: #1e3a5f !important;
      color: #dbeafe !important;
      border-left-color: #3b82f6 !important;
    }

    #explanationBox h3 {
      color: #bfdbfe !important;
    }

    /* Result stats text (Correct/Incorrect/Unanswered) */
    #resultsModal .text-gray-600 {
      color: #d1d5db !important;
    }

    /* Category filter dropdown */
    select {
      background-color: #374151 !important;
      color: #f9fafb !important;
      border-color: #4b5563 !important;
    }
  }

  #questionWrapper {
    transition: all 0.3s ease-in-out;
  }
}
