* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  overflow: auto;
}

a {
  color: #1e88e5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header Styles */
header {
  background-color: #fff;
  padding: 15px 30px;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-square {
  width: 30px;
  height: 30px;
  background-color: #e53935;
  margin-right: 10px;
}

.logo h1 {
  font-size: 18px;
  font-weight: 600;
}

.search-container {
  position: relative;
  width: 300px;
}

.search-container input {
  width: 100%;
  padding: 8px 15px;
  padding-right: 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.search-container button {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 40px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
}

/* Layout */
.content-container {
  display: flex;
  flex-grow: 1;
  overflow: hidden; /* 整体不滚动 */
  height: calc(100vh - 60px); /* 减去 header 高度 */
}

/* Sidebar */
.sidebar {
  width: 250px;
  border-right: 1px solid #eaeaea;
  flex-shrink: 0;
  height: 100%;
  overflow: hidden; /* 如果需要滚动改成 auto */
}

.sidebar-nav {
  height: 100%;
  overflow-y: auto; /* 只有左侧导航栏有滚动条 */
  padding: 10px 0 20px 0;
}

.nav-section {
  margin-bottom: 10px;
}

.nav-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  cursor: pointer;
  font-weight: 500;
}

.nav-list {
  list-style-type: none;
  padding-left: 15px;
}

.nav-list li {
  margin: 8px 0;
}

.nav-list a {
  color: #555;
  font-size: 14px;
  display: block;
  padding: 6px 15px;
  border-radius: 4px;
}

.nav-list a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.nav-list a.active {
  background-color: rgba(30, 136, 229, 0.1);
  color: #1e88e5;
  font-weight: 500;
}

.expand-icon {
  color: #888;
  transition: transform 0.2s;
}

/* Main Content */
.main-content {
  flex-grow: 1;
  padding: 0;
  overflow: auto;  /* 这里改成auto，让内容区能滚动 */
  position: relative;
  height: 100%;
}

.content-section {
  padding: 25px 30px;
  min-height: 100%;
}

.content-page {
  display: none;
  padding-bottom: 30px; /* 为最后更新时间留出空间 */
}

.content-page.active {
  display: block;
}

h2 {
  font-size: 26px;
  color: #1a365d;
  margin-bottom: 20px;
}

.intro-text {
  font-size: 16px;
  color: #555;
  margin-bottom: 20px;
}

h3 {
  font-size: 20px;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eaeaea;
  color: #1a365d;
}

h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

p {
  margin-bottom: 15px;
}

/* Support Grid */
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 25px 0;
}

.support-card {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 20px;
  background-color: #fafafa;
}

.response-time {
  font-style: italic;
  color: #666;
  margin-top: 15px;
}

/* Help Buttons */
.help-buttons {
  display: flex;
  gap: 15px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.btn {
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  color: #333;
  transition: all 0.2s;
}

.btn:hover {
  background-color: #f5f5f5;
  text-decoration: none;
}

.btn.btn-secondary:hover {
  background-color: #f0f0f0;
}

/* 最后更新时间 */
.last-updated {
  margin-top: 50px;
  padding-top: 15px;
  border-top: 1px solid #eaeaea;
  color: #666;
  font-size: 14px;
  text-align: center;
}

/* Table of Contents */
.toc {
  width: 220px;
  border-left: 1px solid #eaeaea;
  padding: 25px 20px;
  flex-shrink: 0;
  height: 100%;
  overflow: hidden; /* 不显示滚动条 */
}

.toc h3 {
  font-size: 16px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eaeaea;
}

.toc ul {
  list-style-type: none;
}

.toc li {
  margin: 10px 0;
}

.toc a {
  color: #555;
  font-size: 14px;
}

/* Lists */
ul, ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

li {
  margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 1100px) {
  .toc {
    display: none;
  }
}

@media (max-width: 768px) {
  .content-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-height: 300px;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 15px;
  }
}

@media (max-width: 576px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .search-container {
    width: 100%;
    margin-top: 15px;
  }
}

/* Chrome, Safari 和 Opera */
.main-content::-webkit-scrollbar,
.content-section::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Firefox */
.main-content {
  scrollbar-width: none;
  -ms-overflow-style: none; /* IE 10+ */
}

.content-section {
  scrollbar-width: none;
  -ms-overflow-style: none; /* IE 10+ */
}

/* 同时隐藏滚动条轨道 */
.main-content::-webkit-scrollbar-track,
.content-section::-webkit-scrollbar-track {
  background: transparent;
}

.pagination {
  text-align: center;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 4px;
  background-color: #f5f5f5;
  color: #333;
  border-radius: 4px;
  text-decoration: none;
}

.pagination a:hover {
  background-color: #ddd;
}

.pagination .current {
  background-color: #1e88e5;
  color: #fff;
  font-weight: bold;
}


#toc-list {
  list-style: none;
  padding-left: 0;
}

#toc-list li {
  margin: 6px 0;
}

.toc-level-3 {
  padding-left: 15px;
  font-size: 90%;
  color: #777;
}


/* 移动端优化：正文居中 + 适配宽度 */
.entry-content {
  max-width: 800px;
  margin: 0 auto; /* 水平居中 */
  padding: 20px;
  text-align: center; /* 如果你希望内容居中显示 */
}

/* 手机端优化 */
@media (max-width: 768px) {
  .entry-content {
    max-width: 100%;
    padding: 15px;
    text-align: left; /* 手机上建议左对齐，更易读，如需居中可改为 center */
  }

  /* 隐藏侧边栏和目录栏 */
  .sidebar,
  .toc {
    display: none;
  }

  body {
    font-size: 16px;
  }

  .btn {
    font-size: 16px;
    padding: 10px 20px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 18px;
  }
}

.sidebar {
  width: 250px;
  background-color: #f9f9f9;
  padding: 20px;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .content-container {
    flex-direction: column;
  }

  .entry-content {
    width: 100%;
  }
}
