/* ============================================================
   来源：views/theme/rank.html 内联 <style> 第 1 块（原位抽离，88 行）
   说明：在原位置以 <link rel="stylesheet"> 引入，来源顺序不变，
        层叠结果与抽离前逐字一致，不会引起样式变化。
   ============================================================ */
/* ===== 顶部栏（rank.html 特有） ===== */
.theme-header-wrapper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e9ecf0;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}
.theme-header-wrapper .left { flex: 1; min-width: 0; }
.theme-header-wrapper .left .info h2 { font-size: 18px; margin: 0; color: #1f2a3a; }
.theme-header-wrapper .right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 8px;
    padding-left: 16px;
    border-left: 1px solid #d0d7e0;
    min-width: 160px;
}
.theme-header-wrapper .right .actions {
    display: flex;
    gap: 8px 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 14px;
}
.theme-header-wrapper .right .actions a { color: #5a6b7c; text-decoration: none; transition: color 0.2s; }
.theme-header-wrapper .right .actions a:hover { color: #eb1313; }
.theme-header-wrapper .right .actions .btn-special {
    background: #eb1313;
    color: #fff !important;
    padding: 3px 14px;
    border-radius: 4px;
    font-size: 13px;
}
.theme-header-wrapper .right .actions .btn-special:hover { background: #c00; }
.theme-header-wrapper .right .actions .sep { color: #d0d7e0; }

/* ===== 排行榜条目丰富样式 ===== */
.doc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: 13px;
    color: #7a8a9e;
    margin-top: 4px;
}
.doc-meta .file-type {
    font-size: 12px;
    color: #7a8a9e;
    background: #f0f2f5;
    padding: 0 8px;
    border-radius: 12px;
    line-height: 22px;
    white-space: nowrap;
}
.doc-meta .vip-badge {
    font-size: 12px;
    background: #f59e0b;
    color: #fff;
    padding: 0 8px;
    border-radius: 12px;
    line-height: 22px;
    font-weight: 600;
    white-space: nowrap;
}
.doc-meta .category-tag {
    background: #f0f2f5;
    padding: 0 10px;
    border-radius: 12px;
    line-height: 22px;
    font-size: 12px;
    color: #5a6b7c;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .theme-header-wrapper { flex-direction: column; align-items: stretch; }
    .theme-header-wrapper .right { border-left: none; border-top: 1px solid #d0d7e0; padding-left: 0; padding-top: 10px; align-items: flex-start; }
    .theme-header-wrapper .right .actions { justify-content: flex-start; }
}

/* ============================================================
   2026-10-03 排行榜页优化（样式收口 + 片段化配套）
   ============================================================ */

/* ===== 顶部栏改成站点品牌色 =====
   原来用的是冷灰蓝（#f8fafc / #e9ecf0 / #5a6b7c），
   跟全站米色底 + 品牌红（#eb1313）的体系不一致。 */
.theme-header-wrapper {
    background: #fdfaf7;
    border-color: #f0e8e0;
}
.theme-header-wrapper .left .info h2 { color: #2c2b28; }
.theme-header-wrapper .right { border-left-color: #efe6dc; }
.theme-header-wrapper .right .actions a { color: #8c8378; }
.theme-header-wrapper .right .actions .sep { color: #ddd0c2; }

/* ===== 列表条目（配套 fragments/rank-list.html 片段） =====
   .rank-item 本身已经是 flex（article.css 里 display:flex; gap:16px），
   所以原来每一条里再套一层 inline 的 flex div 属于重复，已由片段去掉。 */
.rank-item .rank-body { flex: 1; min-width: 0; }

/* 徽标配色不动：热/荐/精/新 四色由 theme.css 的 `.rank-item .rank-badge.*` 统一提供
   （hot 红 / recommend 蓝 / essence 琥珀 / new 绿），本页不覆盖，保持全站一致。 */

/* 榜单为空时的提示（原来写在内联 style 里，4 处各写一遍） */
.rank-empty {
    padding: 28px 20px;
    text-align: center;
    color: #b0a8a0;
    font-size: .9rem;
    background: #fdfaf7;
    border: 1px dashed #efe6dc;
    border-radius: 12px;
}
.side-empty {
    padding: 10px 0;
    color: #b0a8a0;
    font-size: .9rem;
}

/* 「该榜为自动排序」提示：后台没人工标注时要讲清楚，别让用户以为是人工精选 */
.rank-auto-hint {
    margin: 0 0 12px;
    padding: 8px 12px;
    background: #fffdf8;
    border: 1px solid #f2e7d5;
    border-radius: 10px;
    font-size: .8rem;
    color: #8a6a2f;
    line-height: 1.5;
}

/* 侧栏标签云（原来是内联 flex） */
.tag-cloud-sm {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0;
}

/* 窄屏：单条排行里的元信息换行后不要把名次挤出去 */
@media (max-width: 640px) {
    .rank-item { padding: 14px; gap: 10px !important; }
    .rank-item .rank-body .doc-meta { gap: 4px 8px; }
}
