* {
      user-select: none !important;
      -webkit-user-select: none !important;
      -ms-user-select: none !important;
    }

    /* …but re-enable it inside text inputs & textareas so participants can still type/cursor: */
    input, textarea {
      user-select: text !important;
      -webkit-user-select: text !important;
      -ms-user-select: text !important;
    }

    /* 2) Prevent image dragging (and most long-press save menus on mobile) */
    img {
      -webkit-user-drag: none !important;
      -webkit-touch-callout: none !important; /* iOS "Save image" on long-press */
      pointer-events: none !important;         /* blocks right-click on desktop */
    }

.jspsych-content {
  padding-bottom: 100px !important;
}

/* Sticky instructions like in PDF with scale numbering */
.jspsych-survey-likert-preamble {
  position: sticky !important;
  top: 0 !important;
  background-color: #f5f5f5 !important;
  z-index: 1000 !important;
  padding: 15px 0 !important;
  border-bottom: 2px solid #ddd !important;
  margin-bottom: 20px !important;
}

/* Scale numbers in sticky header - aligned with radio buttons */
.scale-numbers {
  display: flex !important;
  justify-content: space-between !important;
  width: 400px !important;
  margin: 10px 0 0 auto !important;
  padding: 0 20px !important;
}

.scale-numbers span {
  font-weight: bold !important;
  font-size: 14px !important;
  color: #333 !important;
  text-align: center !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  min-height: 60px !important;
  justify-content: flex-end !important;
}

/* Make the gray line invisible by making it white */
.jspsych-survey-likert-opts:before {
  background-color: white !important;
}

/* Hide individual question scale labels since they're now in header */
.jspsych-survey-likert-opt label {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .scale-numbers {
    max-width: 300px !important;
    padding: 0 10px !important;
  }
}

/* DESKTOP STYLING - PDF-like appearance */
@media screen and (min-width: 769px) {
  /* Horizontal layout: question text on left, scale on right */
  .jspsych-survey-likert-question {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    margin-bottom: 0 !important;
    padding: 15px 0 !important;
    min-height: 60px !important;
    width: 100% !important;
  }
  
  .jspsych-survey-likert-statement {
    flex: 0 0 60% !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    margin-bottom: 0 !important;
    margin-right: 20px !important;
    text-align: left !important;
    font-weight: normal !important;
  }
  
  .jspsych-survey-likert-opts {
    flex: 0 0 400px !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 0 20px 15px 20px !important;
    margin: 0 !important;
    margin-left: auto !important;
    align-items: center !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }
  
  .jspsych-survey-likert-opt {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    margin: 0 !important;
    flex: 1 !important;
  }
  
  .jspsych-survey-likert-opt label {
    display: none !important;
  }
  
  /* Make radio buttons prominent like in PDF */
  .jspsych-survey-likert-opt input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    margin: 5px auto !important;
    display: block !important;
  }
  
  /* Preamble styling - override for desktop since sticky is handled above */
  .jspsych-survey-likert-preamble {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
}

