/* Modern Light Theme */
:root {
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent-bg: #eff6ff;
  --border-color: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* JsPsych Content Container override */
.jspsych-content-wrapper {
  background: var(--bg-color);
}

.jspsych-content {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 800px;
  /* Reduced max-width for better readability */
  width: 90%;
  margin: 20px auto;
}

h1,
h2,
h3 {
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-main);
  font-size: 1.05rem;
}

/* Modern Button Styling */
.jspsych-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  white-space: normal;
  /* Force text wrap */
  line-height: 1.4;
  max-width: 100%;
  /* Prevent overflow */
}

.jspsych-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

/* Option/Choice Buttons Layout */
.option-btn-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  width: 100%;
}

/* Make choice buttons slightly larger and white with border */
.choice-btn {
  background-color: white !important;
  color: var(--text-main) !important;
  border: 2px solid var(--border-color) !important;
  padding: 20px !important;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Center text */
  margin: 0 !important;
  /* Remove default margin when in grid */
  width: 100%;
}

@media (max-width: 600px) {
  .option-btn-container {
    grid-template-columns: 1fr;
    /* Stack on small screens */
  }
}

/* Modern Table Styling */
.profile-table-container {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

.profile-table {
  width: 100%;
  max-width: 650px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.profile-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--text-main);
  font-size: 1rem;
}

.profile-table tr:last-child td {
  border-bottom: none;
}

.profile-label-cell {
  background-color: var(--accent-bg);
  font-weight: 600;
  width: 30%;
  color: var(--text-main);
  border-right: 1px solid var(--border-color);
}

.profile-section-header {
  background-color: #e2e8f0;
  text-align: center;
  font-weight: 700;
  padding: 10px;
  color: var(--text-main);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .profile-label-cell {
    width: 40%;
  }
}

.loader {
  border: 5px solid #f3f3f3;
  border-radius: 50%;
  border-top: 5px solid var(--primary);
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Inputs */
input[type="text"],
input[type="number"] {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  width: 200px;
}

/** User Customizations **/
input[type="range"]::-webkit-slider-runnable-track {
  background: #dddddd;
  /* or any color you want */
}