/* ========== 文章详情页专属样式 ========== */


/* ---------- 文章视频容器 ---------- */
.video-wrapper { margin-bottom: 1.5rem; }
.video-wrapper video { width: 100%; height: auto; border-radius: 8px; background: #000; }

/* ---------- 底部二维码水印区 ---------- */
.article-qr-watermark {
    margin-top: 40px; padding-top: 20px; border-top: 1px dashed #e2e8f0;
    display: flex; justify-content: flex-start; align-items: flex-start; gap: 16px; margin-bottom: 30px;
}
.qr-watermark-item { display: flex; flex-direction: column; align-items: center; }
.qr-watermark-img { border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.qr-watermark-label { margin-top: 6px; margin-bottom: 0; color: #94a3b8; font-size: 12px; text-indent: 0; }

/* =========================================
   2026-10-29 文章详情页：A4 隐形阅读框与摘要样式
   ========================================= */

/* 1. 限制文章主体的宽度，居中，实现 A4 纸张阅读感 */
.main-content > article {
    max-width: 860px; /* 最佳阅读宽度 */
    margin: 0 auto;   /* 居中显示 */
    /* 移除多余的 padding，由外层 main-content 统一控制 */
}

/* 2. 给摘要加上高级的“引用卡片”效果（因为之前完全没写样式） */
main.main-content > article .article-excerpt {
    background: rgba(37, 99, 235, 0.05); /* 极淡的蓝色背景 */
    border-left: 4px solid var(--primary-color); /* 左侧蓝色竖线 */
    padding: 20px 24px;
    border-radius: 0 12px 12px 0; /* 右侧圆角 */
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 20px 0 30px 0;
    font-style: italic; 
}

/* 3. 优化正文的排版舒适度 */
.article-content {
    line-height: 1.85; /* 舒适的阅读行高 */
    letter-spacing: 0.02em;
}

.article-content p {
    margin-bottom: 1.2em; /* 段落间距 */
}

/* 4. 标题区域优化 */
.content-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

/* =========================================
   深色模式适配
   ========================================= */
body.dark-theme main.main-content > article .article-excerpt {
    background: rgba(37, 99, 235, 0.15);
    color: #d1d5db;
}
body.dark-theme .content-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}


/* =========================================
   2026-10-29 深色模式文章正文兜底（从 overrides 合并）
   注意：针对行内样式 div[style*="background"] 的覆盖必须保留权重，否则压不住行内样式
   ========================================= */
body.dark-theme .article-content blockquote,
body.dark-theme .article-content .card,
body.dark-theme .article-content .quote-box {
  background-color: rgba(30, 34, 41, 0.8);
  color: #d1d5db;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .article-content div[style*="background: #fff"],
body.dark-theme .article-content div[style*="background: white"] {
  background-color: rgba(30, 34, 41, 0.8) !important;
  color: #d1d5db !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .article-content blockquote {
  border-left: 4px solid var(--primary-color);
}

body.dark-theme .article-content blockquote p,
body.dark-theme .article-content blockquote li,
body.dark-theme .article-content .quote-box p {
  color: #d1d5db;
}


/* =========================================
   文章详情页：头部元数据与底部导航（补全）
   ========================================= */

/* 1. 头部元数据区 */
.article-meta {
  display: flex;
  flex-wrap: wrap; /* 允许小屏幕换行 */
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 24px;
}

.article-meta .meta-item {
  display: inline-flex;
  align-items: center;
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(37, 99, 235, 0.1);
  white-space: nowrap; /* 绝对禁止文字竖排 */
}

/* 深色模式 */
body.dark-theme .article-meta .meta-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #8ab4f8;
}

/* 4.1 缩小文章标题并保持左对齐 */
.content-header h1 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-weight: 700;
}

/* 全局返回按钮通用样式（2026-11-12 从 article 页面提权） */
.meta-item--back {
  display: inline-flex;
  align-items: center;
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(37, 99, 235, 0.1);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.meta-item--back:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--primary-color);
}
body.dark-theme .meta-item--back {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #8ab4f8;
}
body.dark-theme .meta-item--back:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* =========================================
   底部导航（等宽等高、居中截断）
   ========================================= */
.navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

  .nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 64px;
    width: 100%;
    padding: 8px 16px;
    box-sizing: border-box;
    background: rgba(37, 99, 235, 0.06); /* 统一毛玻璃底 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    border: 1px solid rgba(37, 99, 235, 0.12); /* 统一边框 */
    transition: all 0.2s ease;
  }

  /* 返回首页：不撑满，宽度自适应 */
  .nav-button--home {
    width: auto;
    min-width: 100px;
    padding: 0 20px;
    white-space: nowrap;
  }

  /* 文字截断逻辑 */
  .nav-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
  }

  .nav-button:hover:not(.disabled) {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-color);
    border-color: var(--primary-color);
  }

  .nav-button.disabled {
    background: rgba(37, 99, 235, 0.02);
    color: var(--text-muted);
    border-color: transparent;
    cursor: not-allowed;
  }

  body.dark-theme .nav-button {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
  }
  body.dark-theme .nav-button:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
  }
