﻿/* ===================================================================
   星岛梦官网 (xdmeng.homes) - 知识库与深度教程页面专用样式表
   =================================================================== */

.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-brand);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease-out;
}

.article-hero {
  padding: 140px 0 40px;
  background: linear-gradient(180deg, rgba(16, 24, 48, 0.4) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-light);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

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

.breadcrumb-separator {
  color: var(--text-dim);
}

.article-header {
  max-width: 880px;
  margin: 0 auto;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.article-meta-bottom {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.88rem;
  color: var(--text-dim);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 主体文章布局与双栏目录 */
.article-container {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  padding: 60px 0 100px;
  align-items: start;
}

.article-sidebar {
  position: sticky;
  top: 90px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}

.toc-link {
  color: var(--text-muted);
  display: block;
  padding: 4px 0;
  transition: var(--transition-fast);
  line-height: 1.4;
}

.toc-link:hover,
.toc-link.active {
  color: var(--primary);
  transform: translateX(4px);
}

.toc-link.toc-h3 {
  padding-left: 14px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.sidebar-cta-card {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.sidebar-cta-card h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.sidebar-cta-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* 正文排版 */
.article-content {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  margin: 48px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 32px 0 16px;
}

.article-content p {
  margin-bottom: 22px;
}

.article-content ul,
.article-content ol {
  margin: 16px 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.article-content li {
  line-height: 1.75;
}

.article-content strong {
  color: #ffffff;
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: #ffffff;
}

/* 提示框与高亮卡片 */
.callout {
  background: rgba(0, 242, 254, 0.06);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.callout.tip {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: var(--accent-emerald);
}

.callout.warning {
  background: rgba(255, 183, 3, 0.08);
  border-left-color: var(--accent-gold);
}

.callout-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* 代码与表格排版 */
.article-table-wrapper {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.article-table th {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  padding: 14px 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
}

.article-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
}

.article-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* 内部跳转卡片 (SEO 核心板块推荐) */
.internal-jump-card {
  background: linear-gradient(135deg, rgba(16, 24, 48, 0.8), rgba(22, 33, 64, 0.9));
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.jump-card-info h4 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.jump-card-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* 文章底部上下篇与相关推荐 */
.article-footer-nav {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border-light);
}

.article-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.nav-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition-fast);
  text-decoration: none !important;
}

.nav-article-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.nav-article-card .label {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}

.nav-article-card .title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
}

/* 知识库目录聚合页样式 */
.kb-hero {
  padding: 160px 0 60px;
  text-align: center;
  background: radial-gradient(circle at center, rgba(0, 242, 254, 0.08) 0%, transparent 70%);
}

.kb-search-box {
  max-width: 580px;
  margin: 30px auto 0;
  position: relative;
}

.kb-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 14px 24px 14px 48px;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: var(--transition-fast);
}

.kb-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.kb-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

@media (max-width: 900px) {
  .article-container {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    display: none;
  }
  .article-title {
    font-size: 1.9rem;
  }
  .article-nav-grid {
    grid-template-columns: 1fr;
  }
}

