/* Scroll mask wrapper for examples (for fixed dark shadow fades) */
.preset-scroll-wrapper {
  position: relative;
}

.preset-scroll-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 28px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.preset-scroll-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}
/* Prompt Generator Isolated Styles */
/* This file contains styles for the prompt input generator feature */
/* Designed to work alongside existing Webflow styles without conflicts */

/* Screen reader only class for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* CSS Variables for consistency with existing brand colors */
:root {
  --judge-purple: #2e6afb;
  --judge-ghost-white: #f4f4f8;
  --judge-dark-night: #1f1f24;
  --judge-white: white;
  --judge-platinum: #bbb;
  --judge-black: black;
  --judge-purple-hover: #7751ca;
  --judge-purple-light: #4e6ff2;
  --judge-error-red: #ff4757;
  --judge-success-green: #2ed573;
  --judge-border-light: #00000017;
  --judge-shadow: 0 4px 20px rgba(46, 106, 251, 0.1);
  --judge-shadow-hover: 0 8px 30px rgba(46, 106, 251, 0.15);
}

/* Main prompt generator section */
.section-judge-generator {
  padding: 60px 0;
  background-color: transparent;
  position: relative;
}

.judge-generator-container {
  max-width: 1000px;
  margin: 30px auto 0;
  padding: 0 20px;
  background-color: transparent;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: judgeSectionFadeInUp 0.8s ease-out 0.1s forwards;
}

/* Prompt input wrapper */
.judge-input-wrapper {
  background-color: #fff;
  border: 1px solid var(--judge-border-light);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.judge-input-wrapper:hover {
  border-color: rgba(46, 106, 251, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.judge-input-wrapper.focused {
  border-color: rgba(46, 106, 251, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Prompt label */
.judge-label {
  display: block;
  color: black;
  font-family: Satoshi, sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.4;
}

/* Main textarea styling */
.judge-textarea {
  width: 100%;
  min-height: 120px;
  max-height: 300px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 15px;
  background-color: #f7f7fb;
  color: #111827;
  font-family: Satoshi, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
  animation: judgeFadeInUp 0.6s ease-out 0.2s both;
}

.judge-textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.judge-textarea:hover {
  border-color: rgba(46, 106, 251, 0.35);
}

.judge-textarea:focus {
  border-color: #2e6afb;
  box-shadow: 0 0 0 3px rgba(46, 106, 251, 0.15);
}

@keyframes judgeSectionFadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes judgeFadeInUp {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Auto-resize functionality */
.judge-textarea.auto-resize {
  overflow: hidden;
}

.judge-textarea.max-height-reached {
  overflow-y: auto;
  border-left: 4px solid var(--judge-purple);
}

/* Preset buttons styling */
.preset-buttons-container {
  margin-top: 10px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.preset-subtitle {
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--judge-dark-night);
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  opacity: .9;
}

.preset-buttons-row {
  display: contents;
}

.preset-button {
  background-color: var(--judge-white);
  color: var(--judge-dark-night);
  border: 1px solid var(--judge-platinum);
  border-radius: 25px;
  padding: 8px 14px;
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  flex: 0 0 auto;
}

.preset-button.is-active {
  border-color: var(--judge-purple);
  color: var(--judge-purple);
  background-color: var(--judge-white);
}

.preset-button .preset-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.judge-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-family: Satoshi, sans-serif;
  font-size: 12px;
  margin-top: 2px;
}

.judge-hint .hint-icon {
  width: 16px;
  height: 16px;
}

.preset-button:hover {
  background-color: var(--judge-white);
  border-color: var(--judge-purple);
  color: var(--judge-purple);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 106, 251, 0.12);
}

.preset-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.preset-button:focus {
  outline: 2px solid var(--judge-purple);
  outline-offset: 2px;
}

/* Input footer with centered build button */
.judge-input-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 20px;
  gap: 12px;
}

/* Build button styling */
.button.button-purple.build-button {
  background-color: var(--judge-purple);
  color: var(--judge-white);
  border: 2px solid var(--judge-purple);
  border-radius: 14px;
  padding: 14px 22px;
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  justify-content: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.build-teaser {
  color: #6b7280;
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  margin-right: auto;
}

.build-teaser a {
  color: var(--judge-purple);
  text-decoration: underline;
}

.build-teaser a:hover {
  text-decoration: none;
  opacity: .9;
}

.button.button-purple.build-button:hover {
  background-color: var(--judge-purple-hover);
  border-color: var(--judge-purple-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 106, 251, 0.3);
}

.button.button-purple.build-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(46, 106, 251, 0.2);
}

.button.button-purple.build-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.02);
}

/* Button text */
.button-text {
  position: relative;
  z-index: 2;
}

/* Loading spinner */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

.loading-spinner.hidden {
  display: none;
}

/* Enhanced loading spinner with pulse effect */
.loading-spinner.enhanced {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid currentColor;
  animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Spinner animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* Loading state overlay for input wrapper */
.judge-input-wrapper.loading {
  position: relative;
  pointer-events: none;
}

.judge-input-wrapper.loading .button.button-purple.build-button .loading-spinner {
  display: none !important;
}

.judge-input-wrapper.loading .button.button-purple.build-button.loading::before {
  display: none !important;
}

.judge-input-wrapper.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 21, 34, 0.68);
  border-radius: 20px;
  z-index: 1;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Loading progress indicator */
.loading-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  color: #e6eefc;
  font-family: Satoshi, sans-serif;
  font-weight: 600;
}

