@layer utilities {
            .prose-custom {
                @apply max-w-none text-gray-700 leading-relaxed;
                font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            }
            
            .prose-custom h1 {
                @apply text-4xl font-bold text-gray-900 mt-8 mb-4;
            }
            
            .prose-custom h2 {
                @apply text-3xl font-bold text-gray-900 mt-6 mb-3;
            }
            
            .prose-custom h3 {
                @apply text-2xl font-bold text-gray-900 mt-4 mb-2;
            }
            
            .prose-custom p {
                @apply text-gray-700 leading-relaxed mb-4;
            }
            
            .prose-custom a {
                @apply text-blue-600 underline;
            }
            
            .prose-custom a:hover {
                @apply text-blue-800;
            }
            
            .prose-custom strong {
                @apply text-gray-900 font-bold;
            }
            
            .prose-custom code {
                @apply bg-gray-100 px-1 py-0.5 rounded text-sm;
            }
            
            .prose-custom pre {
                @apply bg-gray-900 text-gray-100 p-4 rounded;
            }
            
            .prose-custom blockquote {
                @apply border-l-4 border-gray-300 pl-4 italic;
            }
            
            .prose-custom ul {
                @apply list-disc pl-6 mb-4;
            }
            
            .prose-custom ol {
                @apply list-decimal pl-6 mb-4;
            }
            
            .prose-custom img {
                @apply rounded-lg shadow-md mx-auto;
            }
            
            .loading-spinner {
                @apply inline-block w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin;
            }
        }

