        /* --- 1. 基础环境 --- */
/* 只针对友情链接网格内部的 A 标签去掉下划线 */
.link-grid a, 
.link-grid a:hover {
    text-decoration: none !important;
    border-bottom: none !important; /* 彻底移除可能的底边框下划线 */
}

        /* --- 2. 选项卡导航（新形态按钮） --- */
        .tabs-nav { display: flex; gap: 20px; margin-bottom: 25px; margin:20px; }
        .tab-btn {
            flex: 1; padding: 15px; text-align: center; border-radius: 15px;
            font-weight: bold; color: #64748b; cursor: pointer; transition: all 0.3s ease;
            box-shadow: 6px 6px 12px #d1d9e6, -6px -6px 12px #ffffff; border: none;
        }
        .tab-btn.active {
            box-shadow: inset 4px 4px 8px #d1d9e6, inset -4px -4px 8px #ffffff !important;
            color: #007bff;
        }

        /* --- 3. 面板控制 --- */
        .tab-panel { display: none; animation: fadeIn 0.4s ease; }
        .tab-panel.active { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* --- 4. 宫格卡片样式 --- */
        .link-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px; list-style: none; padding: 0; margin: 0;
        }
        /* 这里的 .link-item 就是你 Z-Blog 输出的原始 li 标签容器 */
        .link-item { list-style: none; }

        .link-card {
            border-radius: 15px; padding: 15px;
            display: flex; align-items: center; gap: 12px;
            box-shadow: 4px 4px 8px #d1d9e6, -4px -4px 8px #ffffff;
            transition: all 0.3s ease;
            height: 100%; box-sizing: border-box;
        }
        .link-card:hover {
            box-shadow: inset 3px 3px 6px #d1d9e6, inset -3px -3px 6px #ffffff !important;
        }

        /* 头像圆圈（内凹） */
        .link-avatar {
            width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            box-shadow: inset 2px 2px 5px #d1d9e6, inset -2px -2px 5px #ffffff;
            overflow: hidden;
        }
        .link-avatar img { width: 100%; height: 100%; object-fit: cover; }
        .fallback-text { font-size: 18px; font-weight: bold; color: #a0aec0; user-select: none; }

/* 1. 关键：防止 Flex 子元素被内容撑开 */
.link-info {
    flex-grow: 1;
    /* 必须加上这个，否则内部长文字会无视父级宽度 */
    min-width: 0; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 2. 站点名称：强制单行截断 */
.link-name {
    font-size: 15px;
    font-weight: bold;
    color: #313d5a;
    margin: 0 0 2px 0;
    /* 溢出隐藏并显示点点点 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 3. 描述文字：强制两行截断（最推荐方案） */
.link-desc {
    font-size: 12px;
    color: #a0aec0;
    margin: 0;
    line-height: 1.4;
    
    /* 开启多行截断逻辑 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 最多显示2行，多余的部分变点点点 */
    overflow: hidden;
    
    /* 备选：如果有些浏览器不支持 line-clamp，确保高度不会撑开 */
    max-height: 2.8em; 
    text-align: justify;
}

        /* --- 5. 通用容器 --- */
        .art-post { padding: 30px; border-radius: 20px; box-shadow: 6px 6px 12px #d1d9e6, -6px -6px 12px #ffffff; margin:20px;}

        /* 响应式 */
@media (max-width: 900px) { .link-grid { grid-template-columns: repeat(2, 1fr); } }

        /* 4. 针对移动端的额外保险 */
@media (max-width: 480px) {
    .link-grid {
        /* 确保网格不会溢出屏幕 */
        grid-template-columns: 1fr;
        width: 100%;
    }
    .link-card {
        /* 避免内边距过大挤压文字空间 */
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
    }
}