/* ==========================================================================
   宝贝云 (bbyvpn.homes) - 官方原创知识库文章专属样式
   ========================================================================== */

.article-page-body {
  background-color: var(--paper-bg);
  color: var(--ink-800);
}

/* 阅读进度指示器 */
.reading-progress-bar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--sakura-400), var(--sakura-600));
  z-index: 1002;
  transition: width 0.1s ease-out;
}

/* 面包屑导航 */
.breadcrumb-nav {
  padding: 24px 0 16px;
  font-size: 0.88rem;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb-link {
  color: var(--ink-700);
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: var(--sakura-600);
}

.breadcrumb-separator {
  color: var(--ink-300);
}

.breadcrumb-current {
  color: var(--sakura-600);
  font-weight: 600;
}

/* 文章容器排版 */
.article-main-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 40px;
  padding-bottom: 80px;
  align-items: start;
}

.article-content-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  padding: 48px;
}

/* 文章头部 */
.article-header {
  border-bottom: 1px dashed var(--border-soft);
  padding-bottom: 28px;
  margin-bottom: 36px;
}

.article-category-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sakura-600);
  background: #FFF0F3;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.article-h1-title {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1.35;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.article-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--ink-500);
}

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

/* 文章正文样式 */
.article-body-text {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-800);
}

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

.article-body-text h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ink-900);
  margin: 44px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #FFF0F3;
  position: relative;
  letter-spacing: -0.3px;
}

.article-body-text h2::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 42px;
  height: 2px;
  background: var(--sakura-500);
}

.article-body-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 32px 0 14px;
}

.article-body-text ul, .article-body-text ol {
  margin: 18px 0 24px 20px;
}

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

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

.article-body-text li {
  margin-bottom: 10px;
}

.article-body-text strong {
  color: var(--ink-900);
  font-weight: 700;
}

/* 日式手账提示框 */
.callout-box {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin: 28px 0;
  font-size: 0.96rem;
  line-height: 1.7;
}

.callout-box.tip {
  background: #FFF7F9;
  border-left: 4px solid var(--sakura-500);
  color: var(--ink-800);
}

.callout-box.info {
  background: #F0F7FF;
  border-left: 4px solid #3A86FF;
  color: #1E3A8A;
}

.callout-box.warning {
  background: #FFFBEB;
  border-left: 4px solid #F59E0B;
  color: #78350F;
}

/* 代码与配置块 */
.code-preview-block {
  background: #2B2D42;
  color: #F8F9FA;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 24px 0;
  line-height: 1.6;
}

/* 规范化表格 */
.spec-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.spec-table th, .spec-table td {
  padding: 14px 18px;
  border: 1px solid var(--border-soft);
  text-align: left;
}

.spec-table th {
  background: #FFF0F3;
  color: var(--ink-900);
  font-weight: 700;
}

.spec-table tr:nth-child(even) {
  background: #FCF9FA;
}

/* 文章底部转化横幅 */
.article-cta-box {
  margin-top: 48px;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #FFF0F3 0%, #FFE5EC 100%);
  border: 1px dashed var(--sakura-400);
  text-align: center;
}

.article-cta-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 12px;
}

.article-cta-desc {
  font-size: 0.98rem;
  color: var(--ink-700);
  margin-bottom: 24px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* 侧边栏：Sticky TOC 目录与相关推荐 */
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-soft);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-link {
  font-size: 0.88rem;
  color: var(--ink-700);
  line-height: 1.45;
  padding: 4px 0 4px 10px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  display: block;
}

.toc-link:hover, .toc-link.active {
  color: var(--sakura-600);
  border-left-color: var(--sakura-500);
  font-weight: 600;
}

.related-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-article-item {
  font-size: 0.88rem;
  color: var(--ink-700);
  line-height: 1.5;
  transition: color 0.2s ease;
}

.related-article-item:hover {
  color: var(--sakura-600);
}

@media (max-width: 992px) {
  .article-main-layout {
    grid-template-columns: 1fr;
  }

  .article-content-card {
    padding: 30px 20px;
  }

  .article-sidebar {
    position: static;
  }
}
