/* Help article detail and image viewer styles. */
/* 帮助内容页面 */
  .help-page {
    padding: 30px 0 60px;
    position: relative;
    z-index: 1;
  }

  /* 返回按钮 */
  .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #94a3b8;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 20px;
  }
  .back-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
  }
  .back-btn svg {
    width: 16px;
    height: 16px;
  }

  /* 面包屑 */
  .help-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  .help-breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
  }
  .help-breadcrumb a:hover {
    color: var(--theme-primary);
  }
  .help-breadcrumb svg {
    color: #475569;
  }
  .help-breadcrumb-current {
    color: #94a3b8;
  }

  /* 主布局 */
  .help-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
  }

  /* 文章卡片 */
  .help-article {
    background: rgba(var(--cc-dark-bg-rgb), 0.62);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    overflow: hidden;
  }
  .help-article-header {
    padding: 28px 28px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .help-article-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.4;
  }
  .help-article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
  }
  .help-article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .help-article-meta svg {
    width: 14px;
    height: 14px;
  }
  .help-article-body {
    padding: 28px;
  }

  /* 文章内容样式 */
  .help-content {
    line-height: 1.85;
    color: #b8c0c8;
    font-size: 15px;
  }
  .help-content h1, .help-content h2, .help-content h3, .help-content h4 {
    color: #fff;
    margin: 28px 0 14px;
    font-weight: 600;
  }
  .help-content h1 { font-size: 24px; }
  .help-content h2 { font-size: 20px; }
  .help-content h3 { font-size: 17px; }
  .help-content p { margin: 14px 0; }
  .help-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 16px 0;
    border: 1px solid rgba(255,255,255,0.1);
  }
  .help-content a {
    color: var(--theme-primary);
    text-decoration: none;
  }
  .help-content a:hover {
    text-decoration: underline;
  }
  .help-content pre {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    font-size: 13px;
    margin: 16px 0;
  }
  .help-content code {
    background: rgba(var(--theme-primary-rgb), 0.15);
    color: #a3e635;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: "SF Mono", Monaco, Consolas, monospace;
  }
  .help-content pre code {
    background: transparent;
    padding: 0;
    color: var(--cc-dark-text);
  }
  .help-content ul, .help-content ol {
    padding-left: 22px;
    margin: 14px 0;
  }
  .help-content li {
    margin: 8px 0;
  }
  .help-content blockquote {
    border-left: 4px solid var(--theme-primary);
    background: rgba(var(--theme-primary-rgb), 0.1);
    padding: 14px 18px;
    margin: 16px 0;
    border-radius: 0 8px 8px 0;
    color: #94a3b8;
  }
  .help-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
  }
  .help-content th, .help-content td {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 14px;
    text-align: left;
  }
  .help-content th {
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-weight: 600;
  }
  .help-content hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 24px 0;
  }

  /* 上下篇导航 */
  .help-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .help-nav-item {
    display: block;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
  }
  .help-nav-item:hover {
    background: rgba(var(--theme-primary-rgb), 0.1);
    border-color: rgba(var(--theme-primary-rgb), 0.3);
  }
  .help-nav-item.disabled {
    opacity: 0.4;
    pointer-events: none;
  }
  .help-nav-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
  }
  .help-nav-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .help-nav-item.next {
    text-align: right;
  }

  /* 右侧边栏 */
  .help-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .sidebar-card {
    background: rgba(var(--cc-dark-bg-rgb), 0.62);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
  }
  .sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cc-dark-border);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .sidebar-title svg {
    width: 18px;
    height: 18px;
    color: var(--theme-primary);
  }
  .sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
  }
  .sidebar-item:hover {
    background: rgba(var(--theme-primary-rgb), 0.1);
    border-color: rgba(var(--theme-primary-rgb), 0.3);
  }
  .sidebar-item.active {
    background: rgba(var(--theme-primary-rgb), 0.15);
    border-color: rgba(var(--theme-primary-rgb), 0.4);
  }
  .sidebar-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--theme-primary-rgb), 0.15);
    border-radius: 6px;
    flex-shrink: 0;
  }
  .sidebar-item-icon svg {
    width: 16px;
    height: 16px;
    color: var(--theme-primary);
  }
  .sidebar-item-content {
    flex: 1;
    min-width: 0;
  }
  .sidebar-item-title {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sidebar-item-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
  }

  /* 分类标签 */
  .help-cate-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(var(--theme-primary-rgb), 0.15);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
    border-radius: 6px;
    color: var(--theme-primary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
  }
  .help-cate-tag:hover {
    background: rgba(var(--theme-primary-rgb), 0.25);
    border-color: rgba(var(--theme-primary-rgb), 0.5);
    color: #fff;
  }

  /* 响应式 */
  @media (max-width: 992px) {
    .help-layout {
      grid-template-columns: 1fr;
    }
    .help-sidebar {
      order: -1;
    }
  }
  @media (max-width: 640px) {
    .help-page {
      padding: 70px 0 40px;
    }
    .help-article-header {
      padding: 20px;
    }
    .help-article-title {
      font-size: 20px;
    }
    .help-article-body {
      padding: 20px;
    }
    .help-nav {
      grid-template-columns: 1fr;
    }
  }

/* 图片查看器样式 */
  .img-viewer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
  }
  .img-viewer.open {
    display: flex;
  }
  .img-viewer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    cursor: pointer;
  }
  .img-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: imgViewerIn 0.3s ease;
  }
  @keyframes imgViewerIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
  }
  .img-viewer-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
  }
  .img-viewer-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
  }
  .img-viewer-close svg {
    width: 20px;
    height: 20px;
    color: #fff;
  }
  .img-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
  }
  
  /* 文章内图片添加点击提示 */
  .help-content img {
    cursor: zoom-in;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .help-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }

/* Light article override for help detail pages */
.help-article,
.help-sidebar-card,
.help-nav-item {
  background: var(--cc-surface) !important;
  border-color: var(--cc-border) !important;
  box-shadow: var(--cc-shadow);
}

.help-article-header {
  border-bottom-color: var(--cc-border) !important;
}

.help-article-title,
.help-content h1,
.help-content h2,
.help-content h3,
.help-content h4,
.sidebar-card-title,
.related-title,
.help-nav-title {
  color: var(--cc-text) !important;
}

.help-content,
.help-article-meta,
.help-breadcrumb,
.help-breadcrumb a,
.help-breadcrumb-current,
.help-content blockquote,
.related-meta,
.help-nav-label {
  color: var(--cc-muted) !important;
}

.help-content img,
.help-content th,
.help-content td {
  border-color: var(--cc-border) !important;
}

.help-content pre {
  background: #f8fafc !important;
  border-color: var(--cc-border) !important;
}

.help-content pre code {
  color: var(--cc-text) !important;
}

.help-content code {
  color: var(--cc-brand-dark) !important;
}
