/* 内链模块样式 */
.link-module {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
.link-module-title {
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.25rem;
    font-weight: bold;
}
.link-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.link-cat {
    padding: 5px 15px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    color: #666;
}
.link-cat.active {
    background: #0073aa;
    color: #fff;
}
.link-group {
    display: none;
}
.link-group.active {
    display: block;
}

/* 图片列表 */
.link-img-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}
.link-img-list a {
    display: block;
    text-decoration: none;
    text-align: center;
    position: relative;
}

/* 图片容器 - 固定尺寸，无背景 */
.link-img-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.link-img-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 图片下方文字 */
.link-img-title {
    display: block;
    text-align: center;
    font-size: 13px;
    padding: 8px 0 0 0;
    color: #333;
}

/* 热标签 - 放在图片内部右上角 */
.link-hot {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff5722;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 2;
}

/* ========== 固定图片尺寸 ========== */
/* 竖版 90x150 */
.link-img-v .link-img-item {
    width: 90px;
    height: 150px;
}
/* 小方块 70x70 */
.link-img-square .link-img-item {
    width: 70px;
    height: 70px;
}
/* 横版 230x100 */
.link-img-h .link-img-item {
    width: 230px;
    height: 100px;
}

/* 折叠状态 */
.link-img-list.collapsed a:nth-child(n+6) {
    display: none;
}

/* 展开按钮 */
.link-expand {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.link-expand-btn {
    color: #0073aa;
    cursor: pointer;
    font-size: 0.875rem;
}
.link-expand-btn:hover {
    text-decoration: underline;
}

/* 文字内链列表 */
.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}
.link-list a {
    display: inline-block;
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    font-size: 0.875rem;
    position: relative;
}
.link-list a:hover {
    background: #0073aa;
    color: #fff;
}
.link-list.collapsed a:nth-child(n+6) {
    display: none;
}
/* 文字模式的热标签 */
.link-list .link-hot {
    position: relative;
    top: -2px;
    right: auto;
    margin-left: 5px;
    display: inline-block;
}

@media (max-width: 768px) {
    .link-module {
        padding: 12px;
    }
    .link-img-list {
        gap: 15px;
    }
}