/* ===== 外部容器 ===== */
.user-following-container {
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
    width: auto;
}

/* ===== 每个作者块 ===== */
.following-author-block {
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

/* ===== 作者头部 ===== */
.following-author-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 12px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.following-author-header .avatar-wrap {
    flex-shrink: 0;
    cursor: pointer;
}
.following-author-header .avatar-wrap img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
}
.following-author-header .info-wrap {
    flex: 1;
    min-width: 0;
    position: relative; /* 为绝对定位按钮容器提供基准 */
}

/* ----- 右上角操作按钮容器 ----- */
.following-author-header .action-buttons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
    white-space: nowrap;
}

/* 取消关注按钮 */
.following-author-header .action-buttons .unfollow-btn {
    padding: 4px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff0f0;
    color: #c0392b;
    cursor: pointer;
    transition: 0.2s;
}
.following-author-header .action-buttons .unfollow-btn:hover {
    background: #fdd;
    border-color: #c0392b;
}

/* 更多按钮（移除绝对定位，由容器控制） */
.following-author-header .action-buttons .more-link {
    padding: 4px 10px;
    font-size: 14px;
    color: #0073aa;
    text-decoration: none !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    display: inline-block;
}
.following-author-header .action-buttons .more-link:hover {
    background: #e5e5e5;
}

.following-author-header .name-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    margin-bottom: 4px;
}
.following-author-header .name-row .author-name {
    font-size: 22px;
    font-weight: 600;
}
.following-author-header .name-row .stat-item {
    font-size: 14px;
    color: #555;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.following-author-header .name-row .stat-item .num {
    font-weight: 600;
    color: #222;
}

/* meta-row：卡片按钮 + 加入时间 */
.following-author-header .meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    margin: 4px 0;
}
.following-author-header .meta-row .card-link {
    padding: 2px 16px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 40px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #d1d5db;
    display: inline-block;
}
.following-author-header .meta-row .card-link:hover {
    background: #dbeafe;
}
.following-author-header .meta-row .join-time {
    font-size: 14px;
    color: #888;
    white-space: nowrap;
}

/* bio-row：仅简介 */
.following-author-header .bio-row {
    margin-top: 6px;
    font-size: 15px;
    color: #333;
    padding: 4px 0;
    border-top: 1px dashed #eee;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.following-author-header .bio-row .bio-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.2em;
}
.following-author-header .bio-row .bio-text:empty::before {
    content: '作者暂无简介';
    color: #aaa;
}

/* ===== 作品网格 ===== */
.following-posts-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}
.following-posts-grid .post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
}
.following-posts-grid .post-card.vertical-card {
    grid-row: span 2;
}
.following-posts-grid .post-card .thumb-link {
    display: block;
    background-color: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    flex-shrink: 0;
}
.following-posts-grid .post-card .thumb-link:not(.vertical-thumb) {
    aspect-ratio: 16 / 9;
}
.following-posts-grid .post-card .thumb-link.vertical-thumb {
    flex: 1;
    aspect-ratio: 3/4;
    min-height: 0;
}
.following-posts-grid .post-card .thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.following-posts-grid .post-card .post-title {
    margin: 6px 6px 0 6px;
    font-size: 15px;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    flex-shrink: 0;
}
.following-posts-grid .post-card .post-title a {
    text-decoration: none !important;
    color: #333;
}
.following-posts-grid .post-card .post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 6px 6px 6px;
    height: 32px;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 13px;
    color: #666;
}
.following-posts-grid .post-card .post-meta .meta-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 14px;
    flex-shrink: 0;
}
.following-posts-grid .post-card .post-meta .meta-stats svg {
    width: 1.1em;
    height: auto;
    flex-shrink: 0;
}
.following-posts-grid .post-card .post-meta .post-time {
    color: #999;
    font-size: 14px;
    flex-shrink: 0;
    white-space: nowrap;
}
.following-posts-grid .no-posts-msg {
    grid-column: 1 / -1;
    padding: 20px;
    text-align: center;
    color: #bbb;
    font-size: 14px;
}


@media (max-width: 900px) {
    .following-posts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
    .following-author-header {
        flex-wrap: wrap;
    }
    /* 移动端右上角按钮位置微调，不破坏布局 */
    .following-author-header .action-buttons {
        position: relative;
        top: auto;
        right: auto;
        justify-content: flex-end;
        margin-top: 4px;
        width: 100%;
    }
}
