.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;
  }
}

