/* Playground Page Styles */
:root {
  /* Base colors */
  --accent-color: #6366f1;  /* Indigo 500 */
  --accent-light: #a5b4fc;  /* Indigo 300 */
  --accent-dark: #4f46e5;   /* Indigo 600 */
  
  /* Neutral colors */
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #111827;
  
  /* Semantic colors */
  --success-color: #10b981;  /* Emerald 500 */
  --error-color: #ef4444;    /* Red 500 */
  --warning-color: #f59e0b;  /* Amber 500 */
  --info-color: #3b82f6;     /* Blue 500 */
  
  /* UI colors */
  --bg-color: var(--neutral-50);
  --text-color: var(--neutral-800);
  --border-color: var(--neutral-200);
  --card-bg: white;
  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --modal-overlay: rgba(0, 0, 0, 0.5);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --text-muted: var(--neutral-500);
  
  /* Borders */
  --radius-sm: 0.25rem;
  --radius: 0.375rem;
  --radius-lg: 0.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-base: all 0.2s ease-in-out;
  
  /* Legacy variables for backward compatibility */
  --background-color: var(--neutral-50);
  --primary-color: var(--accent-color);
  --primary-dark: var(--accent-dark);
  --secondary-color: var(--neutral-500);
  --text-light: var(--neutral-500);
  --card-background: var(--card-bg);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

*, *::before, *::after {
  box-sizing: border-box;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button, select {
  text-transform: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
  -webkit-appearance: button;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-sm {
  max-width: 640px;
}

.container-md {
  max-width: 768px;
}

.container-lg {
  max-width: 1024px;
}

.container-xl {
  max-width: 1280px;
}

.container-fluid {
  max-width: none;
}

/* Grid system */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}

.col {
  flex: 1 0 0%;
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

.col-auto {
  flex: 0 0 auto;
  width: auto;
}

.col-1 { flex: 0 0 auto; width: 8.333333%; }
.col-2 { flex: 0 0 auto; width: 16.666667%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-4 { flex: 0 0 auto; width: 33.333333%; }
.col-5 { flex: 0 0 auto; width: 41.666667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-7 { flex: 0 0 auto; width: 58.333333%; }
.col-8 { flex: 0 0 auto; width: 66.666667%; }
.col-9 { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.333333%; }
.col-11 { flex: 0 0 auto; width: 91.666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

@media (min-width: 576px) {
  .col-sm-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-sm-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .col-sm-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-sm-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
  .col-sm-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-sm-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-sm-9 { flex: 0 0 auto; width: 75%; }
  .col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-sm-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-sm-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 768px) {
  .col-md-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-md-9 { flex: 0 0 auto; width: 75%; }
  .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-md-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 992px) {
  .col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-lg-9 { flex: 0 0 auto; width: 75%; }
  .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 1200px) {
  .col-xl-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-xl-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
  .col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-xl-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-xl-6 { flex: 0 0 auto; width: 50%; }
  .col-xl-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-xl-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-xl-9 { flex: 0 0 auto; width: 75%; }
  .col-xl-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-xl-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-xl-12 { flex: 0 0 auto; width: 100%; }
}

/* Spacing utilities */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 1rem; }
.m-4 { margin: 1.5rem; }
.m-5 { margin: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 1rem; }
.ml-4 { margin-left: 1.5rem; }
.ml-5 { margin-left: 3rem; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }
.mr-4 { margin-right: 1.5rem; }
.mr-5 { margin-right: 3rem; }

.mx-0 { margin-left: 0; margin-right: 0; }
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-3 { margin-left: 1rem; margin-right: 1rem; }
.mx-4 { margin-left: 1.5rem; margin-right: 1.5rem; }
.mx-5 { margin-left: 3rem; margin-right: 3rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.my-0 { margin-top: 0; margin-bottom: 0; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-5 { margin-top: 3rem; margin-bottom: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 1rem; }
.pt-4 { padding-top: 1.5rem; }
.pt-5 { padding-top: 3rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pb-4 { padding-bottom: 1.5rem; }
.pb-5 { padding-bottom: 3rem; }

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: 0.25rem; }
.pl-2 { padding-left: 0.5rem; }
.pl-3 { padding-left: 1rem; }
.pl-4 { padding-left: 1.5rem; }
.pl-5 { padding-left: 3rem; }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: 0.25rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-3 { padding-right: 1rem; }
.pr-4 { padding-right: 1.5rem; }
.pr-5 { padding-right: 3rem; }

.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-5 { padding-left: 3rem; padding-right: 3rem; }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

.playground-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.header-content {
  display: flex;
  align-items: center;
}

.playground-header h1 {
  margin: 0;
  color: var(--accent-color);
  font-weight: 700;
  font-size: 1.75rem;
}

.main-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 1.5rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
  align-items: center;
}

.main-nav a {
  color: var(--neutral-700);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.main-nav a.active {
  color: var(--accent-color);
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
}

.main-nav a.credit-link {
  display: flex;
  align-items: center;
  background-color: var(--neutral-100);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
}

.main-nav a.credit-link:hover {
  background-color: var(--neutral-200);
}

.main-nav a.signup-link {
  background-color: var(--accent-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.main-nav a.signup-link:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
  text-decoration: none;
}

@media (max-width: 768px) {
  .responses-layout {
    grid-template-columns: 1fr;
  }
  
  .responses-list {
    max-height: 300px;
  }
  /* ... any other 768px rules ... */
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.credit-balance {
  font-size: 0.9rem;
  color: var(--neutral-700);
  background: none;
  border: none;
  box-shadow: none;
}

.credit-balance strong {
  color: var(--accent-color);
  font-weight: 600;
}

.playground-card {
  background-color: var(--card-background);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.question-form {
  margin-bottom: 0rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--neutral-700);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--neutral-300);
  border-radius: 0.375rem;
  background-color: var(--neutral-50);
  color: var(--neutral-800);
  font-size: 1rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.1);
}

.form-control::placeholder {
  color: var(--neutral-400);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Select styles */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* Checkbox container */
.checkbox-container {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* Custom checkbox */
.checkbox-container input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--neutral-300);
  border-radius: 0.25rem;
  margin-right: 0.5rem;
  position: relative;
  cursor: pointer;
  background-color: var(--neutral-50);
}

.checkbox-container input[type="checkbox"]:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.checkbox-container input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.2rem;
  width: 0.3rem;
  height: 0.6rem;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.1);
}

.checkbox-container label {
  cursor: pointer;
  color: var(--neutral-700);
}

.checkbox-container:hover label {
  color: var(--neutral-900);
}

/* Radio button container */
.radio-container {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* Custom radio button */
.radio-container input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--neutral-300);
  border-radius: 50%;
  margin-right: 0.5rem;
  position: relative;
  cursor: pointer;
  background-color: var(--neutral-50);
}

.radio-container input[type="radio"]:checked {
  border-color: var(--accent-color);
}

.radio-container input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.3rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background-color: var(--accent-color);
}

.radio-container input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.1);
}

.radio-container label {
  cursor: pointer;
  color: var(--neutral-700);
}

.radio-container:hover label {
  color: var(--neutral-900);
}

/* Toggle switch */
.toggle-container {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.5rem;
  margin-right: 0.5rem;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--neutral-300);
  transition: .4s;
  border-radius: 1.5rem;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 1.1rem;
  width: 1.1rem;
  left: 0.2rem;
  bottom: 0.2rem;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--accent-color);
}

