/* TOC 目录样式 */
.toc-container {
  position: fixed;
  top: 150px;
  left: -300px;
  width: 300px;
  height: 400px;
  background: white;
  border: 1px solid #e1e5e9;
  border-left: 0px;
  z-index: 1000;
  overflow: visible;
  transition: left 0.3s ease;
}

.toc-container.toc-open {
  left: 0;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #f8f9fa;
  border-bottom: 1px solid #e1e5e9;
  height: 20px;
}

.toc-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.toc-toggle-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.toc-toggle-btn:hover {
  background: #e9ecef;
  color: #333;
}

.toc-content {
  height: 400px;
  overflow-y: auto;
  padding: 0;
  /* {{ AURA: Modify - 细化滚动条宽度（Firefox 使用） */
  scrollbar-width: thin; /* 让滚动条更细 */
  scrollbar-color: #cfd4da transparent; /* 滚动条颜色与轨道颜色 */
}

/* {{ AURA: Add - 细化滚动条宽度（WebKit 内核，如 Chrome、Edge、Safari） */
.toc-content::-webkit-scrollbar {
  width: 6px; /* 更细的滚动条 */
}

.toc-content::-webkit-scrollbar-thumb {
  background-color: #cfd4da; /* 滚动条拇指颜色 */
  border-radius: 4px; /* 圆角 */
}

.toc-content::-webkit-scrollbar-thumb:hover {
  background-color: #b7bdc5; /* 悬停时稍微加深 */
}

.toc-content::-webkit-scrollbar-track {
  background: transparent; /* 轨道透明，减少视觉干扰 */
}

.toc-content a {
  display: block;
  padding: 8px 20px;
  color: #555;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-content a:hover {
  color: #1777ff;
  background: rgba(23, 119, 255, 0.05);
}

.toc-content a.toc-active {
  color: #1777ff;
  border-left-color: #1777ff;
  font-weight: 500;
  background: rgba(23, 119, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .toc-container {
    width: 280px;
    left: -280px;
  }
}

/* 当 TOC 显示时，调整内容区域 */
.markdown-body.toc-active {
  margin-left: 0;
}

@media (max-width: 768px) {
  .markdown-body.toc-active {
    margin-left: 0;
  }
}

/* TOC 悬停触发区域 */
.toc-hover-trigger {
  position: fixed;
  top: 150px;
  left: 0;
  width: 70px;
  height: 400px;
  z-index: 1001;
  cursor: pointer;
} 