/* Ensure the text stays perfectly centered */
  .text-content {
    text-align: center;
    display: inline-block;
    /* Keeps the text block centered */
  }


  /* Rory positioned beside the text */
  .robot-companion {
    width: 130px;
    /* Adjust size */
    height: auto;
    transition: transform 0.3s ease;
    z-index: 1;
  }

  /* Space between text and Rory */
  .ms-3 {
    margin-left: 20px;
    /* Adjust spacing between title and Rory */
  }


  .robot-companion:hover {
    transform: scale(1.1) rotate(5deg);
  }

  /* Hide Rory on small screens */
  @media (max-width: 930px) {
    .robot-companion {
      display: none;
    }
  }

  #previewContainer {
    max-width: 100%;
    /* Constrain the container's width */
    overflow-x: auto;
    /* Enable horizontal scrolling for overflowing content */
    white-space: pre-wrap;
    /* Wrap text to avoid horizontal scrolling where possible */
    word-break: break-word;
    /* Break words if they are too long */
  }

  pre {
    max-width: 100%;
    /* Ensure <pre> doesn't exceed container width */
    overflow-x: auto;
    /* Scroll horizontally if content overflows */
    white-space: pre-wrap;
    /* Allow wrapping inside <pre> */
    word-wrap: break-word;
    /* Wrap long words to prevent overflow */
  }

  /* By default, full width */
  .flex-panel {
    flex: 1 1 100%;
    min-width: 300px;
    max-width: 100%;
  }

  /* From medium screens and up (≥768px), side-by-side */
  @media (min-width: 768px) {
    .flex-panel {
      flex: 1 1 48%;
      max-width: 48%;
    }
  }

  .flip-card {
    perspective: 1000px;
    cursor: pointer;
  }

  .flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
  }

  .flip-card:hover .flip-card-inner,
  .flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
  }

  .flip-card-front,
  .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
  }

  .flip-card-front {
    background-color: #ffffff;
  }

  .flip-card-back {
    background-color: #f8f9fa;
    transform: rotateY(180deg);
  }

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




  /************
 *
 *  NEW CSS
 *
 ************/
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  :root {
    --primary: #000000;
    --primary-hover: #1a1a1a;
    --primary-light: #f8f8f8;
    --background: #ffffff;
    --surface: #ffffff;
    --surface-hover: #fafafa;
    --border: #f0f0f0;
    --border-light: #f8f8f8;
    --text: #000000;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-light: #cccccc;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.08);
    --success: #059669;
    --error: #DC2626;
  }

  /* body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
      background: var(--background);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    } */

  /* Noise texture overlay for depth */
  /* body::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0.015;
      z-index: -1;
      background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.5"/></svg>');
    } */

  .create-deck-new-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 20px;
  }

  /* Header - Minimal and clean */
  .header {
    text-align: center;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
  }

  h1 {
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 8px;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.01em;
  }

  /* Trust Banner */
  .trust-banner {
    display: flex;
    justify-content: space-around;
    margin: 0 0 48px 0;
    padding: 24px;
    background: var(--surface-hover);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.2s forwards;
  }

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

  .trust-item strong {
    display: block;
    font-size: 24px;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 4px;
  }

  .trust-item span {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  /* Main Content Area */
  .content-wrapper {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
  }

  .content-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.02) 0%, transparent 70%);
    pointer-events: none;
  }

  /* Tabs - Ultra minimal */
  .tabs {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 16px;
  }

  .tab {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .tab:hover {
    color: var(--text-secondary);
  }

  .tab.active {
    color: var(--text);
  }

  .tab.active::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    animation: slideIn 0.3s ease;
  }

  @keyframes slideIn {
    from {
      transform: scaleX(0);
    }

    to {
      transform: scaleX(1);
    }
  }

  /* Tab Content */
  .tab-content {
    display: none;
    opacity: 0;
  }

  .tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease forwards;
  }

  /* Dropzone - Minimal and clean */
  .dropzone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 60px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 24px;
    position: relative;
    background: var(--surface-hover);
  }

  .dropzone:hover {
    border-color: var(--text-tertiary);
    background: var(--border-light);
    transform: translateY(-2px);
  }

  .dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
  }

  .dropzone-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.6;
    transition: all 0.3s ease;
  }

  .dropzone:hover .dropzone-icon {
    transform: scale(1.1);
    opacity: 0.8;
  }

  .dropzone-text {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 400;
  }

  .dropzone-hint {
    font-size: 13px;
    color: var(--text-tertiary);
    letter-spacing: 0.01em;
  }

  /* Input Fields */
  .input-field {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text);
    background: var(--surface-hover);
    transition: all 0.2s ease;
    margin-bottom: 12px;
    font-family: inherit;
    letter-spacing: 0.01em;
  }

  .input-field:focus {
    outline: none;
    border-color: var(--text-tertiary);
    background: var(--background);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.03);
  }

  .input-field::placeholder {
    color: var(--text-light);
  }

  .input-hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
    letter-spacing: 0.01em;
  }

  /* Buttons */
  .btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
  }

  .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
  }

  .btn:active::before {
    width: 300px;
    height: 300px;
  }

  .btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  .btn-scratch {
    background: var(--background);
    color: var(--text);
    font-weight: 500;
    border: 2px solid var(--border);
    width: 100%;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
  }

  .btn-scratch::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent 30%, var(--primary), transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    animation: shimmer 3s linear infinite;
  }

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

    to {
      transform: translateX(100%);
    }
  }

  .btn-scratch:hover {
    border-color: var(--primary);
    color: var(--primary);
  }

  .btn-scratch:hover::after {
    opacity: 0.1;
  }

  /* Info Buttons */
  .infobuttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
  }

  .infobutton {
    opacity: 0.6;
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    font-size: 12px;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .infobutton:hover {
    opacity: 1;
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--border);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
  }

  /* 
    .infobutton.active {
      opacity: 1;
      background: var(--primary);
      color: white;
      border-color: var(--primary);
    } */
  /* Processing State */
  .processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
    /* Increase z-index to ensure it's on top */
    border-radius: 20px;
  }

  .processing-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: all !important;
  }

  .processing-icon {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
  }

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

  .processing-text {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 8px;
  }

  .processing-subtext {
    font-size: 13px;
    color: var(--text-tertiary);
  }

  /* Results Section */
  .results-section {
    margin-top: 48px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    display: none;
    /* Add this line */
  }

  .results-section.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
    /* Add this line */
  }

  .results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
  }

  .results-title {
    font-size: 20px;
    font-weight: 300;
    color: var(--text);
  }

  .results-count {
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  .results-preview {
    background: var(--surface-hover);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
  }

  .question-list {
    list-style: none;
    padding: 0;
  }

  .question-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
  }

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

  .question-number {
    width: 24px;
    height: 24px;
    background: var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    flex-shrink: 0;
  }

  .more-questions {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    margin-top: 16px;
    font-style: italic;
  }

  /* Inline Edit */
  .inline-edit {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
  }

  .inline-edit-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    background: var(--background);
    transition: all 0.2s ease;
  }

  .inline-edit-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
  }

  .action-buttons {
    display: flex;
    gap: 12px;
  }

  .btn-save {
    background: var(--success);
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .btn-save:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
  }

  .btn-reset {
    background: var(--background);
    color: var(--text-secondary);
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .btn-reset:hover {
    background: var(--surface-hover);
    color: var(--text);
  }

  /* Info Content */
  .infocontent {
    display: none;
    margin-top: 32px;
    padding: 32px;
    background: var(--surface-hover);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    position: relative;
  }

  .infocontent.active {
    display: block;
    animation: fadeIn 0.3s ease;
  }

  /* Example Cards */
  .example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 24px;
  }

  .example-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--background);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-size: 13px;
  }

  .example-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.03), transparent);
    transition: left 0.5s ease;
  }

  .example-card:hover::before {
    left: 100%;
  }

  .example-card:hover {
    border-color: var(--border);
    background: var(--surface-hover);
    transform: translateX(4px);
  }

  .file-title {
    flex: 1;
    font-weight: 500;
  }

  .tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 100px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .tag.free {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
  }

  .tag.ai {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text);
  }

  .tag.ocr {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
  }

  /* Table */
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 24px;
  }

  th,
  td {
    border: 1px solid var(--border-light);
    padding: 16px;
    text-align: left;
  }

  th {
    background: var(--surface-hover);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
  }

  td {
    background: var(--background);
  }

  .premium {
    color: var(--primary);
    font-weight: 600;
  }

  /* Success State */
  .success-message {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: var(--success);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-top: 24px;
    font-weight: 500;
    display: none;
  }

  .success-message.active {
    display: block;
    animation: fadeIn 0.3s ease;
  }

  /* Animations */
  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

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

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

    50% {
      transform: scale(1.02);
    }

    100% {
      transform: scale(1);
    }
  }

  /* Link */
  .link-btn {
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
    border-bottom: 1px solid transparent;
  }

  .link-btn:hover {
    opacity: 0.8;
    border-bottom-color: var(--primary);
  }

  /* Hidden */
  .hidden {
    display: none !important;
  }

  /* Accessibility */
  *:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  /* Results Section Styles */
  .results-section {
    display: none;
    max-width: 680px;
    margin: 60px auto;
    padding: 0 20px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
  }
  
  .results-section.active {
    display: block;
  }
  
  .results-container {
    background: var(--background);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow);
  }
  
  .results-header {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .results-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
  }
  
  .results-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
  }
  
  .result-field {
    margin-bottom: 32px;
  }
  
  .result-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
  }
  
  .result-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    background: var(--background);
    color: var(--text);
    transition: all 0.2s ease;
  }
  
  .result-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  }
  
  .questions-preview {
    background: var(--surface-hover);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
  }
  
  .questions-preview h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
  }
  
  .question-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .question-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
  }
  
  .question-item:last-child {
    border-bottom: none;
  }
  
  .question-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
  }
  
  .more-questions {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
  }
  
  .result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
  }
  
  .btn-primary {
    background: var(--primary);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  }
  
  .btn-secondary {
    background: var(--background);
    color: var(--text);
    padding: 14px 32px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .btn-secondary:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
  }
  
  /* Toast Notification Styles */
  .toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 350px;
    font-size: 14px;
  }
  
  .toast.show {
    opacity: 1;
    transform: translateY(0);
  }
  
  .toast.toast-success {
    background: #10b981;
  }
  
  .toast.toast-error {
    background: #ef4444;
  }
  
  .toast.toast-warning {
    background: #f59e0b;
  }
  
  .toast.toast-info {
    background: #3b82f6;
  }

  /* Success Message Styles */
  .success-message {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
  }
  
  .success-message.active {
    display: flex;
    animation: fadeIn 0.3s ease;
  }
  
  .success-content {
    background: var(--background);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 480px;
    margin: 0 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  }
  
  .success-icon {
    font-size: 64px;
    margin-bottom: 24px;
  }
  
  .success-content h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
  }
  
  .success-content p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
  }
  
  .success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
  }

  /* Mobile */
  @media (max-width: 640px) {
    .create-deck-new-container {
      padding: 40px 16px;
    }

    h1 {
      font-size: 28px;
    }

    .content-wrapper {
      padding: 32px 20px;
      border-radius: 16px;
    }

    .tabs {
      gap: 20px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
      display: none;
    }

    .trust-banner {
      flex-direction: column;
      gap: 24px;
    }

    .example-grid {
      grid-template-columns: 1fr;
    }

    .inline-edit {
      flex-direction: column;
    }

    .action-buttons {
      width: 100%;
      flex-direction: column;
    }

    .btn-save,
    .btn-reset {
      width: 100%;
    }
  }

  #materialLoader .tab-content {
    background-color: transparent;
  }

  /* Add these styles to your existing CSS */

  /* Format recovery section - subtle and clean */
  .format-recovery {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
  }

  .format-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
  }

  .detected-format {
    color: #6b7280;
  }

  .change-format-btn {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    text-decoration: underline;
    transition: color 0.2s;
  }

  .change-format-btn:hover {
    color: #2563eb;
  }

  /* Format selection modal */
  .format-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
  }

  .format-modal {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease-out;
  }

  .format-modal h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: #111827;
  }

  .format-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .format-options button {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
  }

  .format-options button:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
    transform: translateX(4px);
  }

  .cancel-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .cancel-btn:hover {
    color: #374151;
  }

  /* Toast notifications */
  .toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.3s ease-out;
    z-index: 1001;
  }

  .toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .toast-success {
    border-left: 4px solid #10b981;
  }

  .toast-error {
    border-left: 4px solid #ef4444;
  }

  /* Animations */
  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes slideUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }

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

  /* Add these styles to your existing CSS */

  /* Format recovery section - subtle and clean */
  .format-recovery {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
  }

  .format-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
  }

  .detected-format {
    color: #6b7280;
  }

  .change-format-btn {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    text-decoration: underline;
    transition: color 0.2s;
  }

  .change-format-btn:hover {
    color: #2563eb;
  }

  /* Format selection modal */
  .format-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
  }

  .format-modal {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease-out;
  }

  .format-modal h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: #111827;
  }

  .format-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .format-options button {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
  }

  .format-options button:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
    transform: translateX(4px);
  }

  .cancel-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .cancel-btn:hover {
    color: #374151;
  }

  /* Toast notifications */
  .toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.3s ease-out;
    z-index: 1001;
  }

  .toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .toast-success {
    border-left: 4px solid #10b981;
  }

  .toast-error {
    border-left: 4px solid #ef4444;
  }

  /* Animations */
  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes slideUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }

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

  /* LLM Fallback UI Styles */

  /* Manual Options Modal */
  .manual-options-modal,
  .format-chooser-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
  }

  .manual-options-modal .modal-content,
  .format-chooser-modal .modal-content {
    background: var(--surface);
    border-radius: 20px;
    padding: 48px;
    max-width: 600px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease-out;
  }

  .manual-options-modal h3,
  .format-chooser-modal h3 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 16px;
    color: var(--text);
  }

  .manual-options-modal p,
  .format-chooser-modal p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
  }

  /* Manual Options */
  .manual-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
  }

  .option-btn {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .option-btn:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }

  .option-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    border-radius: 12px;
  }

  .option-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    display: block;
    margin-bottom: 4px;
  }

  .option-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    display: block;
  }

  /* Format Grid */
  .format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
  }

  .format-option {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
  }

  .format-option:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }

  .format-emoji {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
  }

  .format-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 4px;
  }

  .format-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    display: block;
    line-height: 1.4;
  }

  /* Cancel/Back Buttons */
  .cancel-btn,
  .back-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 100%;
    padding: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .cancel-btn:hover,
  .back-btn:hover {
    color: var(--text-secondary);
  }

  /* AI Notice */
  .ai-notice {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
  }

  .ai-icon {
    font-size: 20px;
    animation: pulse 2s ease-in-out infinite;
  }

  .ai-notice span:not(.ai-icon) {
    flex: 1;
    color: #0369a1;
    font-size: 14px;
    font-weight: 500;
  }

  .dismiss-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #0369a1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
  }

  .dismiss-btn:hover {
    background: rgba(3, 105, 161, 0.1);
  }

  /* Enhanced Processing Overlay for AI */
  .processing-overlay.ai-processing .processing-content {
    text-align: center;
  }

  .processing-progress {
    width: 200px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
    display: none;
  }

  .ai-processing .processing-progress {
    display: block;
  }

  .processing-progress::after {
    content: '';
    display: block;
    height: 100%;
    width: 30%;
    background: var(--primary);
    border-radius: 2px;
    animation: progress 2s ease-in-out infinite;
  }

  @keyframes progress {
    0% {
      transform: translateX(-100%);
    }

    50% {
      transform: translateX(200%);
    }

    100% {
      transform: translateX(400%);
    }
  }

  /* Animations */
  @keyframes slideDown {
    from {
      transform: translateY(-20px);
      opacity: 0;
    }

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

  @keyframes pulse {

    0%,
    100% {
      transform: scale(1);
    }

    50% {
      transform: scale(1.1);
    }
  }

  /* Loading indicator styles */
  .loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
  }

  .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

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

  /* Action options styles */
  .action-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
  }

  .action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
  }

  .action-btn:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateX(4px);
  }

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

  .action-btn.primary:hover {
    background: var(--primary-hover);
  }

  .action-desc {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 4px;
  }

  .complexity-issues {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-size: 14px;
  }

  .complexity-issues ul {
    margin: 8px 0 0 20px;
    list-style: disc;
  }

  /* Conversion notice styles */
  .conversion-notice {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
  }

  .conversion-badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
  }

  .preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
  }

  /* Mobile Responsive */
  @media (max-width: 1024px) {
    .document-preview-panel {
      grid-template-columns: 1fr;
      position: relative;
      height: auto;
    }

    .preview-section {
      height: 50vh;
      border-right: none;
      border-bottom: 1px solid var(--border-light);
    }

    .actions-section {
      height: auto;
      min-height: 50vh;
      padding: 32px 24px;
    }
  }

  @media (max-width: 640px) {

    .manual-options-modal .modal-content,
    .format-chooser-modal .modal-content {
      padding: 32px 20px;
    }

    .format-grid {
      grid-template-columns: 1fr;
    }

    .option-btn {
      padding: 20px 16px;
    }

    .option-icon {
      width: 40px;
      height: 40px;
      font-size: 24px;
    }

    .preview-content {
      padding: 20px;
    }

    .actions-section {
      padding: 24px 16px;
    }

    .back-to-upload {
      top: 10px;
      right: 10px;
      padding: 8px 16px;
      font-size: 13px;
    }
  }

  /* Question Generation Modal Styles */

  .question-generation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
  }

  .question-generation-modal .modal-content {
    background: var(--surface);
    border-radius: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease-out;
  }

  .modal-header {
    padding: 48px 48px 32px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
  }

  .modal-header h3 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 12px;
    color: var(--text);
  }

  .modal-header p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
  }

  /* Content Preview */
  .content-preview {
    padding: 32px 48px;
    background: var(--surface-hover);
    border-bottom: 1px solid var(--border-light);
  }

  .content-preview h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
  }

  .content-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
  }

  .info-item {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Generation Options */
  .generation-options {
    padding: 48px;
  }

  .generation-options h4 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text);
  }

  .generation-btn {
    width: 100%;
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .generation-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.03), transparent);
    transition: left 0.5s ease;
  }

  .generation-btn:hover::before {
    left: 100%;
  }

  .generation-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }

  .option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
  }

  .option-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    border-radius: 10px;
  }

  .option-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
  }

  .option-badge {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .option-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    padding-left: 52px;
  }

  .option-details {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.6;
    padding-left: 52px;
  }

  /* Custom Generation Button */
  .generation-btn.custom {
    background: var(--surface-hover);
    border-style: dashed;
  }

  /* Alternative Actions */
  .alternative-actions {
    padding: 0 48px 48px;
    text-align: center;
  }

  /* Custom Generation Modal */
  .custom-generation-modal .modal-content {
    max-width: 600px;
    padding: 48px;
  }

  .form-section {
    margin-bottom: 32px;
  }

  .form-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .checkbox-group,
  .radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .checkbox-group label,
  .radio-group label {
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
  }

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

  .form-section select,
  .form-section textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s ease;
  }

  .form-section textarea {
    min-height: 80px;
    resize: vertical;
  }

  .form-section select:focus,
  .form-section textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
  }

  .form-actions {
    display: flex;
    gap: 16px;
    margin-top: 40px;
  }

  .form-actions button {
    flex: 1;
  }

  /* Generation Notice */
  .generation-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    animation: slideDown 0.3s ease-out;
  }

  .notice-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }

  .notice-icon {
    font-size: 24px;
    animation: sparkle 2s ease-in-out infinite;
  }

  @keyframes sparkle {

    0%,
    100% {
      transform: scale(1) rotate(0deg);
    }

    50% {
      transform: scale(1.2) rotate(5deg);
    }
  }

  .notice-text {
    flex: 1;
  }

  .notice-text strong {
    display: block;
    color: #92400e;
    margin-bottom: 4px;
  }

  .notice-text p {
    color: #78350f;
    font-size: 14px;
    margin: 0;
  }

  /* Generation Error Modal */
  .generation-error-modal .modal-content {
    max-width: 500px;
    padding: 48px;
    text-align: center;
  }

  .error-info {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    font-size: 14px;
    color: var(--text-secondary);
  }

  .error-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Responsive */
  @media (max-width: 640px) {
    .question-generation-modal .modal-content {
      margin: 20px 0;
    }

    .modal-header,
    .generation-options {
      padding: 32px 24px;
    }

    .content-preview {
      padding: 24px;
    }

    .option-desc,
    .option-details {
      padding-left: 0;
      margin-top: 8px;
    }

    .custom-generation-modal .modal-content {
      padding: 32px 24px;
    }
  }

  /* Document Preview Panel Styles */
  .document-preview-panel {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 0;
    background: var(--background);
    z-index: 100;
    animation: slideInFromRight 0.3s ease-out;
  }

  /* Resize handle between panels */
  .resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    right: 40%;
    cursor: ew-resize;
    background: transparent;
    z-index: 102;
    transition: background 0.2s ease;
  }

  .resize-handle:hover {
    background: var(--primary);
  }

  .resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    background: var(--border);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .resize-handle:hover::before {
    opacity: 1;
  }

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

    to {
      transform: translateX(0);
    }
  }

  @keyframes slideOutToRight {
    from {
      transform: translateX(0);
    }

    to {
      transform: translateX(100%);
    }
  }

  @media (max-width: 1024px) {
    .document-preview-panel {
      grid-template-columns: 1fr;
      position: relative;
      height: auto;
    }
  }

  /* Preview Section */
  .preview-section {
    background: var(--surface);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-light);
    position: relative;
  }
  
  /* Split preview layout */
  .preview-section.split-view {
    display: grid;
    grid-template-rows: auto 1fr;
  }
  
  .preview-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    height: 100%;
    overflow: hidden;
  }
  
  .preview-pane {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  .preview-pane-header {
    padding: 12px 20px;
    background: var(--surface-hover);
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    flex-shrink: 0;
  }
  
  .preview-pane-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  .preview-pane:first-child {
    border-right: 1px solid var(--border-light);
  }
  
  /* Responsive split view */
  @media (max-width: 1200px) {
    .preview-split-container {
      grid-template-columns: 1fr;
      grid-template-rows: 1fr 1fr;
    }
    
    .preview-pane:first-child {
      border-right: none;
      border-bottom: 1px solid var(--border-light);
    }
  }

  /* Subtle background pattern for preview */
  .preview-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
      radial-gradient(circle at 20% 80%, rgba(0, 0, 0, 0.01) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.01) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  .preview-header {
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-light);
    background: var(--surface-hover);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  /* Raw text toggle button */
  .raw-text-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--text-secondary);
  }
  
  .raw-text-toggle:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: var(--primary);
  }
  
  .raw-text-toggle.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  
  .raw-text-toggle .toggle-icon {
    font-size: 16px;
  }

  .preview-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    margin: 0;
  }

  .preview-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
  }

  /* Custom scrollbar for preview content */
  .preview-content::-webkit-scrollbar {
    width: 8px;
  }

  .preview-content::-webkit-scrollbar-track {
    background: var(--border-light);
  }

  .preview-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
  }

  .preview-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
  }

  .preview-content .loading-state {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
  }

  /* Actions Section */
  .actions-section {
    background: var(--surface);
    height: 100vh;
    padding: 48px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    max-width: 600px; /* Limit width on wide screens */
    margin: 0 auto; /* Center the content */
    width: 100%;
  }

  /* Custom scrollbar for actions section */
  .actions-section::-webkit-scrollbar {
    width: 8px;
  }

  .actions-section::-webkit-scrollbar-track {
    background: var(--border-light);
  }

  .actions-section::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
  }

  .actions-section::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
  }

  .actions-header {
    margin-bottom: 32px;
    flex-shrink: 0;
  }

  .actions-title {
    font-size: 24px;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 8px;
  }

  .actions-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
  }

  /* Question Type Cards */
  .question-type-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    flex: 1;
    align-content: start;
  }

  .question-type-card {
    background: var(--surface-hover);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
  }

  .question-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.02), transparent);
    transition: left 0.5s ease;
  }

  .question-type-card:hover::before {
    left: 100%;
  }

  .question-type-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: var(--surface);
  }

  .question-type-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: 8px;
    flex-shrink: 0;
  }

  .question-type-info {
    flex: 1;
  }

  .question-type-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }

  .question-type-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.4;
  }

  .question-type-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 600;
    position: absolute;
    top: 12px;
    right: 12px;
  }

  /* Alternative Options */
  .alternative-options {
    margin-top: auto;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
    text-align: center;
  }

  .alternative-options p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
  }

  .alternative-options .btn {
    margin: 0 auto;
    max-width: 300px;
  }

  /* Back to Upload Button */
  .back-to-upload {
    position: fixed;
    top: 60px;
    right: 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 101;
    box-shadow: var(--shadow);
  }

  .back-to-upload:hover {
    background: var(--surface-hover);
    color: var(--text);
    transform: translateX(-2px);
    box-shadow: var(--shadow-lg);
  }

  /* OCR Modal Styles */
  .ocr-modal .options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
  }

  .ocr-modal .btn {
    width: 100%;
  }

  /* Image preview in document panel */
  .image-preview img {
    max-height: 600px;
    object-fit: contain;
  }

  .image-preview .extracted-text {
    margin-top: 32px;
    padding: 24px;
    background: var(--surface-hover);
    border-radius: 12px;
    border: 1px solid var(--border-light);
  }

  /* Multiple file type icons in dropzone */
  .dropzone-icon {
    display: flex;
    gap: 8px;
    justify-content: center;
    font-size: 36px !important;
  }

  /* Enhanced dropzone hint */
  #dropzone-hint {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }

  #dropzone-hint span {
    display: block;
  }

  /* File type badge in preview */
  .file-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--border-light);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
  }

  /* Loading state for OCR processing */
  .processing-overlay.ocr-processing .processing-text {
    font-weight: 500;
  }

  .processing-overlay.ocr-processing .processing-subtext {
    margin-top: 8px;
  }

  /* OCR progress indicator */
  .ocr-progress {
    width: 200px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin-top: 16px;
    overflow: hidden;
  }

  .ocr-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
    animation: ocr-progress-animation 3s ease-in-out infinite;
  }

  @keyframes ocr-progress-animation {
    0% {
      width: 0%;
    }

    50% {
      width: 70%;
    }

    100% {
      width: 0%;
    }
  }

  /* Add this to your existing CSS */

  /* Confidence Indicators */
  .confidence-indicator {
    margin-bottom: 16px;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
  }

  .confidence-high {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #10b981;
    color: #065f46;
  }

  .confidence-low {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    color: #92400e;
  }

  /* Alternative options with confidence bars */
  .alternative-confidence {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
  }

  .confidence-bar {
    flex: 1;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
  }

  .confidence-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    transition: width 0.3s ease;
  }

  .confidence-text {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
  }

  /* Enhanced Learning Options Styles */
  .learning-option-card {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .learning-option-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }

  .learning-option-card.recommended {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #3b82f6;
  }

  .learning-mode-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
  }

  .learning-mode-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
  }

  .learning-mode-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
  }

  .learning-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }

  .feature-pill {
    background: var(--border-light);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .feature-pill.highlight {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 500;
  }

  .ai-powered-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .learning-stats {
    background: var(--surface-hover);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
  }

  .stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
  }

  .stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
  }

  /* Enhanced Learning Options Styles */
  .learning-option-card {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .learning-option-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }

  .learning-option-card.recommended {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #3b82f6;
  }

  .learning-mode-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
  }

  .learning-mode-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
  }

  .learning-mode-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
  }

  .learning-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }

  .feature-pill {
    background: var(--border-light);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .feature-pill.highlight {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 500;
  }

  .ai-powered-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .learning-stats {
    background: var(--surface-hover);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
  }

  .stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
  }

  .stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
  }
