
:root {
  --font-size: 90%;
  --letter-spacing: normal;
  --word-spacing: normal;
  --line-height: 1.5;
}

html {
  font-size: var(--font-size);
}

body {
  font-size: 1rem;
  letter-spacing: var(--letter-spacing);
  word-spacing: var(--word-spacing);
  line-height: var(--line-height);
}

/* Force inheritance for most elements */
body * {
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
}

/* Exceptions for form elements */
input, button, textarea, select {
  font-size: initial;
  line-height: normal;
}

/* Dyslexia Font */
    .dyslexia-font {
      font-family: 'Comic Sans MS', 'OpenDyslexic', Arial, sans-serif;
    }

    /* Night Mode */
    .night-mode {
      background-color: #1a1a1a !important;
      color: #e0e0e0 !important;
    }

    /* Desaturate Theme */
    .desaturate-theme {
      filter: saturate(0.3);
    }

    /* Blue Filter */
    .blue-filter {
      filter: hue-rotate(180deg) brightness(1.1) contrast(1.1);
    }

    /* Big Cursor */
    .big-cursor * {
      cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M4 4 L28 4 L4 28 Z" fill="%23000"/></svg>') 16 16, pointer !important;
    }

    /* Tall Links */
    .tall-links a {
      padding: 4px 8px;
      margin: 2px 0;
      display: inline-block;
      border-radius: 4px;
      background-color: rgb(37 99 235 / 23%);
      transition: all 0.2s ease;
    }

    .tall-links a:hover {
      background-color: rgba(37, 99, 235, 0.2);
      text-decoration: none;
    }

    /* Help Button */
    #helpButton {
      position: fixed;
      bottom: 143px;
      right: 9px;
      width: 51px;
      height: 51px;
      border-radius: 50%;
      background: linear-gradient(90deg, rgb(78 81 229) 1%, rgb(125 192 251 / 98%) 100%);
      color: white;
      font-size: 24px;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 10px rgba(0,0,0,0.2);
      transition: transform 0.2s ease;
      z-index: 100;
    }

    #helpButton:hover {
      transform: scale(1.1);
    }

    /* Tooltip */
    .tooltip {
      position: absolute;
      bottom: 100%;
      right: 50%;
      transform: translateX(50%);
      margin-bottom: 12px;
      background-color: #1f2937;
      color: white;
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 12px;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .tooltip::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 5px solid #1f2937;
    }

    #helpButton:hover .tooltip {
      opacity: 1;
      transform: translateX(50%) translateY(0);
    }

    /* Modal Backdrop */
    #modalBackdrop {
      position: fixed;
      inset: 0;
      background: none !important;
      display: none;
      align-items: center;
      justify-content: end;
      z-index: 1000;
          right: 12px;
    }

    /* Modal Box */
    #accessibilityModal {
      background: white;
      border-radius: 16px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.2);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: all 0.3s ease;
      animation: fadeIn 0.3s ease;
      margin-top: 14%;
    }

    .modal-normal {
      width: 90vw;
      max-width: 330px;
      min-height: 70vh;
    }

    .modal-xl {
      width: 95vw !important;
      max-width: 800px !important;
      min-height: 90vh;
      max-height: 95vh;
    }

    /* Animations */
    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes fadeOut {
      from {
        opacity: 1;
        transform: translateY(0);
      }
      to {
        opacity: 0;
        transform: translateY(30px);
      }
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Header */
    .modal-header {
      background: linear-gradient(90deg, rgb(78 81 229) 1%, rgb(125 192 251 / 98%) 100%);
      color: white;
      padding: 16px 24px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .modal-header .left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .modal-header .icon-circle {
      width: 40px;
      height: 40px;
      background: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #2563eb;
      font-size: 18px;
    }

    .modal-header .title {
      font-size: 18px;
      font-weight: bold;
    }

    .modal-header .subtitle {
      font-size: 13px;
      opacity: 0.9;
    }

    .modal-header .actions button {
      background: transparent;
      border: none;
      color: white;
      font-size: 18px;
      cursor: pointer;
      margin-left: 8px;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
    }

    .modal-header .actions button:hover {
      background-color: rgba(255, 255, 255, 0.2);
      transform: scale(1.1);
    }

    /* Modal Content */
    .modal-content {
      padding: 24px;
    overflow-y: auto;
    height: 52vh;
    }

    /* Active Features Section */
    .active-features {
      background-color: #f9fafb;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 24px;
      display: none;
      animation: slideUp 0.3s ease;
    }

    .active-features-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    .active-features-header span {
      font-size: 14px;
      font-weight: 500;
      color: #4b5563;
    }

    .reset-button {
      background: linear-gradient(to right, #ef4444, #dc2626);
      color: white;
      border: none;
      border-radius: 8px;
      padding: 6px 12px;
      font-size: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      transition: transform 0.2s ease;
    }

    .reset-button:hover {
      transform: scale(1.05);
    }

    .active-features-list {
      background-color: white;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      padding: 12px;
    }

    .active-feature-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      font-size: 14px;
      color: #4b5563;
    }

    .active-feature-item:not(:last-child) {
      border-bottom: 1px solid #f3f4f6;
    }

    .active-feature-item .feature-name {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .active-feature-item .feature-name i {
      color: #10b981;
    }

    .remove-feature {
      background: none;
      border: none;
      color: #9ca3af;
      cursor: pointer;
      padding: 4px;
      border-radius: 50%;
      transition: all 0.2s ease;
    }

    .remove-feature:hover {
      color: #ef4444;
      background-color: #f9fafb;
      transform: scale(1.1);
    }

    /* Quick Access Section */
    .section-title {
      font-size: 18px;
      font-weight: 600;
      color: #111827;
      margin-bottom: 16px;
    }

    .options-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-bottom: 24px;
    }

    @media (max-width: 480px) {
      .options-grid {
        grid-template-columns: 1fr;
      }
    }

    .option-button {
      background-color: white;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      padding: 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .option-button:hover {
      box-shadow: 0 4px 6px rgba(0,0,0,0.05);
      transform: translateY(-2px);
    }

    .option-button.selected {
      box-shadow: 0 0 0 2px #3b82f6;
    }

    .option-icon {
      width: 40px;
      height: 40px;
      background-color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 8px;
      font-size: 16px;
    }

    .option-button.selected .option-icon {
      background-color: #dbeafe;
      color: #2563eb;
    }

    .option-label {
      font-size: 14px;
      font-weight: 500;
      color: #111827;
      transition: opacity 0.3s ease;
    }

    /* Range Sliders */
    .range-container {
      padding: 12px;
      margin-top: 8px;
      display: none;
    }

    .range-slider {
      width: 100%;
      margin: 8px 0;
    }

    .slider-value {
      text-align: center;
      font-weight: bold;
    }

    .cursor-preview {
      text-align: center;
      margin-top: 8px;
      font-size: 24px;
    }

    /* More Options Section */
    .more-options-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
      background: none;
      border: none;
      color: #2563eb;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      padding: 8px;
      margin-bottom: 16px;
      transition: all 0.2s ease;
    }

    .more-options-toggle:hover {
      color: #1d4ed8;
    }

    .more-options-toggle i {
      transition: transform 0.2s ease;
    }

    .more-options-toggle.expanded i {
      transform: rotate(180deg);
    }

    .more-options {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease;
    }

    .more-options.expanded {
      max-height: 1000px;
    }

    /* Translation Modal */
    #translationModal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      z-index: 3000;
      align-items: center;
      justify-content: center;
    }

    .translation-content {
      background: white;
      padding: 20px;
      border-radius: 8px;
      width: 90%;
      max-width: 400px;
    }

    .language-option {
      padding: 12px;
      margin: 8px 0;
      border: 1px solid #ddd;
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .language-option:hover {
      background: #f5f5f5;
    }

    /* Modal Footer */
    .modal-footer {
      background-color: #f9fafb;
      border-top: 1px solid #e5e7eb;
      padding: 16px 24px;
      text-align: center;
      font-size: 12px;
      color: #6b7280;
      display: flex;
     justify-content: center;
    }

    /* Custom Scrollbar */
    .modal-content::-webkit-scrollbar {
      width: 6px;
    }

    .modal-content::-webkit-scrollbar-track {
      background: #f1f5f9;
      border-radius: 3px;
    }

    .modal-content::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 3px;
    }

    /* Test Content */
    .test-content {
      max-width: 800px;
      margin: 0 auto;
    }

    h1 {
      margin: 20px 0;
      color: #1f2937;
    }

    button, input {
      margin: 8px 0;
      padding: 8px 12px;
    }

    a {
      color: #2563eb;
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    .night-mode-icon {
  transition: transform 0.3s ease;
}
.animate__flip {
  animation-name: flip;
  animation-duration: 0.6s;
}
@keyframes flip {
  from {
    transform: perspective(400px) rotateY(0);
  }
  50% {
    transform: perspective(400px) rotateY(90deg);
  }
  to {
    transform: perspective(400px) rotateY(0);
  }
}
[data-night-icon="true"] {
  transition: all 0.3s ease;
  display: inline-block;
}

.animate__flip {
  animation: flip 0.6s ease;
}

@keyframes flip {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0); }
}
.bi .bi-sun-fill
{
  color: #dbbd60 !important;
}
.animate__fadeIn {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Text highlight style */
.text-speech-highlight {
  background-color: #ffeb3b; /* Yellow highlight */
  color: #000;
  padding: 2px 0;
  border-radius: 3px;
  box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

/* Speaker icon animation */
[data-speaker-icon="true"] {
  transition: all 0.3s ease;
}

.animate__pulse {
  animation: pulse 0.5s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

        

      :root {
        --brand: #4f46e5;
        --brand-2: #7c3aed;
        --fg: #f4f4f5;
        --bg: #1a1a1d;
        --shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
      }

      .chat-widget {
        position: fixed;
        bottom: 22px;
        right: 22px;
        z-index: 9999;
        color: var(--fg);
      }

      /* Floating button */
      .chat-fab {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        background: linear-gradient(135deg, var(--brand), var(--brand-2));
        color: #fff;
        box-shadow: var(--shadow);
        display: grid;
        place-items: center;
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        position: relative;
        z-index: 2;
        transform: translateX(120px);
        opacity: 0;
        animation: slideIn 0.6s ease forwards;
      }
      .chat-fab:hover {
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
      }
      .chat-fab:active {
        transform: scale(0.96);
      }
      .chat-fab svg {
        width: 28px;
        height: 28px;
      }

      @keyframes slideIn {
        to {
          transform: translateX(0);
          opacity: 1;
        }
      }

      /* Tooltip */
      .chat-tooltip {
        position: absolute;
        right: 72px;
        bottom: 10px;
        min-width: 180px;
        max-width: 240px;
        background: rgba(32, 32, 36, 0.9);
        color: var(--fg);
        border-radius: 14px;
        font-size: 14px;
        padding: 10px 14px;
        line-height: 1.3;
        box-shadow: var(--shadow);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        overflow: hidden;
        white-space: nowrap;
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
        pointer-events: none;
      }
      .chat-tooltip.show {
        opacity: 1;
        transform: translateX(0);
      }
      .chat-tooltip::after {
        content: "";
        position: absolute;
        right: -8px;
        bottom: 14px;
        border: 8px solid transparent;
        border-left-color: rgba(32, 32, 36, 0.9);
      }
        
