* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif; //'Roboto', sans-serif;
  /*font-family: "Heebo", sans-serif;*/
  font-size: 16px;
  line-height: 1.6;
  color: #000;
  background: #fff;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e0e0e0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
  backdrop-filter: blur(8px);
}
.site-header .site-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #000;
  margin: 0;
}
.site-header .site-title a {
  color: inherit;
  text-decoration: none;
}
.site-header .site-title a:hover {
  color: #3aaaff;
}
.site-header .site-subtitle {
  margin-left: 16px;
  font-size: 1rem;
  color: #555;
  padding-left: 16px;
  border-left: 1px solid #e0e0e0;
}
.site-header .page-menu {
  margin-left: auto;
  display: flex;
  gap: 24px;
}
.site-header .page-menu-item {
  padding: 0;
  background: none;
  border: none;
  font-size: 1.1em;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  transition: color 0.1s ease;
}
.site-header .page-menu-item:hover {
  color: #3aaaff;
}
.site-header .page-menu-item.active {
  color: #3aaaff;
}
.site-header .version-badge {
  margin-left: auto;
  padding: 4px 12px;
  background: #fff3cd;
  color: #856404;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
}

.main-container {
  display: flex;
  min-height: 100vh;
  padding-top: 48px;
}

.toc-sidebar {
  width: 350px;
  min-width: 350px;
  background: #eceff1;
  border-right: 1px solid #e0e0e0;
  position: fixed;
  top: 48px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 24px 16px;
}
.toc-sidebar .toc-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}
.toc-sidebar .toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-sidebar .toc-item {
  margin-bottom: 4px;
}
.toc-sidebar .toc-item a {
  display: block;
  padding: 6px 12px;
  color: #000;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 4px;
  transition: background-color 0.1s ease, color 0.1s ease;
}
.toc-sidebar .toc-item a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #3aaaff;
}
.toc-sidebar .toc-item a.active {
  background: rgba(58, 170, 255, 0.1);
  color: #3aaaff;
  font-weight: 500;
}

.toc-sidebar .toc-item.toc-level-1 {
  display: none;
}

.toc-sidebar .toc-item.toc-level-2 a {
  font-weight: 600;
}

.toc-sidebar .toc-item.toc-level-3 a {
  padding-left: 28px;
  font-size: 0.9rem;
  color: #555;
}

.content-area {
  flex: 1;
  margin-left: 280px;
  padding: 32px 48px;
  max-width: calc(100% - 280px);
  overflow-x: hidden;
}

.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* Default heading styles */
h1 {
  font-size: 2em;
  font-weight: 700;
  margin: 0 0 24px 0;
  color: #000;
}

h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin: 32px 0 16px 0;
  color: #000;
}

h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin: 24px 0 12px 0;
  color: #000;
}

/* Scroll offset for fixed header */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
  scroll-margin-top: 72px;
}

.markdown-body h1 {
  font-size: 2em;
  font-weight: 700;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  /*border-bottom: 2px solid #3aaaff;*/
  color: #000;
}
.markdown-body h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin: 48px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
  color: #000;
}
.markdown-body h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin: 32px 0 12px 0;
  color: #000;
}
.markdown-body h4 {
  font-size: 1.1em;
  font-weight: 600;
  margin: 24px 0 8px 0;
  color: #000;
}
.markdown-body p {
  margin: 0 0 16px 0;
}
.markdown-body a {
  color: #3aaaff;
  text-decoration: none;
}
.markdown-body a:hover {
  text-decoration: underline;
}
.markdown-body a:visited {
  color: rgb(188, 129, 255);
}
.markdown-body ul, .markdown-body ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
}
.markdown-body li {
  margin-bottom: 8px;
}
.markdown-body blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  border-left: 4px solid #3aaaff;
  background: rgba(58, 170, 255, 0.05);
  color: #000;
}
.markdown-body blockquote p {
  margin: 0;
}
.markdown-body code {
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.9em;
  padding: 2px 6px;
  background: #f5f5f5;
  border-radius: 3px;
}
.markdown-body pre {
  margin: 16px 0;
  padding: 0;
  border-radius: 6px;
  overflow-x: auto;
}
.markdown-body pre code {
  display: block;
  padding: 16px 20px;
  font-size: 0.875em;
  line-height: 1.5;
  border-radius: 6px;
}
.markdown-body pre code.hljs {
  background: #0d1117;
}
.markdown-body table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 1em;
}
.markdown-body th, .markdown-body td {
  padding: 6px 10px;
  text-align: left;
  border: 1px solid #e0e0e0;
}
.markdown-body th {
  background: #eceff1;
  font-weight: 600;
}
.markdown-body tr:nth-child(even) {
  background: #fafafa;
}
.markdown-body hr {
  margin: 32px 0;
  border: none;
  border-top: 1px solid #e0e0e0;
}
.markdown-body strong {
  font-weight: 600;
}

@media (max-width: 1024px) {
  .toc-sidebar {
    width: 240px;
    min-width: 240px;
  }
  .content-area {
    margin-left: 240px;
    padding: 24px 32px;
  }
}
@media (max-width: 768px) {
  .site-header {
    padding: 0 16px;
  }
  .site-header .site-subtitle {
    display: none;
  }
  .site-header .page-menu {
    gap: 12px;
  }
  .site-header .page-menu-item {
    font-size: 0.9em;
  }
  .site-header .version-badge {
    display: none;
  }
  .toc-sidebar {
    display: none;
  }
  .content-area {
    margin-left: 0;
    padding: 20px 16px;
    max-width: 100%;
  }
}
.toc-sidebar::-webkit-scrollbar {
  width: 6px;
}

.toc-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.toc-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.toc-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}
