/* 帮助文档详情页样式 */

/* 页面头部样式 */
.page-header {
  padding-top: calc(var(--header-height) + var(--spacing-xxl));
  padding-bottom: var(--spacing-xxl);
  position: relative;
  background: linear-gradient(to bottom, var(--dark-color), var(--primary-dark));
  color: white;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"%3E%3Cpath fill="rgba(255, 255, 255, 0.05)" d="M0 0h100v100H0z"/%3E%3C/svg%3E');
  opacity: 0.5;
}

.page-header h1 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  color: white;
}

.page-header p {
  font-size: 1.1rem;
  max-width: 3xl;
  margin: 0 auto;
  opacity: 0.95;
  position: relative;
  z-index: 1;
  color: white;
}

/* 面包屑导航 */
.breadcrumb {
  background-color: var(--bg-muted);
  border-radius: 0;
  margin-bottom: 0;
  padding: 1rem 0;
  font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--text-muted);
}

/* 帮助文档内容区域 */
.help-document {
  padding: 4rem 0;
  background-color: var(--bg-muted);
}

/* 左侧目录样式 */
.toc {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  max-height: calc(100vh - var(--header-height) - 4rem);
  overflow-y: auto;
}

.toc h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-h2 {
  margin-bottom: 0.5rem;
}

.toc-h3 {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.toc-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.05);
}

.toc-list a.active {
  color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.1);
  font-weight: 500;
}

/* 右侧正文样式 */
.article-content {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 2rem;
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.article-content ul, 
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content ul {
  list-style-type: disc !important;
}

.article-content ol {
  list-style-type: decimal !important;
}

.article-content li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: var(--text-secondary);
  list-style-position: outside !important;
}

.article-content ul ul, 
.article-content ol ul, 
.article-content ul ol, 
.article-content ol ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content code {
  background-color: var(--bg-muted);
  padding: 0.2rem 0.4rem;
  border-radius: var(--border-radius);
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.875em;
  color: var(--danger-color);
}

/* 代码块样式 */
.article-content pre {
  background-color: var(--dark-color);
  color: var(--text-light);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  position: relative;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

/* 复制按钮样式 */
.copy-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.copy-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  opacity: 1;
}

/* 特殊内容块样式 */
.note-box, .warning-box {
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
  border-left: 4px solid transparent;
}

.note-box {
  background-color: rgba(var(--info-rgb), 0.05);
  border-left-color: var(--info-color);
}

.warning-box {
  background-color: rgba(var(--warning-rgb), 0.05);
  border-left-color: var(--warning-color);
}

.note-box strong, .warning-box strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.note-box p, .warning-box p {
  margin-bottom: 0;
}

/* 部署步骤样式 */
.deployment-step {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.deployment-step:last-child {
  border-bottom: none;
}

.deployment-step h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.deployment-step p {
  margin-bottom: 1rem;
}

/* 文档操作区 */
.article-content + .bg-white {
  margin-top: 2rem;
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
}

.article-content + .bg-white .btn {
  transition: all 0.2s ease;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
}

.article-content + .bg-white .btn:last-child {
  margin-right: 0;
}

/* 联系技术支持区域 */
.contact-support {
  background-color: var(--bg-muted);
  padding: 4rem 0;
}

.contact-support h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.contact-support p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 3xl;
  margin-left: auto;
  margin-right: auto;
}

.contact-support .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .toc {
    position: static;
    margin-bottom: 2rem;
    max-height: none;
  }
  
  .article-content {
    padding: 1.75rem;
  }
  
  .page-header h1 {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  .help-document {
    padding: 2.5rem 0;
  }
  
  .article-content {
    padding: 1.5rem;
  }
  
  .article-content h2 {
    font-size: 1.5rem;
  }
  
  .article-content h3 {
    font-size: 1.25rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .page-header p {
    font-size: 1rem;
  }
  
  .note-box, .warning-box {
    padding: 1rem 1.25rem;
  }
  
  .breadcrumb {
    font-size: 0.8rem;
    padding: 0.75rem 0;
  }
}

@media (max-width: 576px) {
  .article-content {
    padding: 1.25rem;
  }
  
  .article-content h2 {
    font-size: 1.4rem;
  }
  
  .article-content h3 {
    font-size: 1.2rem;
  }
  
  .article-content pre {
    padding: 1rem;
    font-size: 0.8rem;
  }
  
  .page-header {
    padding: 4rem 0 3rem;
  }
  
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .toc h2 {
    font-size: 1.15rem;
  }
  
  .toc-list a {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }
  
  .article-content + .bg-white .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
  
  .back-to-top {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* 滚动条样式 */
.toc::-webkit-scrollbar {
  width: 6px;
}

.toc::-webkit-scrollbar-track {
  background: var(--bg-muted);
  border-radius: 3px;
}

.toc::-webkit-scrollbar-thumb {
  background: var(--secondary-light);
  border-radius: 3px;
}

.toc::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* 打印样式 */
@media print {
  .navbar,
  .back-to-top,
  .contact-support,
  .copy-button,
  .article-content + .bg-white {
    display: none !important;
  }
  
  .toc {
    position: static;
    border: 1px solid #ddd;
    box-shadow: none;
  }
  
  .article-content {
    border: 1px solid #ddd;
    box-shadow: none;
    padding: 1rem;
  }
  
  .page-header {
    background: none;
    color: var(--text-primary);
    padding: 2rem 0;
  }
  
  .page-header h1,
  .page-header p {
    color: var(--text-primary);
  }
  
  body {
    background: white;
  }
  
  pre {
    background: #f8f9fa !important;
    color: #212529 !important;
    border: 1px solid #dee2e6;
    page-break-inside: avoid;
  }
}