/* CRA Experiment Styles */

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --success-color: #27ae60;
  --error-color: #e74c3c;
  --background-color: #f5f6fa;
  --text-color: #2c3e50;
  --light-gray: #ecf0f1;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

/* jsPsych container */
#jspsych-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Cue words display */
.cue-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin: 40px 0;
  font-size: 2.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cue-word {
  padding: 15px 25px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Response input */
.response-container {
  text-align: center;
  margin: 30px 0;
}

.response-input {
  font-size: 1.5rem;
  padding: 15px 25px;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  text-align: center;
  width: 300px;
  transition: border-color 0.3s;
}

.response-input:focus {
  outline: none;
  border-color: var(--secondary-color);
}

/* Timer display */
.timer-display {
  text-align: center;
  font-size: 1.3rem;
  color: #7f8c8d;
  margin-bottom: 20px;
}

.timer-display.warning {
  color: var(--error-color);
  font-weight: bold;
}

/* Feedback display */
.feedback-container {
  text-align: center;
  margin: 20px 0;
}

.solution-display {
  font-size: 2rem;
  font-weight: 700;
  padding: 15px 30px;
  border-radius: 8px;
  display: inline-block;
}

.solution-correct {
  background-color: rgba(39, 174, 96, 0.15);
  color: var(--success-color);
  border: 2px solid var(--success-color);
}

.solution-incorrect {
  background-color: rgba(231, 76, 60, 0.15);
  color: var(--error-color);
  border: 2px solid var(--error-color);
}

/* Rating sliders */
.rating-container {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  margin: 20px auto;
  max-width: 700px;
}

.slider-question {
  margin: 25px 0;
}

.slider-label {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 10px;
  display: block;
}

.slider-endpoints {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-top: 5px;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--light-gray);
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--secondary-color);
  cursor: pointer;
  transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Untouched sliders are dimmed until the participant interacts */
input[type="range"].slider-untouched {
  opacity: 0.35;
}

input[type="range"].slider-untouched::-webkit-slider-thumb {
  background: #95a5a6;
}

.jspsych-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

/* Instructions */
.instructions-container {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  max-width: 800px;
  margin: 20px auto;
  line-height: 1.7;
}

.instructions-container h1 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.instructions-container h2 {
  color: var(--secondary-color);
  margin-top: 30px;
}

.example-box {
  background: var(--light-gray);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

/* Break screen */
.break-container {
  text-align: center;
  padding: 60px;
}

.break-container h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.progress-info {
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-bottom: 30px;
}

/* Buttons */
.jspsych-btn {
  font-size: 1.1rem;
  padding: 12px 35px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.jspsych-btn:hover {
  background: #2980b9;
}

/* Fixation cross */
.fixation {
  font-size: 4rem;
  text-align: center;
  color: var(--primary-color);
}

/* End screen */
.end-container {
  text-align: center;
  padding: 60px;
}

.end-container h1 {
  color: var(--success-color);
  margin-bottom: 20px;
}

/* Trial wrapper - keeps cues visible during ratings */
.trial-wrapper {
  padding: 20px;
}

.trial-header {
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
