/**
 * V3 主题友情链接页样式
 * 依赖 Links 插件，按 sort 分组网格展示
 */

.links-page { padding: 8px 0; }
.links-page .links-title { font-size: 26px; font-weight: 400; margin-bottom: 4px; }
.links-page .links-desc { color: #999; font-size: 14px; margin: 0 0 24px; }

.links-sort-title {
    font-size: 18px;
    font-weight: 500;
    margin: 28px 0 14px;
    padding-left: 10px;
    border-left: 3px solid #6366f1;
    color: #333;
}
.links-sort-title:first-of-type { margin-top: 8px; }

.links-part-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 14px;
}
.links-part-grid > a,
.links-part-grid > .cat_block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 1rem 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: background .25s ease;
}
.links-part-grid > a:hover,
.links-part-grid > .cat_block:hover {
    background: rgba(0,0,0,0.03);
}

.links-cover-img { display: none; }

.links-part-grid .avatar,
.links-part-grid .link-avatar {
    width: 52px;
    height: 52px;
    object-fit: cover;
    background: #f3f4f6;
    display: block;
}

.links-avatar-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    transition: box-shadow .25s ease, transform .25s ease;
}
.links-part-grid > a:hover .links-avatar-wrap,
.links-part-grid > .cat_block:hover .links-avatar-wrap {
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
}

.links-author {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-align: center;
    line-height: 1.3;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.links-part-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
}
.links-part-flex .avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.links-description { display: none; }

/* ===== 申请表单 ===== */
.links-apply {
    margin-top: 32px;
    padding: 20px;
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
}
.links-apply h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 16px;
    color: #333;
}
.v3-apply-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.v3-apply-form label { display: flex; flex-direction: column; font-size: 13px; color: #666; }
.v3-apply-form label.full { grid-column: 1 / -1; }
.v3-apply-form label span { margin-bottom: 4px; }
.v3-apply-form input,
.v3-apply-form textarea {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}
.v3-apply-form input:focus,
.v3-apply-form textarea:focus { border-color: #6366f1; }
.v3-apply-form textarea { resize: vertical; min-height: 70px; }
.v3-apply-submit {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 8px 22px;
    border: none;
    border-radius: 6px;
    background: #6366f1;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
}
.v3-apply-submit:hover { background: #4f46e5; }

/* ===== 博友圈 ===== */
.links-feed { margin-top: 32px; }
.postlist_out { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.postlist {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 14px;
}
.postlist_title a { font-size: 15px; color: #333; text-decoration: none; font-weight: 500; }
.postlist_title a:hover { color: #6366f1; }
.postlist_abstract {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    margin: 6px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.postlist_tags { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #aaa; }
.postlist_tags .link-favicon { width: 16px; height: 16px; border-radius: 50%; }
.postlist_tags .author a { color: #6366f1; text-decoration: none; }

.links-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    background: #fff;
    border: 1px dashed #e5e7eb;
    border-radius: 8px;
}
@media (max-width: 640px) {
    .v3-apply-form { grid-template-columns: 1fr; }
    .postlist_out { grid-template-columns: 1fr; }
}
