/* ============================================================
   B2 样式修改 / 文章列表样式
   ============================================================ */

/* ---- 文章分类“更多”按钮 ---- */
.post-list-cats a span {
    position: relative;
    padding: 0 16px;
    display: flex;
    border-radius: var(--b2radius);
    color: var(--text-muted);
    background-color: var(--bg-card);
    height: 32px;
    line-height: 32px;
    align-items: center;
}

/* ============================================================
   文章样式 1（post-8）
   ============================================================ */
/* B2 原生布局：flex 换行，li 宽度由后台 post_row_count 通过 PHP 输出 width:% 计算，CSS 不写死列数 */
.post-8.post-list ul.b2_gap {
    display: flex;
    flex-flow: wrap;
    align-items: stretch;
    padding: 0;
}

.post-8.post-list .post-list-cat-item {
    height: 20px;
    display: flex;
    line-height: 19px;
    align-items: center;
    flex-direction: row;
}

.post-8.post-list .post-list-meta li span i {
    font-size: var(--fs-sm);
    margin-right: 5px;
}

.post-8.post-list .post-list-cat {
    font-size: var(--fs-sm);
}

.post-8.post-list .post-list-cat img {
    width: 20px;
    height: 20px;
    transform: translateY(-1px);
    margin-right: 5px;
}

.post-8.post-list .post-excerpt {
    font-size: var(--fs-sm);
    margin-top: 0px;
    -webkit-line-clamp: 2;
}

.post-8 .post-info h2 {
    font-size: var(--fs-base);
    color: var(--text-primary);
    margin-top: 14px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    transition: color 0.2s;
}

/* ---- 共性问题 ---- */
.post-list-meta-avatar img {
    width: 20px !important;
    height: 20px !important;
}

/* ============================================================
   文章样式 7（post-7，大图背景卡片：角标 + 渐变遮罩 + 底部信息）
   ============================================================ */
.post-7 .ji-post-list-cats a span {
    border: 1px solid var(--border-color);
    border-radius: var(--b2radius);
}

.post-7 .picked.post-load-button span {
    color: var(--text-primary) !important;
    background-color: unset !important;
}

.post-7.post-list .post-list-cat {
    font-size: var(--fs-sm);
}

/* B2 原生布局：flex 换行，li 宽度由后台 post_row_count 通过 PHP 输出 width:% 计算，CSS 不写死列数 */
.post-7.post-list ul.b2_gap {
    display: flex;
    flex-flow: wrap;
    align-items: stretch;
    padding: 0;
}

.post-7 .post-list-cat-item {
    height: 19px;
    display: flex;
    line-height: 19px;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
}

.post-7 .post-list-cat-item i {
    transform: translateY(-1px);
}

.post-7 .post-list-cat-item img {
    width: 16px;
    height: 16px;
    margin-right: 2px;
}

/* 单个卡片：宽度由 PHP 按后台 post_row_count 计算输出（width:%），此处不写死 */
.post-7 li.card {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}
.post-7 li.card .item-in {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-7 li.card:hover .item-in {
    transform: translateY(-5px);
    box-shadow: none;
}
/* 背景图片 */
.post-7 .card-img-link {
    position: absolute;
    inset: 0;
    display: block;
}
.post-7 .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* 渐变遮罩层 */
.post-7 .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 20px;
    color: #fff;
    box-sizing: border-box;
    /* 遮罩不拦截点击：点击图片区域可穿透到 card-img-link 进入文章详情页 */
    pointer-events: none;
}
/* 遮罩内可交互元素恢复点击（收藏按钮/作者链接/标题链接/编辑删除） */
.post-7 .card-overlay a,
.post-7 .card-overlay button,
.post-7 .card-overlay .card-star {
    pointer-events: auto;
}
/* 顶部区域 */
.post-7 .card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* 右上角收藏按钮 */
.post-7 .card-star {
    font-size: var(--fs-lg);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--overlay-soft);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}