input:focus + .toggle-slider {
  box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.1);
}

input:checked + .toggle-slider:before {
  transform: translateX(1.5rem);
}

.toggle-container label {
  cursor: pointer;
  color: var(--neutral-700);
}

.toggle-container:hover label {
  color: var(--neutral-900);
}

/* Form validation */
.form-control.is-invalid {
  border-color: var(--error-color);
}

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--error-color);
}

/* Form help text */
.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--neutral-500);
}

.model-selection {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.model-column {
  flex: 1;
}

.model-column h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.model-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.model-actions a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.875rem;
  margin-right: 0.5rem;
}

.model-actions a:hover {
  text-decoration: underline;
  color: var(--accent-dark);
}

.delete-preset {
  margin-left: 0.25rem;
  color: var(--neutral-500);
  cursor: pointer;
  font-size: 0.75rem;
}

.delete-preset:hover {
  color: var(--error-color);
}

.preset-tooltip {
  visibility: hidden;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  background-color: var(--neutral-800);
  color: white;
  text-align: center;
  border-radius: 0.25rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}

.preset-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--neutral-800) transparent transparent transparent;
}

.preset-dropdown {
  position: relative;
  display: inline-block;
}

.preset-dropdown:hover .preset-tooltip {
  visibility: visible;
  opacity: 1;
}

