/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8fafc;
}

/* Flash messages */
.notice, .alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
  text-align: center;
}

.notice {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Navigation */
.navbar {
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand .nav-link {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3b82f6;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: #6b7280;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.nav-text {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
}

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

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

.feature-card p {
  color: #6b7280;
  line-height: 1.6;
}

/* User dashboard */
.user-dashboard {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.user-dashboard h2 {
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.action-card {
  padding: 1.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
  transition: border-color 0.2s;
}

.action-card:hover {
  border-color: #3b82f6;
}

.action-card h4 {
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.action-card p {
  color: #6b7280;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* CTA section */
.cta-section {
  text-align: center;
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.cta-section h2 {
  margin-bottom: 1rem;
  color: #1f2937;
}

.cta-section p {
  color: #6b7280;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
  transform: translateY(-1px);
}

.btn-success {
  background-color: #10b981;
  color: white;
}

.btn-success:hover {
  background-color: #059669;
  transform: translateY(-1px);
}

.btn-info {
  background-color: #0ea5e9;
  color: white;
}

.btn-info:hover {
  background-color: #0284c7;
  transform: translateY(-1px);
}

.btn-warning {
  background-color: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background-color: #d97706;
  transform: translateY(-1px);
}

/* Dropdown Styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  position: absolute;
  background-color: white;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-top: 0.5rem;
}

.dropdown-item {
  color: #374151;
  padding: 0.75rem 1rem;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

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

.dropdown-item:hover {
  background-color: #f9fafb;
}

.dropdown-item.disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

.dropdown-item.disabled:hover {
  background-color: transparent;
}

/* Inline Form Styles */
form[style*="display: inline"] {
  margin: 0;
  padding: 0;
}

form[style*="display: inline"] input[type="submit"] {
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
}

form[style*="display: inline"] input[type="submit"].btn-danger {
  background-color: #dc2626;
  color: white;
}

form[style*="display: inline"] input[type="submit"].btn-danger:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
}

form[style*="display: inline"] input[type="submit"].btn-success {
  background-color: #059669;
  color: white;
}

form[style*="display: inline"] input[type="submit"].btn-success:hover {
  background-color: #047857;
  transform: translateY(-1px);
}

form[style*="display: inline"] input[type="submit"].btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .dashboard-actions {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Profile page styles */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
}

.profile-header {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.profile-header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.profile-form {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Question type selector styling */
select.form-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select.form-input:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Folder selection styling */
.form-input[name="folder_id"] {
  background: #f0f9ff;
  border-color: #3b82f6;
  font-weight: 500;
}

.form-input[name="folder_id"]:focus {
  background: white;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Folder info display styling */
.folder-info-display {
  margin-top: 0.75rem;
}

.folder-info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.folder-info p {
  margin: 0 0 0.5rem 0;
  color: #0c4a6e;
  font-size: 0.875rem;
  line-height: 1.4;
}

.folder-info p:last-child {
  margin-bottom: 0;
}

.info-note {
  color: #0369a1 !important;
  font-style: italic;
  font-size: 0.8rem !important;
}

.form-help {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.form-help a {
  color: #3b82f6;
  text-decoration: none;
}

.form-help a:hover {
  text-decoration: underline;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.error-messages {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-messages h3 {
  color: #991b1b;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.error-messages ul {
  color: #991b1b;
  margin-left: 1.5rem;
}

.error-messages li {
  margin-bottom: 0.25rem;
}

.form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.form-error p {
  margin: 0 0 1rem 0;
  color: #991b1b;
  font-weight: 500;
}

.form-error .btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.form-error .btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.profile-info {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.profile-info h3 {
  color: #1f2937;
  margin-bottom: 1.5rem;
  text-align: center;
}

.info-card {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid #3b82f6;
}

.info-card:last-child {
  margin-bottom: 0;
}

.info-card h4 {
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.info-card p {
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

.info-card a {
  color: #3b82f6;
  text-decoration: none;
}

.info-card a:hover {
  text-decoration: underline;
}

/* Responsive profile page */
@media (max-width: 768px) {
  .profile-form,
  .profile-info {
    padding: 1.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
  }
}

/* API Status styles */
.api-status {
  margin-bottom: 2rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}

.status-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.status-warning {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-icon {
  font-size: 1.1rem;
}

.status-link {
  color: inherit;
  text-decoration: underline;
  margin-left: 0.5rem;
}

.status-link:hover {
  opacity: 0.8;
}

/* Generator Page Styles */
.generator-container {
  max-width: 800px;
  margin: 0 auto;
}

.generator-header {
  text-align: center;
  margin-bottom: 2rem;
}

.generator-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.generator-header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.assessment-context {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}

.assessment-context p {
  margin: 0;
  color: #0369a1;
  font-size: 0.9rem;
}

.generator-form {
  position: relative;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.generated-question {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.generated-question h3 {
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.question-display {
  background-color: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: monospace;
  line-height: 1.5;
}

.copy-button-container {
  text-align: right;
}

.export-info {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}

.export-info p {
  margin: 0;
  color: #0369a1;
  font-size: 0.9rem;
}

/* Loading Indicator Styles */
.loading-indicator {
  display: none; /* Hidden by default */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 10;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border-radius: 12px;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: #3b82f6;
  animation: spin 1s ease infinite;
  margin-bottom: 1rem;
}

.loading-indicator p {
  font-weight: 500;
  color: #374151;
}

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

/* Questions Management Styles */
.questions-container {
  max-width: 1000px;
  margin: 0 auto;
}

.questions-header {
  text-align: center;
  margin-bottom: 2rem;
}

.questions-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.questions-header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.questions-list {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.question-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  transition: transform 0.2s, box-shadow 0.2s;
}

.question-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.question-preview {
  margin-bottom: 1rem;
}

.question-content {
  background-color: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 150px;
  overflow: hidden;
}

.question-meta {
  margin-bottom: 1rem;
}

.question-date {
  color: #6b7280;
  font-size: 0.875rem;
}

.question-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

.empty-state {
  text-align: center;
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.empty-state h3 {
  color: #1f2937;
  margin-bottom: 1rem;
}

.empty-state p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.empty-state-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.questions-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Question Show/Edit Styles */
.question-show-container,
.question-edit-container {
  max-width: 800px;
  margin: 0 auto;
}

.question-show-header,
.question-edit-header {
  text-align: center;
  margin-bottom: 2rem;
}

.question-show-header h1,
.question-edit-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.question-show-header p,
.question-edit-header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.question-display {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.question-display h3 {
  color: #1f2937;
  margin-bottom: 1rem;
}

.question-content-box {
  background-color: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: .5rem;
}

.question-content-box pre {
  font-family: monospace;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

.question-meta {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.question-meta p {
  margin-bottom: 0.5rem;
  color: #6b7280;
}

.question-meta p:last-child {
  margin-bottom: 0;
}

.question-edit-form {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.question-edit-form .form-help pre {
  background-color: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Assessment Styles */
.assessments-container {
  max-width: 1000px;
  margin: 0 auto;
}

.assessments-header {
  text-align: center;
  margin-bottom: 2rem;
}

.assessments-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.assessments-header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.assessments-list {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.assessment-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  transition: transform 0.2s, box-shadow 0.2s;
}

.assessment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.assessment-info h3 {
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.assessment-description {
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.assessment-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.question-count {
  color: #3b82f6;
  font-weight: 500;
}

.assessment-date {
  color: #786b80;
  font-size: 0.475rem;
}

.assessment-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Action Link Styles */
.action-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.action-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.delete-link {
  color: #374151;
}

.delete-link:hover {
  color: #dc2626;
}

/* Action Link Submit Styles (for buttons that should look like links) */
.action-link-submit {
  background: none;
  border: none;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  margin: 0;
}

.action-link-submit:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.question-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.assessments-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Assessment Show Styles */
.assessment-show-container {
  max-width: 1200px;
  margin: 0 auto;
}

.assessment-show-header {
  text-align: center;
  margin-bottom: 2rem;
}

.assessment-show-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.assessment-show-header .assessment-description {
  color: #6b7280;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.assessment-show-header .assessment-meta {
  justify-content: center;
}

.assessment-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.questions-section,
.add-questions-section {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.questions-section h2,
.add-questions-section h2 {
  color: #1f2937;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.available-questions {
  display: grid;
  gap: 1rem;
}

/* Compact Question Card Styles */
.question-card.compact {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  transition: all 0.2s;
}

.question-card.compact:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.question-preview.compact {
  margin-bottom: 0.75rem;
  cursor: help;
  position: relative;
}

.question-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #374151;
  padding: 0.5rem;
  background-color: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.question-text:hover {
  background-color: #f3f4f6;
}

/* Enhanced tooltip styles */
.question-preview.compact[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: #1f2937;
  color: white;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  max-width: 400px;
  margin-bottom: 0.5rem;
}

.question-preview.compact[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 20px;
  border: 5px solid transparent;
  border-top-color: #1f2937;
  z-index: 1001;
  margin-bottom: -5px;
}

/* Assessment Form Styles */
.assessment-form-container {
  max-width: 800px;
  margin: 0 auto;
}

.assessment-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.assessment-form-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.assessment-form-header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.assessment-form {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

/* Responsive design for assessments */
@media (max-width: 768px) {
  .assessment-content {
    grid-template-columns: 1fr;
  }
  
  .assessment-meta {
    flex-direction: column;
    gap: 0.1rem;
  }
  
  .assessment-actions {
    flex-direction: column;
  }
  
  .assessment-actions .btn {
    width: 100%;
  }
}

/* Folder Styles */
.folders-container {
  max-width: 1000px;
  margin: 0 auto;
}

.folders-header {
  text-align: center;
  margin-bottom: 2rem;
}

.folders-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.folders-header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.folders-list {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.folder-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  transition: transform 0.2s, box-shadow 0.2s;
}

.folder-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.folder-info h3 {
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.folder-description {
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.folder-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.folder-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.folders-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.unorganized-questions {
  margin-top: 2rem;
}

.unorganized-questions h2 {
  color: #1f2937;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.question-folder {
  color: #059669;
  font-weight: 500;
}

/* Folder Show Styles */
.folder-show-container {
  max-width: 1200px;
  margin: 0 auto;
}

.folder-show-header {
  text-align: center;
  margin-bottom: 2rem;
}

.folder-show-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.folder-show-header .folder-description {
  color: #6b7280;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.folder-show-header .folder-meta {
  justify-content: center;
}

.folder-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

/* Folder Form Styles */
.folder-form-container {
  max-width: 800px;
  margin: 0 auto;
}

.folder-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.folder-form-header h1 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.folder-form-header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.folder-form {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

/* Responsive design for folders */
@media (max-width: 768px) {
  .folder-content {
    grid-template-columns: 1fr;
  }
  
  .folder-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .folder-actions {
    flex-direction: column;
  }
  
  .folder-actions .btn {
    width: 100%;
  }
}

/* Assessment Folder Hierarchy Styles */
.folders-hierarchy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.folder-group {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.folder-header {
  background: #f9fafb;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s;
}

.folder-header:hover {
  background: #f3f4f6;
}

.folder-icon {
  font-size: 1.2rem;
}

.folder-name {
  font-weight: 600;
  color: #1f2937;
  flex: 1;
}

.folder-count {
  color: #6b7280;
  font-size: 0.9rem;
}

.expand-icon {
  color: #6b7280;
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.folder-questions {
  padding: 1rem;
  background: white;
}

.folder-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
  flex-wrap: wrap;
}

.folder-question-select {
  margin-right: 0.5rem;
}

/* Enhanced question card for folder context */
.question-card.compact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: white;
  transition: background-color 0.2s;
}

.question-card.compact:hover {
  background: #f9fafb;
}

.question-card.compact .question-checkbox {
  flex-shrink: 0;
}

.question-card.compact .question-preview {
  flex: 1;
  min-width: 0;
}

.question-card.compact .question-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
}

/* Bulk Export Styles */
.bulk-actions {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.question-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.question-checkbox {
  padding-top: 0.5rem;
}

.question-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.question-preview {
  grid-column: 2;
  margin-bottom: 1rem;
}

.question-meta {
  grid-column: 2;
  margin-bottom: 1rem;
}

.question-actions {
  grid-column: 2;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Question submeta under heading */
.question-submeta {
  margin-top: 0.05rem;
  margin-bottom: 0.25rem;
  font-size: 0.5rem;
  color: #6b7280;
}

.question-display h3 { margin-bottom: 0.0rem; }
.question-submeta { margin-top: 0; margin-bottom: 0.5rem; }

/* About Page Styles */
.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.about-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.about-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.about-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  font-weight: 300;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-section {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.about-section h2 {
  color: #1f2937;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid #667eea;
  padding-bottom: 0.5rem;
}

.about-section h3 {
  color: #374151;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.about-section h4 {
  color: #4b5563;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.about-section p {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-item {
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.feature-item h3 {
  margin-bottom: 1rem;
  color: #1f2937;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.workflow-step {
  text-align: center;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
  position: relative;
}

.step-number {
  width: 40px;
  height: 40px;
  background: #667eea;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  margin: 0 auto 1rem;
}

.audience-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.audience-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
}

.audience-list li:last-child {
  border-bottom: none;
}

.audience-list strong {
  color: #1f2937;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.benefit {
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
  text-align: center;
  border-top: 4px solid #667eea;
}

.benefit h4 {
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.cta-section {
  text-align: center;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  margin-top: 2rem;
}

.cta-section h2 {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #667eea;
  color: white;
  border: 2px solid #667eea;
}

.btn-primary:hover {
  background: #5a67d8;
  border-color: #5a67d8;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: #667eea;
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .about-header h1 {
    font-size: 2rem;
  }
  
  .about-subtitle {
    font-size: 1rem;
  }
  
  .features-grid,
  .workflow,
  .benefits {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Image Upload Styles */
.image-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f9fafb;
  position: relative;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-upload-area:hover {
  border-color: #667eea;
  background: #f3f4f6;
}

.image-upload-area.drag-over {
  border-color: #667eea;
  background: #eef2ff;
  transform: scale(1.02);
}

.image-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-icon {
  font-size: 2rem;
  color: #6b7280;
}

.image-upload-placeholder p {
  margin: 0;
  color: #6b7280;
}

.upload-hint {
  font-size: 0.875rem;
  color: #9ca3af;
}

.image-preview {
  position: relative;
  max-width: 100%;
  text-align: center;
}

.image-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.remove-image {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remove-image:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.image-input {
  display: none;
}

/* Generator Layout with Sidebar */
.generator-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

/* Prompts Sidebar */
.prompts-sidebar {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 12px 12px 0 0;
}

.sidebar-header h3 {
  margin: 0 0 0.5rem 0;
  color: #1f2937;
  font-size: 1.25rem;
}

.sidebar-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.prompts-list {
  max-height: 400px; /* Reduced height to show ~5 prompts */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #f9fafb;
  position: relative;
}

/* Custom scrollbar styling for webkit browsers */
.prompts-list::-webkit-scrollbar {
  width: 6px;
}

.prompts-list::-webkit-scrollbar-track {
  background: #f9fafb;
  border-radius: 3px;
}

.prompts-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.prompts-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Add subtle shadow when content is scrollable */
.prompts-list:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, rgba(249, 250, 251, 0.8));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.prompts-list.has-scroll:after {
  opacity: 1;
}

/* Add subtle shadow at top when scrolled down */
.prompts-list:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(rgba(249, 250, 251, 0.8), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.prompts-list.has-scroll:before {
  opacity: 1;
}

.prompts-list.scrolled:before {
  opacity: 1;
}

.prompt-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.prompt-item:hover {
  background: #f9fafb;
  transform: translateX(4px);
}

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

.prompt-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  cursor: pointer;
}

.prompt-text {
  margin: 0;
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.4;
}

.prompt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.question-type-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: white;
}

.question-type-badge.mc { background: #3b82f6; }
.question-type-badge.ma { background: #8b5cf6; }
.question-type-badge.tf { background: #10b981; }
.question-type-badge.ess { background: #f59e0b; }
.question-type-badge.fib { background: #ef4444; }
.question-type-badge.mat { background: #6b7280; }

.prompt-date {
  font-size: 0.75rem;
  color: #9ca3af;
}

.prompt-actions {
  flex-shrink: 0;
}

.delete-prompt-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-prompt-btn:hover {
  background: #fef2f2;
  color: #dc2626;
  transform: scale(1.1);
}

.delete-prompt-btn:active {
  transform: scale(0.95);
}

.no-prompts {
  padding: 2rem 1.5rem;
  text-align: center;
  color: #6b7280;
}

.no-prompts p {
  margin: 0;
  font-size: 0.875rem;
}

/* Main Content Area */
.generator-main {
  min-width: 0; /* Prevents grid overflow */
}

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

/* Highlight effect for form */
.generator-form.highlight {
  animation: highlightForm 1s ease-out;
}

@keyframes highlightForm {
  0% { background: #fef3c7; }
  100% { background: white; }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .generator-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .prompts-sidebar {
    position: static;
    order: 2;
  }
  
  .generator-main {
    order: 1;
  }
}
