/* ===================== 面包屑 ===================== */
.breadcrumb-bar { background: #fff; border-bottom: 1px solid #eee; padding: 10px 0; }
.breadcrumb-bar .container { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #888; }
.breadcrumb-bar a { color: #888; }
.breadcrumb-bar a:hover { color: #1e6fd9; }
.breadcrumb-bar span { color: #333; }
.sep { font-size: 11px; color: #ccc; }

/* ===================== 详情页布局 ===================== */
.detail-main { padding: 24px 0 40px; }
.detail-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }
.detail-article { background: #fff; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.06); padding: 30px; }
.detail-sidebar { display: flex; flex-direction: column; gap: 0; }

.detail-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.detail-tag { display: inline-block; background: #e8f0fe; color: #1e6fd9; font-size: 12px; padding: 3px 10px; border-radius: 3px; margin-bottom: 12px; font-weight: 500; }
.detail-title { font-size: 22px; font-weight: 700; color: #111; line-height: 1.5; margin-bottom: 16px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 13px; color: #888; }
.detail-meta span { display: flex; align-items: center; gap: 5px; }
.detail-meta .like-btn { margin-left: auto; }

.detail-content { line-height: 1.9; color: #333; font-size: 14px; }
.detail-content h1, .detail-content h2, .detail-content h3, .detail-content h4 { color: #222; margin: 20px 0 12px; font-weight: 700; }
.detail-content h3 { font-size: 16px; padding-left: 10px; border-left: 3px solid #1e6fd9; }
.detail-content h4 { font-size: 14px; color: #1e6fd9; }
.detail-content p { margin-bottom: 14px; }
.detail-content ul, .detail-content ol { padding-left: 20px; margin-bottom: 14px; }
.detail-content li { margin-bottom: 6px; }
.detail-content strong { color: #1e6fd9; font-weight: 600; }
.detail-content code { background: #f5f5f5; padding: 1px 6px; border-radius: 3px; font-family: monospace; font-size: 13px; color: #1e6fd9; }
.detail-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.detail-content table th { background: #1e6fd9; color: #fff; padding: 8px 12px; text-align: left; }
.detail-content table td { padding: 8px 12px; border: 1px solid #eee; }
.detail-content table tr:nth-child(even) td { background: #f0f6ff; }
.detail-content blockquote { border-left: 4px solid #1e6fd9; padding: 10px 16px; background: #f0f6ff; margin: 16px 0; color: #555; border-radius: 0 4px 4px 0; }

.detail-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; background: #1e6fd9; color: #fff; border-radius: 4px; font-size: 13px; transition: background .2s; }
.back-btn:hover { background: #104a9e; color: #fff; }

.article-item.current .article-title { color: #1e6fd9; font-weight: 600; }

/* ===================== 列表页布局 ===================== */
.list-main { padding: 24px 0 40px; }
.list-layout { display: grid; grid-template-columns: 1fr 260px; gap: 20px; }
.list-section { background: #fff; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.06); padding: 20px 24px; }
.list-sidebar { display: flex; flex-direction: column; gap: 0; }

.list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #1e6fd9; }
.list-header h2 { font-size: 17px; font-weight: 700; color: #1e6fd9; display: flex; align-items: center; gap: 8px; }
.list-count { font-size: 13px; color: #999; }

.filter-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px; background: #f9f9f9; border-radius: 6px; flex-wrap: wrap; }
.sort-group { display: flex; gap: 8px; flex-shrink: 0; }

/* ===================== 移动端 H5 响应式 ===================== */
@media screen and (max-width: 768px) {
  /* 面包屑 - 移动端增强 */
  .breadcrumb-bar { padding: 8px 0; }
  .breadcrumb-bar .container {
    font-size: 12px; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    white-space: nowrap; scrollbar-width: none;
  }
  .breadcrumb-bar .container::-webkit-scrollbar { display: none; }
  .breadcrumb-bar a { flex-shrink: 0; }
  .breadcrumb-bar span { flex-shrink: 0; }

  /* 详情页布局：双栏 → 单栏 */
  .detail-layout { grid-template-columns: 1fr; gap: 16px; }
  .detail-sidebar { order: 2; }

  /* 详情文章 */
  .detail-article {
    padding: 16px 14px; border-radius: 8px;
  }
  .detail-header { margin-bottom: 16px; padding-bottom: 14px; }
  .detail-tag { font-size: 11px; padding: 3px 8px; margin-bottom: 10px; }
  .detail-title {
    font-size: 19px; line-height: 1.5; margin-bottom: 12px; word-break: break-word;
  }
  .detail-meta {
    flex-wrap: wrap; gap: 8px; font-size: 12px;
  }
  .detail-meta .like-btn { margin-left: 0; margin-top: 4px; }

  /* 详情内容 - 移动端增强 */
  .detail-content {
    font-size: 15px; line-height: 1.9; word-break: break-word;
  }
  .detail-content img { max-width: 100%; height: auto; display: block; margin: 12px 0; border-radius: 4px; }
  .detail-content h3 {
    font-size: 16px; padding-left: 8px; border-left-width: 3px; margin: 16px 0 10px;
  }
  .detail-content h4 { font-size: 15px; margin: 14px 0 8px; }
  .detail-content p { margin-bottom: 12px; }
  .detail-content ul, .detail-content ol { padding-left: 18px; margin-bottom: 12px; }
  .detail-content li { margin-bottom: 4px; }
  .detail-content table {
    font-size: 12px; display: block; overflow-x: auto;
    -webkit-overflow-scrolling: touch; border-radius: 4px;
  }
  .detail-content table th, .detail-content table td { padding: 6px 8px; }
  .detail-content blockquote { padding: 8px 12px; margin: 12px 0; font-size: 14px; }
  .detail-content pre {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    font-size: 13px; padding: 12px; border-radius: 4px;
  }
  .detail-content code { font-size: 13px; word-break: break-all; }

  /* 详情页底部 */
  .detail-footer { margin-top: 16px; padding-top: 12px; }
  .back-btn {
    padding: 10px 20px; font-size: 14px; min-height: 44px;
    display: flex; width: fit-content;
  }

  /* 列表页布局：双栏 → 单栏 */
  .list-layout { grid-template-columns: 1fr; gap: 16px; }
  .list-sidebar { order: 2; }

  /* 列表主体 */
  .list-section { padding: 14px 14px; border-radius: 8px; }
  .list-header {
    flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding-bottom: 10px;
  }
  .list-header h2 { font-size: 15px; }
  .list-count { font-size: 12px; }

  /* 筛选栏 */
  .filter-bar {
    flex-direction: column; gap: 8px; padding: 10px;
  }
  .filter-bar .category-tabs {
    flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding-bottom: 4px;
  }
  .filter-bar .category-tabs::-webkit-scrollbar { display: none; }
  .sort-group { flex-wrap: wrap; }

  /* 列表页底部留白 - 为底部导航腾出空间 */
  .detail-main, .list-main { padding-bottom: 80px; }
}

@media screen and (max-width: 480px) {
  .detail-title { font-size: 17px; }
  .detail-article { padding: 12px 10px; }
  .detail-content { font-size: 14px; }
  .list-section { padding: 10px 10px; }
  .back-btn { padding: 8px 16px; font-size: 13px; }
}

/* ===================== 横屏适配 ===================== */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .detail-layout, .list-layout { gap: 12px; }
  .detail-article { padding: 12px 14px; }
  .list-section { padding: 10px 14px; }
}