/* Model list */
.model-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--neutral-200);
  border-radius: 0.25rem;
  padding: 0.75rem;
  background-color: var(--neutral-50);
}

.model-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0;
}

.model-item:last-child {
  margin-bottom: 0;
}

.model-item label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-700);
  cursor: pointer;
}

.model-item label:hover {
  color: var(--neutral-900);
}

/* Info banner */
.info-banner {
  background-color: var(--neutral-50);
  border-left: 4px solid var(--accent-color);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.25rem;
}

.info-banner p {
  margin: 0;
  color: var(--neutral-700);
  font-size: 0.875rem;
}

.info-banner strong {
  color: var(--accent-color);
}

/* Card styles */
.card {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid var(--neutral-200);
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--neutral-200);
  background-color: var(--neutral-50);
}

.card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--neutral-800);
}

.card-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--neutral-500);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--neutral-200);
  background-color: var(--neutral-50);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--neutral-900);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}

.small {
  font-size: 0.875rem;
}

.text-muted {
  color: var(--neutral-500);
}

.text-primary {
  color: var(--accent-color);
}

.text-success {
  color: var(--success-color);
}

.text-danger {
  color: var(--error-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-info {
  color: var(--info-color);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-justify {
  text-align: justify;
}

.text-nowrap {
  white-space: nowrap;
}

.text-lowercase {
  text-transform: lowercase;
}

.text-uppercase {
  text-transform: uppercase;
}

.text-capitalize {
  text-transform: capitalize;
}

.font-weight-light {
  font-weight: 300;
}

.font-weight-normal {
  font-weight: 400;
}

.font-weight-medium {
  font-weight: 500;
}

.font-weight-semibold {
  font-weight: 600;
}

.font-weight-bold {
  font-weight: 700;
}

.font-italic {
  font-style: italic;
}

.text-decoration-none {
  text-decoration: none;
}

.text-break {
  word-break: break-word;
  overflow-wrap: break-word;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Lists */
ul, ol {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 2rem;
}

ul ul, ol ol, ul ol, ol ul {
  margin-bottom: 0;
}

.list-unstyled {
  padding-left: 0;
  list-style: none;
}

.list-inline {
  padding-left: 0;
  list-style: none;
}

.list-inline-item {
  display: inline-block;
}

.list-inline-item:not(:last-child) {
  margin-right: 0.5rem;
}

/* Description Lists */
dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

dt {
  font-weight: 600;
}

dd {
  margin-bottom: 0.5rem;
  margin-left: 0;
}

.select-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 0rem;
}

.select-link {
  color: var(--accent-color);
  font-size: 0.875rem;
  text-decoration: none;
}

.select-link:hover {
  text-decoration: underline;
  color: var(--accent-dark);
}

.select-link.active {
  color: var(--accent-color);
  font-weight: 600;
}

.model-presets {
  margin-bottom: 1.5rem;
}

.model-presets h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.preset-name {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.preset-description {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Preset buttons in model actions */
.preset-dropdown {
  position: relative;
  display: inline-block;
}

/* Responsive adjustments for model actions */
@media (max-width: 768px) {
  .model-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .preset-tooltip {
    width: 100%;
    left: 0;
    transform: none;
  }
  
  .preset-tooltip::after {
    left: 20%;
  }
}

.btn-generate {
  background-color: var(--accent-color);
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  margin-top: 1rem;
}

.btn-generate:hover {
  background-color: var(--accent-dark);
}

.model-item input[type="checkbox"] {
  margin-right: 0.75rem;
  accent-color: var(--accent-color);
}

.timing-info {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

@keyframes highlight-pulse {
  0% { background-color: rgba(139, 92, 246, 0.2); }
  50% { background-color: rgba(139, 92, 246, 0.3); }
  100% { background-color: rgba(139, 92, 246, 0.2); }
}

.new-ranking {
  animation: highlight-pulse 2s ease-in-out;
}

.new-value {
  position: relative;
  font-weight: 600;
  color: var(--accent-color);
}

.new-value::after {
  content: "new";
  position: absolute;
  top: -0.5rem;
  right: -1.5rem;
  font-size: 0.625rem;
  background-color: var(--accent-color);
  color: white;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  opacity: 0.8;
}

.progress-bar {
  height: 0.5rem;
  background-color: #e2e8f0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: var(--radius-lg);
  transition: width 0.3s ease;
}

.ranking-progress {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

.rank-timing-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
}

/* Alert styles */
.alert {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem;
  border-radius: 0.25rem;
  background-color: var(--neutral-50);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
  max-width: 400px;
  border: 1px solid var(--neutral-200);
}

.alert-success {
  border-left: 4px solid var(--success-color);
}

.alert-error {
  border-left: 4px solid var(--error-color);
}

.alert-info {
  border-left: 4px solid var(--accent-color);
}

.alert-content {
  flex: 1;
  color: var(--neutral-800);
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  margin-left: 0.5rem;
  color: var(--neutral-400);
}

.alert-close:hover {
  color: var(--neutral-600);
}

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

.responses-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin-top: 2rem;
  animation: fadeIn 0.3s ease-out;
}

.responses-list {
  background-color: var(--card-background);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  height: fit-content;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.responses-list h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.responses-list-container {
  overflow-y: auto;
  flex-grow: 1;
}

.response-list-item {
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background-color: #f9fafb;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.response-list-item:last-child {
  margin-bottom: 0;
}

.response-list-item:hover {
  background-color: #f1f5f9;
}

.response-list-item.selected {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: var(--primary-color);
}

.response-list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.response-list-item-model {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-color);
}

.response-list-item-rank {
  background-color: var(--accent-color);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.response-list-item-timing {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.response-list-item-progress {
  margin-top: 0.5rem;
}

.response-list-item .progress-bar {
  height: 0.375rem;
  margin: 0.25rem 0;
}

.response-detail {
  background-color: var(--card-background);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.response-detail h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.response-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f9fafb;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.response-detail-model {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
}

.response-detail-rank {
  background-color: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
}

.response-detail-content {
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 0.9375rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  overflow-y: auto;
  max-height: 400px;
}

.response-detail-timing {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f9fafb;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.response-detail-rankings {
  margin-top: auto;
}

.response-detail-rankings h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.individual-rankings {
  background-color: #f9fafb;
  border-radius: var(--radius);
  padding: 0.75rem;
  border: 1px solid var(--border-color);
}

.no-responses-message,
.no-selection-message {
  color: var(--text-light);
  font-size: 0.9375rem;
  text-align: center;
  padding: 2rem 1rem;
  background-color: #f9fafb;
  border-radius: var(--radius);
  border: 1px dashed var(--border-color);
}

@keyframes highlight-new-item {
  0% { background-color: rgba(139, 92, 246, 0.2); }
  100% { background-color: transparent; }
}

.response-list-item.new-item {
  animation: highlight-new-item 2s ease-out;
}

.response-list-item-rank.new-rank {
  animation: pulse 1s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@media (max-width: 768px) {
  .responses-layout {
    grid-template-columns: 1fr;
  }
  
  .responses-list {
    max-height: 300px;
  }
}

/* Section titles */
.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 0.75rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--neutral-300);
}

/* Style for the main selected model count next to section titles */
.main-selected-count {
  color: var(--accent-dark); 
  font-size: 1em; 
  font-weight: 600;   
  margin-left: 0.1rem; 
}

/* Model groups */
.model-list-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--neutral-200);
  border-radius: 0.375rem;
  background-color: var(--neutral-50);
  padding: 0.5rem;
}

.model-group {
  margin-bottom: 0.75rem;
  border-radius: 0.25rem;
  overflow: hidden;
}

.model-group:last-child {
  margin-bottom: 0;
}

.model-group-header {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background-color: var(--neutral-100);
  cursor: pointer;
  border: 1px solid var(--neutral-200);
  border-radius: 0.25rem;
}

.model-group-header:hover {
  background-color: var(--neutral-200);
}

.model-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  font-weight: bold;
  color: var(--neutral-600);
}

.model-group-name {
  font-weight: 600;
  margin-left: 0.5rem;
}

.model-group-items {
  padding: 0.5rem;
  border: 1px solid var(--neutral-200);
  border-top: none;
  border-radius: 0 0 0.25rem 0.25rem;
  background-color: white;
  display: none;
}

.model-group.expanded .model-group-items {
  display: block;
}

.model-group.expanded .model-group-toggle {
  content: "-";
}

/* Save preset container */
.save-preset-container {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: -0.2rem;
}

.custom-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Action footer */
.action-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 1rem;
}

/* Primary button */
.btn-primary {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.3);
}

.btn-primary.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Save custom preset section */
.save-custom-preset-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  flex-wrap: nowrap;
  margin-bottom: 1rem;
}



#custom-preset-name {
  flex: 0 1 auto;
  min-width: 150px;
  max-width: 250px;
  height: 2rem;
  padding: 0.25rem 0.5rem;
}

@media (max-width: 768px) {
  .action-footer {
    flex-direction: column;
    gap: 1rem;
  }
  
  .save-custom-preset-section {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  
  #custom-preset-name {
    width: auto;
    flex: 1;
  }
}

.section-title .select-links {
  display: inline-flex;
  gap: 0.5rem;
  margin-left: 0.5rem;
  font-weight: normal;
}

.section-title .select-link {
  color: var(--accent-color);
  font-size: 0.875rem;
  text-decoration: none;
}

.section-title .select-link:hover {
  text-decoration: underline;
  color: var(--accent-dark);
}

/* Toggle models button */
.toggle-models-container {
  margin-top: 0.2rem;
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.toggle-models-btn {
  display: flex;
  align-items: center;
  background-color: var(--neutral-100);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition-base);
}

.toggle-models-btn:hover {
  background-color: var(--neutral-200);
}

.toggle-models-btn.active {
  background-color: var(--accent-light);
  color: var(--neutral-800);
}

/* Logo styles */
.section-logo {
  
  height: 60px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Icon styles */
.section-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
}

.selection-icon {
  width: 13px;
  height: 13px;
  vertical-align: middle;
}

.toggle-img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

.toggle-icon-container {
  display: inline-block;
  vertical-align: middle;
}

/* User dropdown styles */
.user-dropdown {
  position: relative;
  display: inline-block;
  margin-right: 15px;
  cursor: pointer;
}

.user-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.user-dropdown:hover .user-icon {
  transform: scale(1.1);
}

.user-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: var(--card-bg);
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown-content a {
  color: var(--text-color);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.2s ease;
}

.user-dropdown-content a:hover {
  background-color: var(--neutral-100);
  text-decoration: none;
}

.user-dropdown:hover .user-dropdown-content {
  display: block;
  animation: fadeIn 0.2s ease;
}

.selected-count {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--neutral-600);
  background-color: var(--neutral-200);
  padding: 2px 6px;
  border-radius: 10px;
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

.toggle-models-btn.active .selected-count {
  background-color: rgba(255, 255, 255, 0.3);
  color: var(--neutral-800);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-overlay);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeIn 0.3s;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.close-modal {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neutral-500);
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: var(--neutral-800);
}

