/* ================================================================
   首页列表：极致高密度 + 零晃动方案
   ================================================================ */

.threadlist .thread {
    display: flex;
    padding: 5px 18px !important; /* 高度极致收紧 */
    border-bottom: 1px solid #f1f3f5 !important;
    background: #fff !important;
    position: relative;
    border-left: none !important;
    margin: 0 !important;
    transform: none !important;
    transition: background 0.2s ease;
    overflow: visible !important; 
}

.threadlist .thread .ml-1.mt-1.mr-3 {
        margin-right: 8px !important; /* 强制覆盖原来的 mr-3 (16px) */
}

/* 外挂 2px 细色条 (#a9aec3) */
.threadlist .thread::before {
    content: "";
    position: absolute;
    left: -2px;     
    top: 0;
    bottom: 0;
    width: 2px;     
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.threadlist .thread:hover::before {
    background-color: #a9aec3;
}

.threadlist .thread:hover {
    background-color: #f7f8f9 !important;
}

/* 3. 头像与文字间距 */
.threadlist .thread .avatar-3 {
    width: 40px; height: 40px;
    border-radius: 5px;
    margin-right: 3px !important; /* 紧贴头像 */
    flex-shrink: 0;
    margin-top: 5px; 
}

/* 4. 标题布局 - 强制图标与文字同级排列 */
.threadlist .thread .subject {
    /* 取消 flex，改回块级布局以容纳行内元素 */
    display: block !important; 
    margin-bottom: 0px !important; 
    margin-top: 5px; 
    word-break: break-all;
}

/* 置顶图标：设置为行内块，随文字换行 */
.threadlist .thread .subject i.fa-thumbtack {
    display: inline-block !important;
    vertical-align: middle; /* 垂直对齐居中 */
    margin-top: 0px;       /* 向上微调，补偿文字行高 */
    margin-right: 4px !important;
    font-size: 14px;
    flex-shrink: 0;
}

/* 标题链接：设为行内，确保图标能混入第一行文字 */
.threadlist .thread .subject a {
    display: inline !important; /* 关键：必须是 inline 才能让图标贴着它 */
    color: #2f5680 !important; 
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important; /* 增加行高，防止两行标题时显得太挤 */
    transition: color 0.2s ease;
    vertical-align: middle;
}

.threadlist .thread:hover .subject a {
    color: #5f8ece !important;
}

/* 5. 辅助文字容器 (核心：接管之前的 .info) */
.info-container {
    margin-top: 8px !important;
    align-items: center !important;
    font-size: 11px !important;
    color: #949ca6 !important;
}

/* 左侧图标组的间距控制 */
.info-left-group {
    display: flex;
    align-items: center;
    gap: 15px; /* PC 端间距 */
}

/* 统一图标行内所有项的颜色 */
.info-item {
    display: inline-flex;
    align-items: center;
    color: #8b9fb3 !important;
}

/* 6. 右侧板块标签 (保留你的精致定义，微调对齐) */
.badge.badge-posts {
    flex-shrink: 0 !important;
    background: #f0f2f5 !important;
    color: #8a92a3 !important;
    border: 1px solid #e9ecef !important;
    padding: 1.5px 6px !important;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 10px !important;
    align-self: center !important; /* 改为居中对齐 */
    max-width: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2 !important;
}

/* 清除冗余横线 */
.jan-hr, .jan-hr-2, .card-header:after { 
    display: none !important; 
}

@media (max-width: 768px) {
    /* 1. 标题字号缩小 (从 15px 降到 13.5px) */
    .threadlist .thread .subject a {
        font-size: 14px !important;
        font-weight: 400 !important;;
        line-height: 1.3 !important;
        letter-spacing: -0.2px; /* 字符微调紧凑 */
    }

    /* 2. 图标行文字缩小 (从 11px 降到 9.5px) */
    .threadlist .info-item, 
    .threadlist .info-item span, 
    .threadlist .info-item a {
        font-size: 9.5px !important;
        line-height: 1 !important;
    }
    
    .threadlist .thread .ml-1.mt-1.mr-3 {
        margin-right: 8px !important; /* 强制覆盖原来的 mr-3 (16px) */
    }

    /* 3. 图标本身也同步缩小 */
    .threadlist .info-item svg {
        width: 9px !important;
        height: 9px !important;
        margin-right: 2px !important;
    }

    /* 4. 底部版块标签缩小 */
    .threadlist .badge-posts {
        font-size: 8.5px !important;
        padding: 1px 4px !important;
        transform: scale(0.95); /* 视觉上更轻巧 */
    }

    /* 5. 头像下方的 ID/用户名缩小 */
    .threadlist .username {
        font-size: 9px !important;
        margin-top: 2px;
        opacity: 0.8;
    }

    /* 6. 最后回复的时间 (如果没隐藏) 进一步虚化 */
    .threadlist .info-last-reply span[style*="font-size: 11px"] {
        font-size: 9px !important;
        opacity: 0.5;
    }
}