.loading-progress.hidden {
  display: none;
}

.loading-progress .progress-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid #e6eefc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.loading-progress .progress-text {
  font-size: 16px;
  margin-bottom: 8px;
  color: #e6eefc;
}

.loading-progress .progress-subtext {
  font-size: 14px;
  color: rgba(230, 238, 252, 0.75);
  font-weight: 400;
}

/* Progress dots animation */
.progress-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Button loading states */
.button.button-purple.judge-generate.loading {
  background-color: var(--judge-purple-light);
  border-color: var(--judge-purple-light);
  cursor: not-allowed;
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.button.button-purple.judge-generate.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 2s infinite;
  z-index: 1;
}

.button.button-purple.judge-generate.loading .button-text {
  position: relative;
  z-index: 2;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Loading timeout warning */
.loading-timeout-warning {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffa502;
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-timeout-warning.visible {
  opacity: 1;
}

/* Status message container */
.status-message {
  margin-top: 15px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
}

.status-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.status-message.success {
  background-color: rgba(46, 213, 115, 0.1);
  color: var(--judge-success-green);
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.status-message.error {
  background-color: rgba(255, 71, 87, 0.1);
  color: var(--judge-error-red);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.status-message.warning {
  background-color: rgba(255, 165, 2, 0.1);
  color: #ffa502;
  border: 1px solid rgba(255, 165, 2, 0.3);
}

.status-message.info {
  background-color: rgba(46, 106, 251, 0.1);
  color: var(--judge-purple);
  border: 1px solid rgba(46, 106, 251, 0.3);
}

/* Error states */
.judge-textarea.error {
  border-color: var(--judge-error-red);
  background-color: #fff5f5;
}

.judge-textarea.error:focus {
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.08);
}

.error-message {
  color: var(--judge-error-red);
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.error-message.hidden {
  display: none;
}

/* Warning states */
.judge-textarea.warning {
  border-color: #ffa502;
}

.judge-textarea.warning:focus {
  box-shadow: 0 0 0 2px rgba(255, 165, 2, 0.08);
}

/* Success states */
.judge-textarea.success {
  border-color: var(--judge-success-green);
}

.judge-textarea.success:focus {
  box-shadow: 0 0 0 2px rgba(46, 213, 115, 0.08);
}

/* Validation hint styling (less prominent than error) */
.error-message.validation-hint {
  color: #666;
  font-weight: 400;
}

.error-message.validation-hint:not(.hidden) {
  display: flex;
}

/* Responsive Design */

/* Tablet styles */
@media screen and (max-width: 991px) {
  .section-judge-generator {
    padding: 40px 0;
  }
  
  .judge-generator-container {
    max-width: 100%;
    padding: 0 15px;
  }
  
  .judge-input-wrapper {
    padding: 18px;
  }
  
  .judge-label {
    font-size: 16px;
  }
  
  .judge-textarea {
    min-height: 100px;
    padding: 15px;
    font-size: 15px;
  }
  
  .preset-buttons-container {
    gap: 10px;
  }
  
  .preset-button {
    font-size: 13px;
    padding: 8px 16px;
  }
  
  .button.button-purple.build-button {
    width: 100%;
    padding: 18px 30px;
  }
}

/* Mobile styles */
@media screen and (max-width: 767px) {
  .section-judge-generator {
    padding: 30px 0;
  }
  
  .judge-generator-container {
    padding: 0 10px;
    margin-top: 20px;
  }


  
  .judge-input-wrapper {
    padding: 15px;
    border-radius: 15px;
    border: none;
    box-shadow: none;
  }

  .judge-input-wrapper:hover,
  .judge-input-wrapper.focused,
  .judge-input-wrapper:focus-within {
    box-shadow: none;
    border-color: rgba(0,0,0,0.08);
  }
  
  .judge-label {
    font-size: 15px;
    margin-bottom: 12px;
  }
  
  .judge-textarea {
    min-height: 140px;
    padding: 12px;
    font-size: 14px;
    border-radius: 12px;
  }

  .judge-textarea:focus {
    box-shadow: none;
  }
  
  .preset-buttons-container {
    margin: 15px 0;
    gap: 10px;
  }

  .preset-subtitle {
    margin-top: 20px;
  }
  
  .preset-buttons-container {
    position: relative;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
    padding: 1px 8px; /* content padding; fades handled by wrapper */
  }
  
  .preset-buttons-container::before,
  .preset-buttons-container::after { display: none; }
  
  .preset-buttons-container::-webkit-scrollbar {
    display: none;
  }
  
  .preset-button {
    font-size: 12px;
    padding: 7px 10px;
    flex: 0 0 auto;
    justify-content: center;
  }

  .preset-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 106, 251, 0.2);
  }
  
  .judge-input-footer {
    margin-top: 15px;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }
  
  .button.button-purple.build-button {
    padding: 16px 25px;
    font-size: 15px;
    min-width: auto;
    width: 100%;
  }

  .build-teaser {
    margin-right: 0;
    text-align: center;
  }
}

/* Small mobile styles */
@media screen and (max-width: 479px) {
  .judge-input-wrapper {
    padding: 15px;
  }
  
  .judge-textarea {
    padding: 12px;
    min-height: 190px;
  }
  
  .button.button-purple.judge-generate {
    padding: 14px 20px;
    font-size: 14px;
  }
}

/* Extra small mobile styles */
@media screen and (max-width: 320px) {
  .judge-generator-container {
    padding: 0 5px;
  }
  
  .judge-input-wrapper {
    padding: 10px;
    border-radius: 12px;
  }
  
  .judge-label {
    font-size: 14px;
  }
  
  .judge-textarea {
    padding: 10px;
    min-height: 140px;
    font-size: 13px;
  }
  
  .character-count {
    font-size: 12px;
  }
  
  .preset-buttons-container {
    gap: 6px;
  }
  
  .preset-buttons-container::after {
    width: 15px;
    background: linear-gradient(to left, rgba(15, 21, 34, 0.9), rgba(15, 21, 34, 0));
  }
  
  .preset-button {
    font-size: 11px;
    padding: 6px 10px;
    flex: 0 0 auto;
  }
  
  .button.button-purple.judge-generate {
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* Large desktop styles */
@media screen and (min-width: 1200px) {
  .judge-generator-container {
    max-width: 900px;
  }
  
  .judge-input-wrapper {
    padding: 35px;
  }
  
  .judge-label {
    font-size: 20px;
  }
  
  .judge-textarea {
    min-height: 140px;
    padding: 25px;
    font-size: 17px;
  }
  
  .button.button-purple.judge-generate {
    padding: 18px 35px;
    font-size: 17px;
  }
}

/* Ultra-wide desktop styles */
@media screen and (min-width: 1600px) {
  .judge-generator-container {
    max-width: 1100px;
  }
  
  .judge-input-wrapper {
    padding: 35px;
  }
  
  .judge-textarea {
    min-height: 160px;
    padding: 30px;
    font-size: 18px;
  }
}

/* Focus and accessibility improvements */
.judge-textarea:focus,
.button.button-purple.judge-generate:focus,
.results-actions .button:focus,
.card-action-btn:focus,
.retry-btn:focus,
.cancel-btn:focus,
.fallback-btn:focus,
.dismiss-btn:focus {
  outline: 2px solid var(--judge-purple);
  outline-offset: 2px;
}

/* Enhanced focus styles for better visibility */
.judge-textarea:focus-visible,
.button.button-purple.judge-generate:focus-visible,
.results-actions .button:focus-visible,
.card-action-btn:focus-visible {
  outline: 3px solid var(--judge-purple);
  outline-offset: 3px;
  box-shadow: 0 0 0 1px var(--judge-white), 0 0 0 4px var(--judge-purple);
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--judge-purple);
  color: var(--judge-white);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 6px;
}

/* Keyboard navigation indicators */
.judge-input-wrapper:focus-within {
  border-color: rgba(46, 106, 251, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Enhanced button states for keyboard navigation */
.button.button-purple.judge-generate:focus:not(:disabled) {
  background-color: var(--judge-purple-hover);
  border-color: var(--judge-purple-hover);
}

/* Improved disabled state visibility */
.button.button-purple.judge-generate:disabled {
  background-color: var(--judge-platinum);
  border-color: var(--judge-platinum);
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Better error state focus */
.judge-textarea.error:focus {
  border-color: var(--judge-error-red);
  box-shadow: none;
  outline: 1px solid rgba(255, 71, 87, 0.3);
  outline-offset: 1px;
}

/* Touch target improvements for mobile */
@media (pointer: coarse) {
  .button.button-purple.judge-generate,
  .results-actions .button,
  .card-action-btn,
  .retry-btn,
  .cancel-btn,
  .fallback-btn,
  .dismiss-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
  }
  
  .copy-code-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px;
  }
  
  .expand-toggle {
    min-height: 44px;
    padding: 8px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .judge-input-wrapper {
    border-width: 3px;
  }
  
  .judge-textarea {
    border-width: 3px;
  }
  
  .button.button-purple.judge-generate {
    border-width: 3px;
  }
  
  /* Enhanced contrast for text */
  .judge-label,
  .evaluator-title,
  .results-header h3 {
    font-weight: 700;
    color: #000;
  }
  
  .character-count,
  .evaluator-description {
    color: #333;
    font-weight: 500;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .judge-input-wrapper,
  .judge-textarea,
  .button.button-purple.judge-generate,
  .loading-spinner {
    transition: none;
    animation: none;
  }
  
  .button.button-purple.judge-generate:hover {
    transform: none;
  }
}

/* Results Display Component Styles */

/* Results container */
.evaluators-results-container {
  margin-top: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.evaluators-results-container.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Results header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--judge-platinum);
}

.results-header h3 {
  color: var(--judge-dark-night);
  font-family: Satoshi, sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.results-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.results-actions .button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 25px;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--judge-platinum);
  background-color: var(--judge-white);
  color: var(--judge-dark-night);
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-actions .button:hover {
  border-color: var(--judge-purple);
  background-color: var(--judge-purple);
  color: var(--judge-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(46, 106, 251, 0.2);
}

/* Evaluators grid */
.evaluators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

/* Individual evaluator card */
.evaluator-card {
  background-color: var(--judge-white);
  border: 2px solid var(--judge-platinum);
  border-radius: 20px;
  padding: 25px;
  box-shadow: var(--judge-shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.evaluator-card:hover {
  border-color: var(--judge-purple);
  box-shadow: var(--judge-shadow-hover);
  transform: translateY(-3px);
}

.evaluator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--judge-purple), var(--judge-purple-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.evaluator-card:hover::before {
  opacity: 1;
}

/* Card header */
.evaluator-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 15px;
}

.evaluator-title {
  color: var(--judge-dark-night);
  font-family: Satoshi, sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.evaluator-type-badge {
  background-color: rgba(46, 106, 251, 0.1);
  color: var(--judge-purple);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Card description */
.evaluator-description {
  color: #666;
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 400;
}

/* Code snippet container */
.code-snippet-container {
  background-color: var(--judge-ghost-white);
  border: 1px solid var(--judge-platinum);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.code-snippet-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid var(--judge-platinum);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #666;
  font-weight: 600;
}

.code-language {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.copy-code-btn {
  background: none;
  border: none;
  color: var(--judge-purple);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.copy-code-btn:hover {
  background-color: rgba(46, 106, 251, 0.1);
}

.code-snippet {
  padding: 15px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--judge-dark-night);
  background-color: var(--judge-white);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Syntax highlighting for code */
.code-snippet .keyword {
  color: #d73a49;
  font-weight: 600;
}

.code-snippet .string {
  color: #032f62;
}

.code-snippet .comment {
  color: #6a737d;
  font-style: italic;
}

.code-snippet .function {
  color: #6f42c1;
}

.code-snippet .variable {
  color: #e36209;
}

/* Card actions */
.evaluator-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.card-action-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--judge-platinum);
  background-color: var(--judge-white);
  color: var(--judge-dark-night);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-action-btn:hover {
  border-color: var(--judge-purple);
  background-color: var(--judge-purple);
  color: var(--judge-white);
}

.card-action-btn.primary {
  background-color: var(--judge-purple);
  border-color: var(--judge-purple);
  color: var(--judge-white);
}

.card-action-btn.primary:hover {
  background-color: var(--judge-purple-hover);
  border-color: var(--judge-purple-hover);
}

/* Expandable sections */
.expandable-section {
  margin-top: 15px;
  border-top: 1px solid var(--judge-platinum);
  padding-top: 15px;
}

.expand-toggle {
  background: none;
  border: none;
  color: var(--judge-purple);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.expand-toggle:hover {
  color: var(--judge-purple-hover);
}

.expand-icon {
  transition: transform 0.3s ease;
  font-size: 12px;
}

.expand-toggle.expanded .expand-icon {
  transform: rotate(180deg);
}

.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 15px;
}

.expandable-content.expanded {
  max-height: 500px;
}

/* Loading state for results */
.evaluators-results-container.loading {
  pointer-events: none;
}

.evaluators-results-container.loading .evaluator-card {
  opacity: 0.6;
  transform: scale(0.98);
}

/* Empty state */
.results-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.results-empty-state h4 {
  color: var(--judge-dark-night);
  font-family: Satoshi, sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.results-empty-state p {
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* Animation for cards appearing */
.evaluator-card {
  animation: cardSlideIn 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.evaluator-card:nth-child(1) { animation-delay: 0.1s; }
.evaluator-card:nth-child(2) { animation-delay: 0.2s; }
.evaluator-card:nth-child(3) { animation-delay: 0.3s; }
.evaluator-card:nth-child(4) { animation-delay: 0.4s; }
.evaluator-card:nth-child(5) { animation-delay: 0.5s; }
.evaluator-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design for results */
@media screen and (max-width: 991px) {
  .evaluators-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .results-header h3 {
    font-size: 24px;
    text-align: center;
  }
  
  .results-actions {
    justify-content: center;
  }
  
  .evaluator-card {
    padding: 20px;
  }
  
  .evaluator-title {
    font-size: 18px;
  }
  
  .evaluator-card-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}

@media screen and (max-width: 767px) {
  .evaluators-results-container {
    margin-top: 30px;
  }
  
  .results-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
  }
  
  .results-header h3 {
    font-size: 22px;
  }
  
  .results-actions .button {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .evaluator-card {
    padding: 18px;
    border-radius: 15px;
  }
  
  .evaluator-title {
    font-size: 17px;
  }
  
  .evaluator-description {
    font-size: 14px;
  }
  
  .code-snippet {
    font-size: 12px;
    padding: 12px;
  }
  
  .card-action-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media screen and (max-width: 479px) {
  .evaluators-grid {
    gap: 15px;
  }
  
  .evaluator-card {
    padding: 15px;
  }
  
  .evaluator-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .evaluator-type-badge {
    align-self: flex-end;
  }
}

/* Enhanced Error Handling UI Styles */

/* Retry container */
.retry-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 0;
}

.retry-message {
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: inherit;
  margin: 0;
}

.retry-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.retry-btn,
.cancel-btn {
  padding: 8px 16px;
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 80px;
  justify-content: center;
}

.retry-btn {
  background-color: var(--judge-purple);
  color: var(--judge-white);
  border-color: var(--judge-purple);
}

.retry-btn:hover {
  background-color: var(--judge-purple-hover);
  border-color: var(--judge-purple-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 106, 251, 0.3);
}

.cancel-btn {
  background-color: transparent;
  color: #666;
  border-color: var(--judge-platinum);
}

.cancel-btn:hover {
  background-color: var(--judge-platinum);
  color: var(--judge-dark-night);
  border-color: #ccc;
}

/* Fallback container */
.fallback-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 0;
}

.fallback-message {
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: inherit;
  margin: 0;
}

.fallback-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.fallback-btn,
.dismiss-btn {
  padding: 8px 16px;
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  justify-content: center;
}

.fallback-btn {
  background-color: var(--judge-purple);
  color: var(--judge-white);
  border-color: var(--judge-purple);
}

.fallback-btn:hover {
  background-color: var(--judge-purple-hover);
  border-color: var(--judge-purple-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 106, 251, 0.3);
}

.dismiss-btn {
  background-color: transparent;
  color: #666;
  border-color: var(--judge-platinum);
}

.dismiss-btn:hover {
  background-color: var(--judge-platinum);
  color: var(--judge-dark-night);
  border-color: #ccc;
}

/* Enhanced status message types */
.status-message.retry {
  background-color: rgba(255, 165, 2, 0.1);
  color: #ffa502;
  border: 1px solid rgba(255, 165, 2, 0.3);
}

.status-message.fallback {
  background-color: rgba(108, 92, 231, 0.1);
  color: #6c5ce7;
  border: 1px solid rgba(108, 92, 231, 0.3);
}

/* Rate limit specific styling */
.status-message.rate-limit {
  background-color: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Network error specific styling */
.status-message.network-error {
  background-color: rgba(255, 159, 67, 0.1);
  color: #ff9f43;
  border: 1px solid rgba(255, 159, 67, 0.3);
}

/* Server error specific styling */
.status-message.server-error {
  background-color: rgba(238, 82, 83, 0.1);
  color: #ee5253;
  border: 1px solid rgba(238, 82, 83, 0.3);
}

/* Timeout error specific styling */
.status-message.timeout-error {
  background-color: rgba(255, 177, 66, 0.1);
  color: #ffb142;
  border: 1px solid rgba(255, 177, 66, 0.3);
}

/* Enhanced error message styling */
.error-message {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  transition: all 0.3s ease;
}

.error-message::before {
  content: '⚠';
  margin-right: 6px;
  font-weight: bold;
}

.error-message.validation-hint {
  background-color: rgba(255, 165, 2, 0.1);
  border-color: rgba(255, 165, 2, 0.3);
  color: #ffa502;
}

.error-message.validation-hint::before {
  content: 'ℹ';
  color: #ffa502;
}

/* Loading state enhancements for error handling */
.judge-input-wrapper.error-state {
  border-color: var(--judge-error-red);
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.judge-input-wrapper.warning-state {
  border-color: #ffa502;
  box-shadow: 0 0 0 3px rgba(255, 165, 2, 0.1);
}

/* Button states for error handling */
.button.button-purple.judge-generate.rate-limited {
  background-color: #ff6b6b;
  border-color: #ff6b6b;
  cursor: not-allowed;
  pointer-events: none;
}

.button.button-purple.judge-generate.network-error {
  background-color: #ff9f43;
  border-color: #ff9f43;
}

.button.button-purple.judge-generate.server-error {
  background-color: #ee5253;
  border-color: #ee5253;
}

/* Error history indicator (for debugging) */
.error-history-indicator {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  background-color: var(--judge-error-red);
  border-radius: 50%;
  font-size: 8px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-history-indicator.visible {
  opacity: 1;
}

/* Accessibility improvements for error states */
.status-message[role="alert"] {
  position: relative;
}

.status-message[role="alert"]::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: currentColor;
  border-radius: 2px;
}

/* Animation for error state transitions */
@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.judge-textarea.error-shake {
  animation: errorShake 0.5s ease-in-out;
}

/* Responsive design for error handling components */
@media screen and (max-width: 767px) {
  .retry-actions,
  .fallback-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .retry-btn,
  .cancel-btn,
  .fallback-btn,
  .dismiss-btn {
    width: 100%;
    min-width: auto;
  }
  
  .retry-message,
  .fallback-message {
    text-align: center;
    font-size: 13px;
  }
}

@media screen and (max-width: 479px) {
  .status-message {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .error-message {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .retry-btn,
  .cancel-btn,
  .fallback-btn,
  .dismiss-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* High contrast mode support for error states */
@media (prefers-contrast: high) {
  .error-message,
  .status-message.error,
  .status-message.warning {
    border-width: 2px;
    font-weight: 600;
  }
  
  .retry-btn,
  .fallback-btn {
    border-width: 3px;
  }
}

/* Reduced motion support for error animations */
@media (prefers-reduced-motion: reduce) {
  .error-message,
  .status-message,
  .retry-btn,
  .cancel-btn,
  .fallback-btn,
  .dismiss-btn {
    transition: none;
  }
  
  .judge-textarea.error-shake {
    animation: none;
  }
  
  .retry-btn:hover,
  .fallback-btn:hover {
    transform: none;
  }
}