/* 友情链接模块样式 - 独立文件 */
.friendlink-module {
    margin: 30px 0;
    width: 100%;
    box-sizing: border-box;
    min-width: 1200px;
}

.friendlink-module .title-btn-container {
    width: 100%;
    margin-bottom: 15px;
}

.friendlink-module .title-btn-container h2 {
    position: relative;
    padding-left: 12px;
    display: inline-block;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.friendlink-module .title-btn-container h2 span {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #28a745;
    border-radius: 2px;
}

.friendlink-module .friendlink-content {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 20px;
    box-sizing: border-box;
}

/* 核心修改：PC端保持原有换行布局，移动端改为横向滚动 */
.friendlink-module .link-list {
    display: flex;
    flex-wrap: wrap; /* PC端正常换行 */
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* PC端友链宽度（保持原有逻辑，由后台配置控制） */
.friendlink-module .link-list a {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    width: var(--link-width); /* 使用动态宽度（后台配置） */
    min-width: 200px;
    box-sizing: border-box;
}

.friendlink-module .link-list a:hover {
    background: #e8f5e9;
    transform: translateY(-2px);
}

.friendlink-module .link-list a div {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    color: #fff;
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    font-weight: bold;
}

.friendlink-module .link-list a span {
    font-size: 14px;
    font-weight: 500;
}

.friendlink-module .link-list .empty-link {
    width: 100%;
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
    background: #f8f9fa;
    border-radius: 8px;
}

.friendlink-module .link-list .empty-link .icon {
    font-size: 24px;
    margin-bottom: 10px;
    width: auto;
    height: auto;
    background: none;
}

.friendlink-module .link-list .empty-link .tip {
    font-size: 12px;
    margin-top: 5px;
    color: #999;
    width: auto;
    height: auto;
    background: none;
}

.friendlink-module .link-apply-tip {
    padding: 15px 20px;
    background: #e8f4f8;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    font-size: 13px;
    color: #666;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.friendlink-module .link-apply-tip span {
    color: #28a745;
    font-weight: 500;
}

/* 移动端适配 - 核心：横向滚动 */
@media only screen and (max-width: 767px) {
    .friendlink-module {
        min-width: unset;
        width: 100%;
        margin: 15px 0;
    }
    .friendlink-module .friendlink-content {
        width: 100% !important;
        max-width: unset !important;
        padding: 15px !important;
        border-radius: 8px !important;
        margin: 0 !important;
    }
    /* 移动端改为横向滚动布局 */
    .friendlink-module .link-list {
        flex-wrap: nowrap !important; /* 禁止换行 */
        overflow-x: auto !important; /* 横向滚动 */
        padding-bottom: 8px !important; /* 给滚动条留空间 */
        -ms-overflow-style: none !important; /* 隐藏IE滚动条 */
        scrollbar-width: none !important; /* 隐藏Firefox滚动条 */
    }
    /* 隐藏Chrome/Safari移动端滚动条 */
    .friendlink-module .link-list::-webkit-scrollbar {
        display: none !important;
    }
    /* 移动端友链固定宽度，禁止压缩 */
    .friendlink-module .link-list a {
        width: 150px !important; /* 移动端固定宽度 */
        min-width: unset !important;
        flex-shrink: 0 !important; /* 禁止压缩，保证宽度 */
    }
    .friendlink-module .link-apply-tip {
        padding: 12px 15px !important;
        font-size: 12px !important;
    }
}