/* Mobile responsive styles for jsPsych */
@media screen and (max-width: 768px) {
  .jspsych-content-wrapper {
    width: 95% !important;
    margin: 10px auto !important;
    padding: 10px !important;
  }
  
  .jspsych-content {
    max-width: 100% !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
  
  /* Mobile sticky header adjustments */
  .scale-numbers {
    width: 100% !important;
    max-width: 400px !important;
    margin: 10px auto 0 auto !important;
    padding: 0 5px !important;
  }
  
  .scale-numbers span {
    font-size: 11px !important;
    min-height: 45px !important;
  }
  
  /* Mobile horizontal layout */
  .jspsych-survey-likert-question {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    margin-bottom: 20px !important;
    padding: 15px 0 !important;
    min-height: auto !important;
  }
  
  .jspsych-survey-likert-statement {
    flex: none !important;
    font-size: 16px !important;
    margin-bottom: 15px !important;
    margin-right: 0 !important;
    text-align: left !important;
  }
  
  .jspsych-survey-likert-opts {
    flex: none !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 0 5px 15px 5px !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }
  
  /* Make gray line invisible on mobile too */
  .jspsych-survey-likert-opts:before {
    background-color: white !important;
  }
  
  /* Likert scale mobile adjustments */
  .jspsych-survey-likert-opt {
    margin: 8px 4px !important;
    font-size: 12px !important;
    color: white !important;
  }
  
  .jspsych-survey-likert-opt label {
    display: none !important;
    font-size: 12px !important;
    padding: 8px 4px !important;
    word-wrap: break-word !important;
    text-align: center !important;
  }
  
  /* Survey text inputs - enhanced for mobile */
  .jspsych-survey-text-question {
    margin: 20px 0 !important;
  }
  
  .jspsych-survey-text-question p {
    font-size: 16px !important;
    margin-bottom: 10px !important;
    line-height: 1.4 !important;
    padding: 0 10px !important;
  }
  
  .jspsych-survey-text-question input[type="text"] {
    width: 100% !important;
    font-size: 16px !important;
    padding: 15px 12px !important;
    border: 2px solid #ccc !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: white !important;
    margin: 0 10px !important;
    max-width: calc(100% - 20px) !important;
  }
  
  .jspsych-survey-text-question input[type="text"]:focus {
    border-color: #4CAF50 !important;
    outline: none !important;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3) !important;
  }
  
  /* Preamble for demographics */
  .jspsych-survey-text-preamble {
    font-size: 16px !important;
    margin-bottom: 25px !important;
    line-height: 1.4 !important;
    padding: 0 10px !important;
  }
  
  /* Buttons - White with black outline (jsPsych default) */
  .jspsych-btn {
    font-size: 18px !important;
    padding: 15px 25px !important;
    margin: 10px 5px !important;
    min-height: 48px !important;
    border-radius: 6px !important;
    background-color: white !important;
    color: black !important;
    border: 2px solid black !important;
    cursor: pointer !important;
  }
  
  .jspsych-btn:hover {
    background-color: #f0f0f0 !important;
  }
  
  /* Images (for colorblind test) */
  .jspsych-content img {
    max-width: 90% !important;
    height: auto !important;
    margin: 10px auto !important;
    display: block !important;
  }
  
  /* Preamble text */
  .jspsych-survey-likert-preamble {
    font-size: 16px !important;
    margin-bottom: 20px !important;
    line-height: 1.4 !important;
  }
  
  /* Make radio buttons larger for touch */
  input[type="radio"] {
    transform: scale(1.5) !important;
    margin: 5px !important;
  }
  
  /* Mobile-only positioning for sticky header numbers */
  /* 7-point scale adjustments */
  .mobile-7-adjust-1 { transform: translateX(10px) !important; }
  .mobile-7-adjust-2 { transform: translateX(10px) !important; }
  .mobile-7-adjust-3 { transform: translateX(10px) !important; }
  .mobile-7-adjust-4 { transform: translateX(10px) !important; }
  .mobile-7-adjust-5 { transform: translateX(10px) !important; }
  .mobile-7-adjust-6 { transform: translateX(10px) !important; }
  .mobile-7-adjust-7 { transform: translateX(-3px) !important; }
  
  /* 5-point scale adjustments */
  .mobile-5-adjust-1 { transform: translateX(10px) !important; }
  .mobile-5-adjust-2 { transform: translateX(10px) !important; }
  .mobile-5-adjust-3 { transform: translateX(10px) !important; }
  .mobile-5-adjust-4 { transform: translateX(10px) !important; }
  .mobile-5-adjust-5 { transform: translateX(5px) !important; }
}



/* Very small screens */
@media screen and (max-width: 480px) {
  .jspsych-survey-likert-opt label {
    font-size: 10px !important;
    padding: 6px 2px !important;
  }
  
  .jspsych-btn {
    width: 100% !important;
    margin: 10px 0 !important;
  }
  
  .jspsych-content img {
    max-width: 95% !important;
  }
}

/* Ensure proper viewport behavior */
.jspsych-display-element {
  overflow-x: hidden !important;
}

/* Fix any horizontal scrolling issues */
body {
  overflow-x: hidden !important;
}

/* Default button styling for all screen sizes */
.jspsych-btn {
  background-color: white !important;
  color: black !important;
  border: 2px solid black !important;
}

.jspsych-btn:hover {
  background-color: #f0f0f0 !important;
}