.post-7 .card-star i {
    font-size: var(--fs-lg);
    line-height: 1;
}
.post-7 .card-star:hover,
.post-7 .card-star.active {
    color: #FFD700;
}
/* 底部区域 */
.post-7 .card-bottom {
    width: 100%;
}
/* 标题 */
.post-7 .card-title {
    font-size: var(--fs-lg);
    line-height: 1.4;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.post-7 .card-title a {
    color: #fff;
    text-decoration: none;
}
.post-7 .card-title a:hover {
    color: #FFD700;
}
/* 描述 */
.post-7 .card-desc {
    font-size: var(--fs-sm);
    line-height: 1.5;
    opacity: 0.85;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
/* 底部作者 & 数据统计行 */
.post-7 .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-xs);
    opacity: 0.9;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 12px;
    gap: 8px;
}
/* 作者信息 */
.post-7 .author-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 0;
}
.post-7 .author-info a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}
.post-7 .author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.post-7 .author-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 编辑/删除链接 */
.post-7 .card-edit-link,
.post-7 .card-edit-del {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 4px;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1.5;
}
.post-7 .card-edit-link:hover,
.post-7 .card-edit-del:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}
.post-7 .allow-edit-time {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.7);
    margin-left: 6px;
    flex-shrink: 0;
}
/* 数据统计（喜欢 / 查看 / 评论 / 收藏）：参照 post_8 的 jitheme-thumb-meta 样式 */
.post-7 .card-stats {
    display: flex;
    gap: 6px;
    font-size: var(--fs-xs);
    color: #fff;
    flex-shrink: 0;
    align-items: center;
}
.post-7 .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-xs);
    color: #fff;
    background: var(--overlay);
    backdrop-filter: blur(6px);
    padding: 4px;
    border-radius: 20px;
}
.post-7 .stat-item i {
    font-size: var(--fs-sm);
    line-height: 1;
    flex-shrink: 0;
}
.post-7 .stat-item.like {
    color: #ff6b6b;
}

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
    .post-7 li.card {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 768px) {
    .post-7 .card-desc {
        display: none;
    }
    .post-7 .card-stats {
        gap: 8px;
    }
}

/* ============================================================
   post-8 列表缩略图收藏按钮
   ============================================================ */
.post-8 .ji-fav-btn {
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-lg);
    line-height: 1;
    transition: all 0.2s;
}
.post-7 .post-pay-type,
.post-8 .post-pay-type {
    display:none;
}


.thumb-top-left, .thumb-top-right {
    position: static;
    display: flex; gap: 6px;
}
.jitheme-thumb-meta {
    display: flex; gap: 6px;
    margin: 0; padding: 0; list-style: none;
    opacity: 0; transition: opacity 0.3s;
}
.post-8 .post-module-thumb:hover .jitheme-thumb-meta {
    opacity: 1;
}
.jitheme-thumb-meta li {
    display: flex; align-items: center; gap: 4px;
    font-size: var(--fs-xs); color: #fff;
    background: var(--overlay);
    backdrop-filter: blur(6px);
    padding: 4px 9px; border-radius: 20px;
}
.jitheme-thumb-meta li i { font-size: var(--fs-sm); }
/* 内容区 */
.post-8 .post-info {
    padding: 18px 20px 18px;
    display: flex; flex-direction: column; flex-grow: 1;
}
.post-8 .post-info span {
    font-size: var(--fs-base);
    height: 16px;
    line-height: 16px;
}
.post-8 .post-info h2 {
    font-size: var(--fs-md); font-weight: 600; color: var(--text-primary);
    margin: 0 0 14px 0; line-height: 1.5;
}
.post-8 .post-excerpt {
    font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.6;
    margin: 0 0 14px 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 操作栏 */
.jitheme-card-actionbar {
    display: flex; align-items: center; gap: 10px;
    padding-top: 14px; margin-top: auto;
    border-top: 1px solid var(--border-color);
}
.jitheme-op-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: var(--fs-xs);
    line-height: 1;
    background: #f4f6f9;
    color: var(--text-secondary);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.jitheme-op-btn i {display: inline-flex;align-items: center;justify-content: center;font-size: var(--fs-base);line-height: 16px;flex-direction: row;}
/* 收藏按钮 */
.jitheme-op-fav {
    flex: 1; justify-content: center;
    position: static !important;
    width: auto !important; height: auto !important;
}
.jitheme-op-fav.liked, .jitheme-op-fav.active,.jitheme-op-fav:hover {
    background: #fff0f0!important;
    color: #d9363e!important;
}
.jitheme-op-fav.liked i, .jitheme-op-fav.active i { color: #d9363e !important; }
/* 分类按钮 */
.jitheme-op-cat {
    max-width: 120px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.jitheme-op-cat:hover { background: #e4e8ee; color: var(--text-primary); }
.jitheme-op-cat a { color: inherit; text-decoration: none; }
/* 作者头像 */
.jitheme-user-avatar-link { flex-shrink: 0; display: block; }
.jitheme-user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    object-fit: cover; display: block;
    border: 1px solid #fff; box-shadow: none;
}

/* ============ 暗夜模式适配（post.css） ============ */
[data-theme="dark"] .post-8 .post-info h2 { color: #e8eaf0; }
[data-theme="dark"] .post-8 .post-excerpt { color: #8a90a0; }
[data-theme="dark"] .jitheme-card-actionbar { border-top-color: #2f3238; }
[data-theme="dark"] .jitheme-op-btn { background: #24262c; color: #a4a8b1; }
[data-theme="dark"] .jitheme-op-fav.liked, [data-theme="dark"] .jitheme-op-fav.active, [data-theme="dark"] .jitheme-op-fav:hover { background: #3a2028 !important; color: #f87171 !important; }
[data-theme="dark"] .jitheme-op-cat:hover { background: #2a2d33; color: #e8eaf0; }
[data-theme="dark"] .jitheme-user-avatar { border-color: #2f3238; }