/* posts.php 专用样式 */
.posts-container {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.posts-main-content {
    flex: 2;
}

.posts-sidebar {
    flex: 1;
    min-width: 300px;
}

/* 动态卡片样式 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 0;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #007bff, #00bfff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover::before {
    opacity: 1;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.post-header .avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    margin-right: 20px;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.post-header .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-header .info {
    flex: 1;
}

.post-header .info .name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 5px;
}

.post-header .info .time {
    color: #999;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-header .info .time::before {
    content: '🕒';
    font-size: 12px;
}

.post-content {
    color: #444;
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 15px;
}

.post-content p {
    margin: 0;
}

.post-content .read-more {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
    display: inline-block;
}

.post-content .read-more:hover {
    text-decoration: underline;
}

.post-stats {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-stats .source {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-stats .source::before {
    content: '👥';
    font-size: 12px;
}

.post-stats .actions {
    display: flex;
    gap: 15px;
}

.post-stats .action-btn {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.post-stats .action-btn:hover {
    color: #007bff;
}

.post-stats .action-btn.like::before {
    content: '❤️';
}

.post-stats .action-btn.comment::before {
    content: '💬';
}

.post-stats .action-btn.share::before {
    content: '🔗';
}

/* 空状态样式 */
.empty-posts {
    text-align: center;
    padding: 60px 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border: 2px dashed #e0e0e0;
}

.empty-posts .icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
}

.empty-posts h3 {
    color: #666;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
}

.empty-posts p {
    color: #999;
    font-size: 14px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 20px;
}

.empty-posts .btn {
    margin-top: 15px;
}

/* 侧边栏卡片 */
.side-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.side-card h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-card h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #007bff;
    border-radius: 2px;
}

.side-card.latest-posts h3::before {
    background: #28a745;
}

.side-card.latest-persons h3::before {
    background: #ff6b6b;
}

/* 最新发表列表 */
.latest-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.latest-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    padding-left: 8px;
    padding-right: 8px;
}

.latest-list li:hover {
    background-color: #f9f9f9;
}

.latest-list li:last-child {
    border-bottom: none;
}

.latest-list li a {
    color: #444;
    text-decoration: none;
    display: block;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    padding-left: 20px;
}

.latest-list li a::before {
    content: '📝';
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 12px;
}

.latest-list li a:hover {
    color: #007bff;
}

/* 人脉列表 */
.person-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.person-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    padding-left: 8px;
    padding-right: 8px;
}

.person-list li:hover {
    background-color: #f9f9f9;
}

.person-list li:last-child {
    border-bottom: none;
}

.person-list .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    margin-right: 15px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.person-list .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-list .info {
    flex: 1;
    overflow: hidden;
}

.person-list .info .name {
    font-weight: 600;
    color: #333;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    margin-bottom: 3px;
}

.person-list .info .company {
    color: #666;
    font-size: 12px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-list a {
    text-decoration: none;
    display: flex;
    align-items: center;
    flex: 1;
}

.person-list a:hover .name {
    color: #007bff;
}

/* 查看更多 */
.view-more {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.view-more a {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s ease;
}

.view-more a::after {
    content: '→';
    font-size: 12px;
    transition: transform 0.2s ease;
}

.view-more a:hover {
    text-decoration: underline;
}

.view-more a:hover::after {
    transform: translateX(3px);
}

/* 分页样式优化 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #fff;
}

.pagination a:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.pagination a.active {
    background: linear-gradient(135deg, #007bff, #00bfff);
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.pagination a:first-child,
.pagination a:last-child {
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .posts-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .posts-sidebar {
        min-width: 100%;
    }
    
    .post-header .avatar {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .post-card {
        padding: 20px;
    }
    
    .side-card {
        padding: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination a {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .post-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .post-stats .actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .post-header .avatar {
        margin-right: 0;
    }
    
    .latest-list li a,
    .person-list li {
        padding-left: 0;
    }
    
    .latest-list li a::before {
        position: static;
        margin-right: 8px;
    }
}