/* 帮助手册页面样式 */

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

body {
  font: 16px/1.8 "PingFang SC", "Microsoft Yahei", Arial, SimSun, "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", sans-serif;
  color: #333;
  font-weight: normal;
  overflow: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
  min-height: 100vh;
}

body, html {
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a:link, a:visited {
  color: #1ca237;
  text-decoration: none;
  border-bottom: 1px solid rgba(52, 193, 81, 0.3);
  transition: all 0.2s ease;
}

a:hover {
  color: #32c14f;
  border-bottom-color: #1ca237;
}

header {
  background: linear-gradient(135deg, #1ca237 0%, #2db348 100%);
  color: white;
  padding: 40px 30px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 10px 40px rgba(52, 193, 81, 0.3);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '📖';
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 64px;
  opacity: 0.3;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 1;
}

header p {
  margin: 8px 0 0;
  opacity: 0.9;
  font-size: 14px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(52, 193, 81, 0.1);
  border: 1px solid rgba(52, 193, 81, 0.2);
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: none;
}

.back-link:hover {
  background: rgba(52, 193, 81, 0.15);
  transform: translateX(-4px);
  border-bottom: none;
}

section {
  flex: 1;
}

article {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

article h1, article h2, article h3, article h4, article h5, article h6 {
  color: #222;
  margin-top: 32px;
  margin-bottom: 16px;
  font-weight: 600;
}

article h1:first-child, article h2:first-child, article h3:first-child {
  margin-top: 0;
}

article h2 {
  font-size: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1ca237;
}

article h3 {
  font-size: 18px;
  color: #1ca237;
}

article p {
  margin: 16px 0;
  color: #555;
}

article ul, article ol {
  padding-left: 24px;
  margin: 16px 0;
}

article li {
  margin: 12px 0;
  color: #555;
}

article li::marker {
  color: #1ca237;
}

article code {
  background: rgba(52, 193, 81, 0.1);
  color: #2a9d3e;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
  font-size: 0.9em;
}

article pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 20px 0;
}

article pre code {
  background: none;
  color: inherit;
  padding: 0;
}

article blockquote {
  border-left: 4px solid #1ca237;
  background: rgba(52, 193, 81, 0.05);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 12px 12px 0;
  color: #555;
}

article img {
  max-width: 100%;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
}

article th, article td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

article th {
  background: rgba(52, 193, 81, 0.1);
  color: #333;
  font-weight: 600;
}

article tr:hover td {
  background: rgba(52, 193, 81, 0.03);
}

footer {
  color: #999;
  padding: 30px 0;
  text-align: center;
  font-size: 13px;
  margin-top: 40px;
}

footer a {
  color: #999;
  border-bottom-color: transparent;
}

footer a:hover {
  color: #1ca237;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .content {
    padding: 15px;
  }
  header {
    padding: 30px 20px;
    border-radius: 12px;
  }
  header h1 {
    font-size: 22px;
  }
  header::before {
    font-size: 48px;
    right: 15px;
  }
  article {
    padding: 24px 20px;
    border-radius: 12px;
  }
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1a1a1c 0%, #2d2d30 100%);
    color: #e5e5e7;
  }
  article {
    background: rgba(45, 45, 48, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
  }
  article h1, article h2, article h3, article h4, article h5, article h6 {
    color: #f5f5f7;
  }
  article h2 {
    border-bottom-color: #1ca237;
  }
  article p, article li {
    color: #a1a1a6;
  }
  article blockquote {
    background: rgba(52, 193, 81, 0.08);
    color: #a1a1a6;
  }
  article th {
    background: rgba(52, 193, 81, 0.15);
    color: #f5f5f7;
  }
  article td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  article tr:hover td {
    background: rgba(52, 193, 81, 0.05);
  }
  .back-link {
    background: rgba(52, 193, 81, 0.15);
    border-color: rgba(52, 193, 81, 0.3);
  }
}

/* 面包屑导航样式 */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(52, 193, 81, 0.1);
  border: 1px solid rgba(52, 193, 81, 0.2);
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
}
.breadcrumb-item {
  color: #1ca237;
  text-decoration: none;
  border-bottom: none !important;
  transition: all 0.2s ease;
}
.breadcrumb-item:hover {
  color: #32c14f;
  border-bottom: none !important;
}
.breadcrumb-sep {
  color: #999;
  font-size: 12px;
  user-select: none;
}
.breadcrumb-current {
  color: #666;
  font-weight: 400;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) {
  .breadcrumb {
    background: rgba(52, 193, 81, 0.15);
    border-color: rgba(52, 193, 81, 0.3);
  }
  .breadcrumb-item {
    color: #34c151;
  }
  .breadcrumb-item:hover {
    color: #4cd964;
  }
  .breadcrumb-sep {
    color: #666;
  }
  .breadcrumb-current {
    color: #a1a1a6;
  }
}
@media (max-width: 768px) {
  .breadcrumb {
    padding: 8px 14px;
    font-size: 13px;
    gap: 6px;
  }
  .breadcrumb-current {
    max-width: 120px;
  }
}

.topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.topic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}
.topic-item:last-child {
    border-bottom: none;
}
.topic-link {
    font-size: 15px;
    color: #333;
    text-decoration: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 16px;
}
.topic-link:hover {
    color: #1ca237;
}
.topic-date {
    font-size: 13px;
    color: #999;
    flex-shrink: 0;
}
.topic-empty {
    text-align: center;
    padding: 60px 20px;
}
.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}
.empty-text {
    font-size: 16px;
    color: #999;
}
@media (prefers-color-scheme: dark) {
    .topic-item {
        border-color: rgba(255, 255, 255, 0.08);
    }
    .topic-link {
        color: #f5f5f7;
    }
    .topic-link:hover {
        color: #1ca237;
    }
    .topic-date {
        color: #888;
    }
}
@media (max-width: 768px) {
    .topic-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 0;
    }
    .topic-link {
        margin-right: 0;
    }
    .topic-date {
        font-size: 12px;
    }
}