.help-docs-container {
  line-height: 1.6;
  color: var(--text-help-color, #333);
  background: var(--bg-help-color, #fff);
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

.help-docs-container[data-theme="dark"] {
  --text-help-color: #e9e1e4;
  --bg-help-color: #1a1d23;
  --border-help-color: #30363d;
  --code-help-bg: #161b22;
  --note-info-bg: #0d419d20;
  --note-warning-bg: #d1830020;
  --note-error-bg: #da373720;
  --note-success-bg: #2ea04320;
  --note-tip-bg: #a25ac120;
}

.help-docs-container[data-theme="light"] {
  --text-help-color: #3e3647;
  --bg-help-color: #ffffff;
  --border-help-color: #f3dffd;
  --code-help-bg: #f6f8fa;
  --note-info-bg: #dbeafe;
  --note-warning-bg: #fef3c7;
  --note-error-bg: #fee2e2;
  --note-success-bg: #3a5242;
  --note-tip-bg: #ede9fe;
}

.help-docs-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-help-color, #e1e5e9);
}

.help-docs-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  justify-content: space-between;
  width: 100%;
}

.help-docs-title h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.version {
  background: rgb(241, 227, 252);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.description {
  margin: 0;
  font-size: 1.125rem;
  opacity: 0.8;
  text-align: center;
}

.help-docs-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  color: rgba(59, 1, 114, 0.925);
}

.help-docs-section {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-out;
}

.help-docs-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.section-content {
  width: 100%;
}

.text-content {
  font-size: 1rem;
  line-height: 1.7;
}

.text-content p {
  margin: 1rem 0;
}

.text-content strong {
  font-weight: 600;
}
ul {
  padding: 0.75rem 1rem;
}
li {
  color: rgba(1, 54, 97, 0.753);
}

.text-content code {
  background: var(--code-help-bg, #f6f8fa);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.code-block {
  position: relative;
  background: var(--code-help-bg, #f8faf6);
  border: 1px solid var(--border-help-color, #d0d7de);
  border-radius: 0.5rem;
  overflow: hidden;
}

.code-title {
  padding: 0.75rem 1rem;
  background: #f3dffd;
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-help-color, #d0d7de);
}

.code-desc {
  padding: 0.75rem 1rem;
  background-color: #f4effc;
}

.code-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

.help-code-block {
  background: #2d3748;
  color: #e2e8f0;
  padding: 1.5rem;
  margin: 0;
  overflow-x: auto;
  border-radius: 0.5rem;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: var(--border-help-color, #d0d7de);
}

.tab-container {
  margin-top: 10px;
  width: 100%;
  padding: 0.75rem 1rem;
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid #ccc;
  width: 100%;
  overflow: auto;
  padding-bottom: 10px;
}

.tab-button {
  padding: 8px 16px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-bottom: none;
  cursor: pointer;
  flex: 1; /* This makes tabs equally distribute width */
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 0px;
}

.tab-button.active {
  background: #e8ddfa;
  border-bottom: 1px solid white;
  margin-bottom: -1px;
}

.tab-content {
  width: 100%;
  overflow: auto;
}

.tab-panel {
  display: none;
  width: 100%;
}

.tab-panel.active {
  display: block;
}

/* Stretch table to match tab container width */
.tab-stretched-table {
  width: 100% !important;
  table-layout: fixed; /* Ensures consistent column widths */
}

.tab-stretched-table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* For very long tab lists, allow scrolling */
@media (max-width: 768px) {
  .tab-nav {
    overflow-x: auto;
    white-space: nowrap;
  }

  .tab-button {
    flex: 0 0 auto;
    min-width: 120px;
  }
}

.blockly-play-container {
  border: 1px solid var(--border-help-color, #d0d7de);
  border-radius: 0.5rem;
  background: #fff;
  width: 100%;
  height: 300px;
  position: relative;
  overflow: hidden;
}

.blockly-play-workspace {
  min-height: 200px;
  width: 100%;
  height: 100%;
}

.highlighted-note {
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.note-info {
  background: var(--note-info-bg, #dbeafe);
  border-left-color: #3b82f6;
}

.note-warning {
  background: var(--note-warning-bg, #fef3c7);
  border-left-color: #f59e0b;
}

.note-error {
  background: var(--note-error-bg, #fee2e2);
  border-left-color: #ef4444;
}

.note-success {
  background: #dcfce7;
  border-left-color: #22c55e;
}

.note-tip {
  background: var(--note-tip-bg, #ede9fe);
  border-left-color: #8b5cf6;
}

.note-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.note-icon {
  font-size: 1.25rem;
}

.note-title {
  font-weight: 600;
  font-size: 1rem;
}

.note-content {
  font-size: 0.95rem;
  line-height: 1.6;
}

.section-separator {
  border: none;
  height: 2px;
  background: var(--border-help-color, #d0d7de);
  margin: 1rem 0;
}

.help-docs-error {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--note-error-bg, #fee2e2);
  border-radius: 0.5rem;
  border: 1px solid #ef4444;
}

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

/* Image Styles */
.help-image-container {
  margin: 1.5rem 0;
  text-align: center;
}

.help-image {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.help-image-caption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6c757d;
  font-style: italic;
}

/* Video Styles */
.help-video-container {
  margin: 1.5rem 0;
}

.help-video-title {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #495057;
}

.help-video {
  width: 100%;
  max-width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0);
}

/* Table Styles */
.help-table-container {
  margin: 1.5rem 0;
}

.help-table-title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.help-table-wrapper {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.help-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.9rem;
}

.help-table th,
.help-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.help-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  position: sticky;
  top: 0;
  z-index: 10;
}

.help-table td {
  border-bottom: 1px solid #dee2e6;
}

.help-table-striped tbody tr:nth-child(odd) {
  background: #f8f9fa;
}

.help-table-bordered {
  border: 2px solid #dee2e6;
}

.help-table-bordered th,
.help-table-bordered td {
  border: 1px solid #dee2e6;
}

/* 3D Viewer Styles */
.help-3d-container {
  margin: 1rem 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}

.help-3d-title {
  font-weight: bold;
  font-size: 1.1em;
  padding: 0.75rem 1rem;
  background: #e7d3f8;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}

.help-3d-container .help-text{
  padding: 4px;
}

.help-text .help-url{
  color: #5b07f8;
}

.help-block button.help-url{
  color: #3a03a1;
  background-color: #e0d4fa;
}

.help-3d-viewer {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-3d-viewer canvas{
  border-radius: 0px;
  background-color: #fefefe;
}

.help-3d-loading,
.help-3d-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
}

.help-3d-loading {
  color: #666;
  font-size: 14px;
}

.help-3d-error {
  color: #d32f2f;
  font-size: 14px;
}

.help-3d-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  z-index: 20;
}

.control-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  backdrop-filter: blur(5px);
}

.control-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.control-btn.active {
  background: #e7d3f8;
  color: white;
  border-color: #e7d3f8;
}

.help-docs-buttons{
  padding: 16px 24px;
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  flex-shrink: 0;
  background: #f3e9fdbb;
  border-radius: 6px;
  justify-content: center;
}

.help-docs-buttons button {
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  background: #edddfc96;
  border: 2px solid #c691fcbb;
  font-size: 16px;
  font-weight: 500;
  text-align:center;
}

/* Dark theme adjustments */
[data-theme="dark"] .help-3d-container {
  background: #1e1e1e;
  border-color: #333;
}

[data-theme="dark"] .help-3d-title {
  background: #2d2d2d;
  border-color: #333;
  color: #fff;
}

[data-theme="dark"] .control-btn {
  background: rgba(30, 30, 30, 0.9);
  border-color: #555;
  color: #fff;
}

[data-theme="dark"] .control-btn:hover {
  background: rgba(30, 30, 30, 1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .help-3d-viewer {
    min-height: 300px;
  }

  .help-3d-controls {
    top: 5px;
    right: 5px;
  }

  .control-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* Responsive table adjustments */
@media (max-width: 768px) {
  .help-table th,
  .help-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .help-table-title {
    font-size: 1rem;
  }
}

/* Dark theme table styles */
/*@media (prefers-color-scheme: dark) {
  .help-table {
    background: #2d2d2d;
    color: #e0e0e0;
  }

  .help-table th {
    background: #404040;
    color: #ffffff;
    border-bottom-color: #555;
  }

  .help-table td {
    border-bottom-color: #555;
  }

  .help-table-striped tbody tr:nth-child(odd) {
    background: #363636;
  }

  .help-table-bordered {
    border-color: #555;
  }

  .help-table-bordered th,
  .help-table-bordered td {
    border-color: #555;
  }

  .help-table-title {
    color: #e0e0e0;
  }
}*/

/* Responsive Design */
@media (max-width: 768px) {
  .help-docs-container {
    padding: 0.75rem;
  }

  .help-docs-title h1 {
    font-size: 1.75rem;
  }

  .help-docs-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .code-block pre {
    font-size: 0.8rem;
    padding: 0.75rem;
  }

  .highlighted-note {
    padding: 0.75rem;
  }

  .blockly-play-workspace {
    min-height: 150px;
  }
}

@media (max-width: 480px) {
  .help-docs-container {
    padding: 0.5rem;
  }

  .help-docs-title h1 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.25rem;
  }
}

/* Performance optimizations */
.help-docs-section {
  contain: layout style paint;
}

.blockly-play-workspace {
  contain: strict;
}

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
  .help-docs-container {
    scroll-behavior: smooth;
  }
}

/* Help Modal Styles - Optimized for help-docs-v2 integration */
      .help-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1000 !important;
        opacity: 0;
        visibility: hidden;
      }

      .help-modal-overlay.show {
        opacity:0.9;
        visibility: visible;
      }

      .help-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        border-radius: 12px;
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
        z-index: 1001 !important;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        opacity: 1;
        backdrop-filter: blur(20px);
        visibility: hidden;
      }

      .help-modal.fade.show {
        opacity: 0.95;
        visibility: visible;
        transform: translate(-50%, -50%);
      }

      .help-modal.slide-up {
        transform: translate(-50%, 100%);
      }

      .help-modal.slide-up.show {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%);
      }

      .help-modal.slide-down {
        transform: translate(-50%, -100%);
      }

      .help-modal.slide-down.show {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%);
      }

      .help-modal.zoom {
        transform: translate(-50%, -50%) scale(0.7);
      }

      .help-modal.zoom.show {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
      }

      /* Modal Sizes */
      .help-modal.size-small {
        width: 500px;
        height: 400px;
      }

      .help-modal.size-medium {
        width: 800px;
        height: 600px;
      }

      .help-modal.size-large {
        width: 1200px;
        height: 800px;
      }

      .help-modal.size-fullscreen {
        width: calc(100vw - 40px);
        height: calc(100vh - 40px);
        max-width: none;
        max-height: none;
      }

      /* Modal Header */
      .help-modal-header {
        padding: 24px 32px 20px;
        border-bottom: 1px solid #e9ecef;
        background: #dcbafa;
        color: white;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        flex-shrink: 0;
      }

      .help-modal-title-container {
        flex: 1;
        min-width: 0;
      }

      .help-modal-title {
        margin: 0 0 8px 0;
        font-size: 1.75rem;
        font-weight: 700;
        color: #330469;
        line-height: 1.3;
      }

      .help-modal-subtitle {
        margin: 0;
        font-size: 1rem;
        color: #654886;
        line-height: 1.4;
        opacity: 0.9;
      }

      .help-modal-close-button {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        padding: 8px;
        margin-left: 16px;
        border-radius: 8px;
        transition: all 0.2s ease;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
      }

      .help-modal-close-button:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.05);
      }

      .help-modal-close-button:focus {
        outline: 2px solid rgba(255, 255, 255, 0.5);
        outline-offset: 2px;
      }

      /* Modal Body - Optimized for help-docs-v2 */
      .help-modal-body {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        min-height: 0;
        background: #f8f9fa;
      }

      /* Help Documentation Integration - Override help-docs-v2 styles for modal */
      .help-modal-body .help-documentation-v2 {
        height: 100%;
        max-width: none;
        margin: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        font-family: inherit;
      }

      .help-modal-body .help-wrapper {
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
      }

      /* Hide the original header since we have modal header */
      .help-modal-body .help-header {
        flex-shrink: 0;
        position: static;
        top: auto;
        z-index: auto;
        padding: 16px 24px;
        margin-bottom: 0;
        background: white;
        color: #333;
        border-bottom: 1px solid #e9ecef;
        text-align: left;
      }

      /* Hide title in help header */
      .help-modal-body .help-title-container {
        display: none;
      }

      /* Keep search functionality visible and styled */
      .help-modal-body .help-search-container {
        max-width: 100%;
        margin: 0;
        position: relative;
      }

      .help-modal-body .help-search-input {
        width: 100%;
        padding: 12px 16px;
        border: 1px solid #ced4da;
        border-radius: 8px;
        font-size: 1rem;
        background: white;
        transition: all 0.2s ease;
      }

      .help-modal-body .help-search-input:focus {
        outline: none;
        border-color: #af66eaff;
      }

      .help-modal-body .help-search-results {
        z-index: 1002;
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #ced4da;
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        max-height: 300px;
        overflow-y: auto;
      }

      /* Main content layout */
      .help-modal-body .help-main {
        flex: 1;
        overflow: hidden;
        display: flex;
        padding: 0;
        gap: 0;
        min-height: 0;
      }

      /* Sidebar styling */
      .help-modal-body .help-sidebar {
        position: static;
        top: auto;
        height: 100%;
        max-height: 100%;
        flex: 0 0 280px;
        background: white;
        border-right: 1px solid #e9ecef;
        border-radius: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 24px;
        box-shadow: none;
      }

      /* Content area styling */
      .help-modal-body .help-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 24px 32px;
        padding-bottom: 64px;
        min-height: 0;
        height: 100%;
        scroll-behavior: smooth;
        background: white;
      }

      /* Section styling adjustments */
      .help-modal-body .help-section {
        margin-bottom: 3rem;
        scroll-margin-top: 20px;
        padding: 0;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        border: none;
      }

      .help-modal-body .help-section-header {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #e4cffdff;
      }

      .help-modal-body .help-section-title {
        font-size: 1.75rem;
        font-weight: 700;
        color: #333;
        margin: 0 0 0.5rem 0;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }

      .help-modal-body .help-section-description {
        color: #666;
        margin: 0;
        font-size: 1.1rem;
        line-height: 1.6;
      }

      /* TOC improvements */
      .help-modal-body .help-toc-title {
        margin: 0 0 1.5rem 0;
        font-size: 1.25rem;
        font-weight: 700;
        color: #333;
        text-align: center;
        padding-bottom: 1rem;
        border-bottom: 2px solid #e4cffdff;
      }

      .help-modal-body .help-toc-link {
        display: block;
        padding: 12px 16px;
        color: #555;
        text-decoration: none;
        border-radius: 8px;
        font-size: 0.95rem;
        line-height: 1.4;
        transition: all 0.2s ease;
        margin-bottom: 4px;
      }

      .help-modal-body .help-toc-link:hover {
        background: rgba(230, 192, 248, 0.23);
        color: #333;
        transform: translateX(4px);
      }

      .help-modal-body .help-toc-link.active {
        background: #7f58a7e3;
        color: white;
      }

      /* Loading and error states */
      .help-modal-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 60px 40px;
        color: #667eea;
        font-size: 1.1rem;
        font-weight: 600;
      }

      .help-modal-loading::after {
        content: '';
        width: 24px;
        height: 24px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #667eea;
        border-radius: 50%;
        animation: help-modal-spin 1s linear infinite;
        margin-left: 16px;
      }

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

      .help-modal-error {
        padding: 60px 40px;
        text-align: center;
        color: #dc3545;
      }

      .help-modal-error-title {
        margin: 0 0 12px 0;
        font-size: 1.25rem;
        font-weight: 600;
      }

      .help-modal-error-message {
        margin: 0;
        font-size: 1rem;
        color: #6c757d;
      }

      /* Responsive Design */
      @media (max-width: 1024px) {
        .help-modal.size-large {
          width: calc(100vw - 40px);
          height: calc(100vh - 40px);
        }
        
        .help-modal-body .help-sidebar {
          flex: 0 0 250px;
          padding: 20px;
        }
        
        .help-modal-body .help-content {
          padding: 20px 24px;
          padding-bottom: 60px;
        }
      }

      @media (max-width: 768px) {
        .help-modal {
          width: calc(100vw - 20px);
          height: calc(100vh - 20px);
          max-width: none;
          max-height: none;
        }

        .help-modal-header {
          padding: 20px 24px 16px;
        }

        .help-modal-title {
          font-size: 1.5rem;
        }

        /* Stack sidebar on mobile */
        .help-modal-body .help-main {
          flex-direction: column;
        }

        .help-modal-body .help-sidebar {
          position: static;
          flex: none;
          order: -1;
          max-height: 200px;
          border-right: none;
          border-bottom: 1px solid #e9ecef;
          padding: 16px 20px;
        }

        .help-modal-body .help-content {
          padding: 20px;
          padding-bottom: 60px;
        }

        .help-modal-body .help-header {
          padding: 12px 20px;
        }

        .help-modal-body .help-section-title {
          font-size: 1.5rem;
        }
        
        .help-modal-body .help-toc-title {
          font-size: 1.1rem;
        }
      }

      @media (max-width: 480px) {
        .help-modal {
          width: calc(100vw - 10px);
          height: calc(100vh - 10px);
        }

        .help-modal-header {
          padding: 16px 20px 12px;
        }

        .help-modal-title {
          font-size: 1.3rem;
        }

        .help-modal-body .help-content {
          padding: 16px;
          padding-bottom: 60px;
        }

        .help-modal-body .help-sidebar {
          padding: 12px 16px;
          max-height: 150px;
        }
      }

      /* Scroll improvements */
      .help-modal-body .help-content::-webkit-scrollbar {
        width: 8px;
      }

      .help-modal-body .help-content::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
      }

      .help-modal-body .help-content::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
      }

      .help-modal-body .help-content::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
      }

      .help-modal-body .help-sidebar::-webkit-scrollbar {
        width: 6px;
      }

      .help-modal-body .help-sidebar::-webkit-scrollbar-track {
        background: #f8f9fa;
      }

      .help-modal-body .help-sidebar::-webkit-scrollbar-thumb {
        background: #dee2e6;
        border-radius: 3px;
      }

      /* Accessibility */
      .help-modal *:focus-visible {
        outline: 2px solid #667eea;
        outline-offset: 2px;
        border-radius: 2px;
      }

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

      /* Dark theme support */
      /*@media (prefers-color-scheme: dark) {
        .help-modal {
          background: #1a1a1a;
          color: #e0e0e0;
        }

        .help-modal-body {
          background: #0a0a0b;
        }

        .help-modal-body .help-header {
          background: #1a1a1a;
          border-bottom-color: #333;
          color: #e0e0e0;
        }

        .help-modal-body .help-sidebar,
        .help-modal-body .help-content {
          background: #1a1a1a;
        }

        .help-modal-body .help-sidebar {
          border-right-color: #333;
        }

        .help-modal-body .help-search-input {
          background: #2d2d2d;
          color: #e0e0e0;
          border-color: #444;
        }

        .help-modal-body .help-search-results {
          background: #2d2d2d;
          border-color: #444;
        }

        .help-modal-body .help-toc-title,
        .help-modal-body .help-section-title {
          color: #e0e0e0;
        }

        .help-modal-body .help-section-description {
          color: #b0b0b0;
        }

        .help-modal-body .help-toc-link {
          color: #b0b0b0;
        }

        .help-modal-body .help-toc-link:hover {
          background: rgba(102, 126, 234, 0.2);
          color: #e0e0e0;
        }

        .help-modal-loading {
          color: #b0b0b0;
        }

        .help-modal-error {
          color: #e57373;
        }

        .help-modal-error-message {
          color: #b0b0b0;
        }
      }*/
