/* ========================================
   右侧作者信息边栏组件样式
   ======================================== */

.post-sidebar-right {
    position: sticky;
    top: 80px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 作者信息卡片 */
.author-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.author-card-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

/* 作者头像链接 */
.author-card-avatar-link {
    display: block;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%; /* 圆形容器 */
    overflow: hidden; /* 裁剪超出部分 */
    /* 移除hover放大效果 */
}

.author-card-avatar,
.author-card-avatar-link img,
.author-card-avatar-link .avatar {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important; /* 强制圆形头像 */
    display: block;
    object-fit: cover; /* 确保图片填充整个区域 */
    /* 提高图片清晰度 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.author-card-info {
    flex: 1;
    min-width: 0; /* 防止文字溢出 */
}

/* 作者名称链接 */
.author-card-name-link {
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.author-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin: 0;
    transition: color 0.2s ease;
}

.author-card-name-link:hover .author-card-name {
    color: #FF6A00; /* 悬停时变为主题色 */
}

.author-badges {
    display: flex;
    gap: 6px;
}

.badge {
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 500;
}

.badge-vip {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-level {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-verified {
    background-color: #e6f7ff;
    color: #1890ff;
}

.author-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.author-card-stats .stat-item {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
}

.btn-follow {
    width: 100%;
    padding: 11px;
    background-color: #FF6A00;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-follow:hover {
    background-color: #E65F00;
}

.btn-follow .following-text {
    display: none;
}

.btn-follow.following {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.btn-follow.following .follow-text {
    display: none;
}

.btn-follow.following .following-text {
    display: inline;
}

.btn-follow.following:hover {
    background-color: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

/* 查看主页按钮（用户本人） */
.btn-view-profile {
    display: block;
    width: 100%;
    padding: 11px;
    background-color: #ffffff;
    color: #FF6A00;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-profile:hover {
    background-color: #f9fafb;
    border-color: #FF6A00;
    color: #E65F00;
}

/* 广告横幅 */
.ad-banner {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ad-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* 热门文章 */
.hot-posts-widget {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.hot-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-post-item {
    display: block;
    padding: 10px 0;
    color: #4b5563;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.55;
    transition: color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.hot-post-item:last-child {
    border-bottom: none;
}

.hot-post-item:hover {
    color: #FF6A00;
}

.hot-post-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

/* 响应式 - 手机端 */
@media (max-width: 768px) {
    .post-sidebar-right {
        position: static;
    }
    
    .author-card {
        padding: 16px;
    }
}