.modal-body {
  padding: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.modal-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin-top: 0.5rem;
}

.modal-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.modal-btn-cancel {
  background-color: var(--neutral-200);
  color: var(--neutral-700);
  border: 1px solid var(--neutral-300);
}

.modal-btn-cancel:hover {
  background-color: var(--neutral-300);
}

.modal-btn-save {
  background-color: var(--accent-color);
  color: white;
  border: 1px solid var(--accent-color);
}

.modal-btn-save:hover {
  background-color: var(--accent-dark);
}

/* Welcome Page Styles */
.welcome-header {
  text-align: center;
  margin: 3rem 0;
}

.welcome-header h1 {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.welcome-header .lead {
  font-size: 1.25rem;
  color: var(--neutral-600);
  max-width: 600px;
  margin: 0 auto;
}

.welcome-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.feature-item {
  padding: 1.5rem;
  border-radius: var(--radius);
  background-color: var(--neutral-50);
  border-left: 4px solid var(--accent-color);
}

.feature-item h2 {
  color: var(--accent-dark);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-item p {
  color: var(--neutral-700);
  margin: 0;
}

.welcome-actions {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Profile Page Styles */
.profile-info {
  margin-bottom: 2rem;
}

.profile-item {
  display: flex;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.profile-item:last-child {
  border-bottom: none;
}

.profile-label {
  font-weight: 600;
  width: 200px;
  color: var(--neutral-700);
}

.profile-value {
  flex: 1;
  color: var(--neutral-900);
}

.profile-actions {
  display: flex;
  gap: 1rem;
}

/* Styles for unavailable models */
.model-unavailable {
    color: var(--neutral-400);
    text-decoration: line-through;
    cursor: not-allowed;
}

.model-item input[type="checkbox"]:disabled + label {
    color: var(--neutral-400);
    text-decoration: line-through;
    cursor: not-allowed;
}

.model-item input[type="checkbox"]:disabled + label:hover {
    color: var(--neutral-400);
    background-color: transparent;
}

.status-info {
    margin-top: 8px;
    font-size: 14px;
    color: #555;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-info strong {
    color: #333;
}

/* Placeholder styles for response items */
.response-list-item.placeholder {
  background-color: #f9fafb;
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--info-color);
}

.response-list-item.placeholder .response-list-item-rank {
  background-color: var(--neutral-400);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

.response-list-item.placeholder::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.5) 60%,
    rgba(255, 255, 255, 0)
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.placeholder-snippet {
  margin-top: 0.5rem;
}

.placeholder-text {
  height: 0.75rem;
  margin-bottom: 0.5rem;
  background-color: #e5e7eb;
  border-radius: 0.25rem;
  width: 100%;
}

.placeholder-text.short {
  width: 60%;
}

.placeholder-loading {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--neutral-500);
}

.placeholder-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(var(--accent-color-rgb), 0.2);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  margin-right: 0.5rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.response-detail-placeholder {
  padding: 1rem;
}

.placeholder-header {
  margin-bottom: 1.5rem;
}

.placeholder-content {
  margin-bottom: 1.5rem;
}

.placeholder-footer {
  margin-top: 1rem;
}

.response-list-separator {
  margin: 1rem 0;
  text-align: center;
  position: relative;
  height: 1px;
  background-color: var(--border-color);
}

.response-list-separator span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--bg-color);
  padding: 0 1rem;
  font-size: 0.75rem;
  color: var(--neutral-500);
  white-space: nowrap;
}

