
    body {
      margin: 0;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;      
    }

    .index h2 {
  color: #125ba0;
  font-size: 1.5em; /* Adjust size as needed */
  margin-bottom: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05); /* Subtle divider */
}
    .container {
  display: flex;
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100vh;
  overflow: hidden;
    }
    .index {
        overflow-y: scroll; /* Always show scrollbar */
  scrollbar-width: thin; /* For Firefox */
      width: 400px;
      background-color: #f4f4f4;
      padding: 10px;
      overflow-y: auto;
      box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }
    .index::-webkit-scrollbar {
  width: 8px;
   }
   .index::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
    .image-viewer {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      position: relative;
      background-color: #fff;
      overflow: hidden;
    }
    .viewer-topbar {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 50px;
      position: relative;
      border-bottom: 1px solid #ddd;
    }
    .nav-buttons {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }
    .nav-buttons button {
      margin: 0 5px;
      padding: 6px 12px;
      font-size: 14px;
      cursor: pointer;
      border: none;
      border-radius: 4px;
      background-color: #125ba0;
      color: white;
    }
    .nav-buttons button:hover {
      background-color: #125ba0;
    }
    .download-button {
      position: absolute;
      right: 20px;
      top: 10px;
    }
    .download-button a {
      padding: 8px 12px;
      background-color: #388e3c;
      color: white;
      text-decoration: none;
      border-radius: 4px;
      font-size: 14px;
    }
    .download-button a:hover {
      background-color: #2e7d32;
    }
    .viewer-content {
      flex-grow: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: #000;
    }
    .viewer-content img {
      max-width: 100%;
      max-height: 100%;
      cursor: zoom-in;
    }
    ul {
      list-style: none;
      padding-left: 15px;
    }
    .toggle {
      cursor: pointer;
      user-select: none;
    }
    .toggle::before {
      content: '+ ';
      font-weight: bold;
    }
    .toggle.expanded::before {
      content: '- ';
    }
    .nested {
      display: none;
    }
    .nested.visible {
      display: block;
    }
    li {
      margin: 5px 0;
    }
    li span.page {
      cursor: pointer;
      color: blue;
      padding: 2px 5px;
      display: inline-block;
    }
    li span.page:hover {
      background-color: #d0e0ff;
      border-radius: 4px;
    }
    li span.page.active {
      background-color: #1976d2;
      color: white;
      border-radius: 4px;
    }
    .fullscreen {
      position: fixed !important;
      top: 0;
      left: 0;
      width: 100vw !important;
      height: 100vh !important;
      background-color: black;
      z-index: 9999;
      }

    .return-button {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 10000;
      background-color: #e53935;
      color: white;
      padding: 10px 15px;
      border: none;
      border-radius: 4px;
      font-size: 14px;
      cursor: pointer;
      display: none;
    }
    .fullscreen .return-button {
      display: block;
    }
 /* Add these styles to your existing CSS */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden; /* Prevent body scrolling */
}

.container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden; /* Contain all scrolling within */
}

.index {
  width: 400px;
  background-color: #f4f4f4;
  padding: 10px;
  overflow-y: auto; /* Changed from scroll to auto */
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  scrollbar-gutter: stable; /* Key fix for consistent scrollbar space */
  flex-shrink: 0; /* Prevent width changes */
}

/* Keep your existing scrollbar styling */
.index::-webkit-scrollbar {
  width: 8px;
}
.index::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.image-viewer {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: #fff;
  overflow: hidden;
}
.highlight {
  background-color: yellow;
  color: black;
  font-weight: bold;
}
.image-viewer.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 1000;
  padding: 20px;
  overflow: auto;
}

.image-viewer.fullscreen .viewer-content img {
  max-width: 100%;
  max-height: calc(100vh - 100px);
  display: block;
  margin: 0 auto;
}

.image-viewer.fullscreen .return-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 1001;
}