body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f6f8fa;
  color: #24292e;
}
.container {
  display: flex;
  max-width: 1320px;
  margin: 24px auto 0;
  gap: 24px;
  padding: 0 16px;
}
/* Header */
#header {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  border-bottom: 1px solid #e1e4e8;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}
.logo {
  height: 40px;
  border-radius: 8px;
  margin-right: 16px;
}
.main-nav {
  display: flex;
  flex: 1;
  gap: 8px;
}
.main-nav a {
  color: #24292e;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s;
  white-space: nowrap;
}
.main-nav a:hover {
  background: #f0f2f5;
}

/* Sidebars */
#sidebar-left, #sidebar-right {
  width: 240px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #d1d5da;
  padding: 16px 0;
  height: fit-content;
}
#sidebar-right {
  width: 200px;
}
.sidebar-group { margin: 0 16px 12px; }
.sidebar-group-title {
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.sidebar-group-title:hover { background: #f0f2f5; }
.sidebar-group.open .sidebar-group-title {
  background: #0366d6;
  color: #fff;
}
.sidebar-group-list {
  max-height: 0;
  overflow: hidden;
  padding-right: 4px;
  position: relative;
  list-style: none;
  transition: max-height 0.3s cubic-bezier(.4,0,.2,1);
}
.sidebar-group.open .sidebar-group-list {
  max-height: 320px;
  overflow-y: auto;
}
.sidebar-group-list::-webkit-scrollbar {
  width: 6px;
  background: #f0f2f5;
}
.sidebar-group-list::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 4px;
}
.sidebar-group-list li a.active {
  background: linear-gradient(90deg, #b2b6ff 0%, #6e7fff 100%);
  color: #fff !important;
  font-weight: bold;
}
.sidebar-group-list li a {
  color: #0366d6;
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  display: block;
  padding: 6px 12px;
  transition: background 0.2s;
}
.sidebar-group-list li a:hover {
  background: #f0f2f5;
}

/* Main Content */
#main-content {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #d1d5da;
  padding: 24px 32px;
  min-width: 0;
}
.search-bar {
  display: flex;
  margin-bottom: 24px;
  border: 1px solid #d1d5da;
  border-radius: 6px;
}
.search-bar input {
  flex: 1;
  padding: 8px 12px;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
}
.search-bar button {
  padding: 8px 16px;
  border: none;
  background: #f6f8fa;
  border-left: 1px solid #d1d5da;
  color: #24292e;
  cursor: pointer;
}

/* Float Buttons */
.nav-btn, .float-btn {
  position: fixed;
  z-index: 100;
  background: #fff;
  border: 1px solid #d1d5da;
  color: #24292e;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-btn.left { left: 24px; top: 50%; transform: translateY(-50%); }
.nav-btn.right { right: 24px; top: 50%; transform: translateY(-50%); }
.float-btn { right: 24px; }
#to-top { bottom: 80px; }
#to-bottom { bottom: 30px; }

/* Footer */
#footer {
  text-align: center;
  padding: 24px;
  font-size: 14px;
  color: #586069;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    padding: 0;
    margin-top: 16px;
    gap: 16px;
  }
  #sidebar-left, #sidebar-right, #main-content {
    width: auto;
    border-radius: 0;
    margin: 0;
    border-left: none;
    border-right: none;
  }
  #sidebar-left { order: 1; }
  #main-content { order: 2; }
  #sidebar-right { order: 3; }

  .header-inner { padding: 0 8px; }
  .logo { margin-right: 8px; }
  .main-nav {
    overflow-x: auto;
    /* 隐藏滚动条 */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }
  .main-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
  }

  .nav-btn { display: none; }
}

#sidebar-left, .sidebar {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

/* 代码块美化 */
#main-content pre {
  background: linear-gradient(120deg, #23272e 60%, #2d3140 100%);
  color: #e6eaf3;
  border-radius: 12px;
  padding: 20px 18px 20px 18px;
  overflow-x: auto;
  font-size: 15px;
  font-family: 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace;
  margin: 18px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  position: relative;
}
#main-content pre code {
  background: transparent;
  color: #b2e1ff;
  font-size: 15px;
  padding: 0;
  border-radius: 0;
  font-family: inherit;
}
#main-content code {
  background: #f4f4f4;
  color: #d6336c;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace;
}
#main-content pre .copy-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(255,255,255,0.7);
  border: none;
  border-radius: 8px;
  color: #6e7fff;
  font-size: 14px;
  padding: 4px 14px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(110,127,255,0.08);
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
  z-index: 2;
}
#main-content pre .copy-btn:hover {
  background: #e6eaf3;
  color: #23272e;
}
#main-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: #f8fafc;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
#main-content th, #main-content td {
  border: 1px solid #e0e7ef;
  padding: 10px 14px;
  text-align: left;
}
#main-content th {
  background: #e6eaf3;
}
#main-content tr:nth-child(even) {
  background: #f0f4fa;
}
#main-content blockquote {
  background: #f6f8fa;
  border-left: 4px solid #b2b6ff;
  margin: 18px 0;
  padding: 12px 18px;
  color: #555;
  border-radius: 8px;
  font-style: italic;
}
#main-content ul, #main-content ol {
  margin: 18px 0 18px 24px;
  padding-left: 18px;
}
#main-content ul li, #main-content ol li {
  margin-bottom: 6px;
  line-height: 1.7;
} 