.preset-label {
  font-size: 0.9rem;
  color: var(--neutral-600);
  margin-bottom: 0.5rem;
  margin-top: 0;
}

/* Button loading state */
.btn-primary.loading {
  background-color: var(--accent-dark);
  position: relative;
  color: transparent; /* Hide the original text */
}

.btn-primary.loading::after {
  content: attr(data-loading-text);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1rem;
  white-space: nowrap;
}

.btn-primary .spinner-inline {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Add these styles to the end of the file */
.placeholder-loading.timeout {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.placeholder-loading.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.timeout-icon, .error-icon {
    display: inline-block;
    margin-right: 8px;
}

.response-list-item.timed-out .response-list-item-rank {
    color: #856404;
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
}

.response-list-item.error .response-list-item-rank {
    color: #721c24;
    background-color: #f8d7da;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Add specific styling for timed out rank label */
.response-list-item-rank.timeout-rank {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
}

/* Add these styles below the styles we added earlier */
.timeout-message, .error-message {
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    display: flex;
    align-items: flex-start;
}

/* Styling for answer header */
.response-detail-header-card .response-detail-section-header {
    margin: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Apply timeout and error styles to header card */
.response-detail-header-card.timeout .response-detail-model,
.response-detail-content.timeout .response-detail-model {
    color: #856404;
}

.response-detail-header-card.error .response-detail-model,
.response-detail-content.error .response-detail-model {
    color: #721c24;
}

.response-detail-header-card.timeout .response-detail-rank,
.response-detail-content.timeout .response-detail-rank,
.response-detail-header-card.error .response-detail-rank,
.response-detail-content.error .response-detail-rank {
    opacity: 0.7;
}

/* Styles for the rank details card */
.rank-details-card {
    margin-top: 1rem;
}

.rank-details-card .response-detail-section-header {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
}

.rank-details-card .individual-rankings {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rank-details-card .individual-rankings > div {
    background-color: var(--neutral-100);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* Add styles for the header card */
.response-detail-header-card {
    background-color: var(--card-background);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow);
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-bottom: none;
    margin-bottom: 0;
}

/* Adjust the content card to connect with header */
.response-detail-content {
    background-color: var(--card-background);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

/* When directly after header card, adjust the border radius and margin */
.response-detail-header-card + .response-detail-content {
    border-radius: 0 0 var(--radius) var(--radius);
    margin-top: 0;
    border-top: none;
    max-height: 400px;
    overflow-y: auto;
    padding-top: 1rem;
}

/* Make the answer text scrollable */
.response-detail-answer-text {
    flex: 1;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* Styling for model name in header */
.response-detail-header-card .response-detail-model {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Styling for rank indicator in header */
.response-detail-header-card .response-detail-rank {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

/* Timeout and error message styles */
.timeout-message {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.timeout-message .timeout-icon,
.error-message .error-icon {
    font-size: 24px;
    margin-right: 15px;
}

/* Add these styles below the styles we added earlier */
.timeout-message, .error-message {
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    display: flex;
    align-items: flex-start;
}

/* Add styles for the response-list-item-status with smaller font */
.response-list-item-status {
    font-size: 0.85rem;
    color: var(--neutral-600);
    margin-top: 4px;
    line-height: 1.2;
}

.response-list-item-status.error,
.response-list-item-status.timeout {
    color: var(--error-color);
}

/* Style for the ranking progress bar container */
.ranking-progress-bar {
    height: 6px;
    background-color: var(--neutral-200);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
    width: 100%;
}

/* Style for the progress fill */
.ranking-progress-fill {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Add styles for the header container */
.response-detail-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Update the rank styling for proper sizing and positioning */
.response-detail-header-card .response-detail-rank {
    margin-bottom: 0;
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Adjust the model name to align properly with the rank */
.response-detail-header-card .response-detail-model {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
}

.preset-text-link {
    color: var(--accent-color);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
}

.preset-text-link:hover {
    text-decoration: underline;
    color: var(--accent-dark);
}

/* Combined active state for all link types */
.preset-text-link.active, 
.custom-preset-pill.active, 
.select-link.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* Custom preset styles */
.custom-presets {
    display: inline;
    margin-left: 5px;
}

.custom-preset-pill {
    display: inline-block;
    margin: 0 5px;
    color: var(--accent-color);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
}

.custom-preset-pill:hover {
    text-decoration: underline;
    color: var(--accent-dark);
}

.custom-preset-pill .remove-preset {
    color: var(--error-color);
    margin-left: 3px;
    font-size: 12px;
}

.custom-preset-pill .remove-preset:hover {
    color: #d32f2f;
}

/* Save preset text link style */
.save-preset-text {
    color: var(--accent-color);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.save-preset-text:hover {
    text-decoration: underline;
    color: var(--accent-dark);
}

.save-preset-container span {
  font-size: 0.875rem;
}

.preset-text-links {
    margin-bottom: 10px;
    font-size: 0.875rem;
}

.preset-text-links span {
    font-size: 0.875rem;
}

.preset-text-dropdown {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}

.preset-text-dropdown:hover .preset-tooltip {
    visibility: visible;
    opacity: 1;
}

.preset-text-link {
    color: var(--accent-color);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
}

.preset-text-link:hover {
    text-decoration: underline;
    color: var(--accent-dark);
}

/* Combined active state for all link types */
.preset-text-link.active, 
.custom-preset-pill.active, 
.select-link.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* Text-based preset styles with tooltips */
.preset-text-links {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0rem;
    align-items: center;
    flex-wrap: wrap;
}

.preset-text-links span {
    font-size: 0.875rem;
}

.preset-text-dropdown {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}

.preset-text-dropdown:hover .preset-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Footer Styles */
.playground-footer {
    background-color: #f9fafb;
    margin-top: 2rem;
    padding-top: 1rem;
}

.footer-separator {
    border: none;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--neutral-600);
    margin-left: 1rem;
    margin-right: 1rem;
}

.footer-left {
    /* Aligns with container padding, similar to logo */
}

.copyright-text {
    margin: 0;
}

.footer-right {
    display: flex;
    gap: 1.5rem; /* Matches main nav gap */
    /* Aligns with container padding, similar to user icon area */
}

.footer-right a {
    color: var(--neutral-600);
    text-decoration: none;
}

.footer-right a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Adjust footer alignment for smaller screens if needed */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center; /* Center items on smaller screens */
        text-align: center;
    }

    .footer-right {
        margin-top: 0.5rem;
    }
}

/* Notification Modal */
.notification-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notification-modal.show {
  opacity: 1;
}

.notification-content {
  position: relative;
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 450px;
  width: 90%;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.notification-modal.show .notification-content {
  transform: translateY(0);
}

.notification-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--neutral-500);
  cursor: pointer;
  transition: color 0.2s ease;
}

.notification-close:hover {
  color: var(--neutral-800);
}

.notification-message {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
}

/* Notification types */
.notification-success .notification-content {
  border-left: 4px solid var(--success-color);
}

.notification-error .notification-content {
  border-left: 4px solid var(--error-color);
}

.notification-info .notification-content {
  border-left: 4px solid var(--accent-color);
}

.notification-warning .notification-content {
  border-left: 4px solid var(--warning-color);
}

/* Mobile Navigation Styles (Adapted for Playground) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 5px 10px;
    /* margin-left: auto; /* Removed to allow space-between in header */
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 60px; /* Adjust as needed */
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000; /* Ensure it's above other content */
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav ul li {
    border-bottom: 1px solid #eee;
}

.mobile-nav ul li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}
.mobile-nav ul li a.credit-link-mobile {
    color: #555;
    font-weight: normal;
}

.tier-locked {
    color: #e74c3c;
    cursor: pointer;
}

.tier-popup {
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 250px;
}

/* Media Query for Mobile View */
@media (max-width: 992px) { /* Adjusted breakpoint for playground header */
    .playground-header {
        /* Ensure header is flex, space-between, and items centered vertically */
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap; /* Prevent wrapping */
        padding: 0.5rem 1rem; /* Add some padding */
    }

    .playground-header .header-content {
        /* Ensure logo container doesn't take unnecessary space */
        flex-shrink: 0;
    }

    .playground-header .main-nav,
    .playground-header .user-info {
        display: none; /* Hide desktop nav and user icon */
    }
    .mobile-menu-toggle {
        display: block; /* Show hamburger */
        margin-left: 0; /* Reset margin */
    }
    .mobile-nav.active {
        display: block; /* Show mobile nav when active */
    }
}

/* Ensure mobile toggle is hidden on larger screens */
@media (min-width: 993px) {
    .mobile-menu-toggle {
        display: none !important; /* Hide hamburger */
    }
    .mobile-nav {
        display: none !important; /* Hide mobile nav */
    }
}

/* Add styles for the header container */
.response-detail-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Container for copy button and rank */
.rank-and-copy-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Copy button styling */
.copy-response-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-height: 44px; /* Minimum touch target for mobile */
    min-width: 44px;
    background-color: var(--neutral-100);
    border: 1px solid var(--border-color);
}

.copy-response-btn:hover {
    background-color: var(--neutral-200);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

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

.copy-response-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Copy icon styling */
.copy-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.copy-response-btn:hover .copy-icon {
    opacity: 1;
}

/* Success state for copy button */
.copy-response-btn.copied {
    background-color: var(--success-color);
    border-color: var(--success-color);
    animation: copySuccess 0.3s ease;
}

.copy-response-btn.copied .copy-icon {
    opacity: 1;
    filter: brightness(0) invert(1); /* Make icon white */
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Update the rank styling for proper sizing and positioning */
.response-detail-header-card .response-detail-rank {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    background-color: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    height: 44px; /* Match copy button height */
}

/* Adjust the model name to align properly with the rank */
.response-detail-header-card .response-detail-model {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .rank-and-copy-container {
        gap: 0.25rem;
    }
    
    .copy-response-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem;
    }
    
    .copy-icon {
        width: 18px;
        height: 18px;
    }
    
    .response-detail-header-card .response-detail-rank {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        height: 44px;
    }
    
    .response-detail-header-card .response-detail-model {
        font-size: 1.1rem;
    }
}

/* GIF Lazy Loading Styles */
.gif-container {
    position: relative;
    margin-top: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background-color: var(--neutral-100);
}

.gif-loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-500);
    font-size: 0.9rem;
    padding: 2rem;
}

.gif-loading-placeholder::before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid var(--neutral-300);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

.tour-gif {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.gif-container.loaded .gif-loading-placeholder {
    display: none;
}

.gif-container.loaded .tour-gif {
    display: block !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}