/**
 * 微社区样式文件
 */

/* 基础样式 */
body {
    background-color: #f5f5f5;
    min-height: 100vh;
}

main {
    min-height: calc(100vh - 200px);
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-title a {
    color: #333;
    text-decoration: none;
}

.card-title a:hover {
    color: #0d6efd;
}

/* 帖子列表样式 */
.post-item {
    padding: 15px;
}

.post-item .post-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.post-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.post-item .post-info {
    flex: 1;
}

.post-item .username {
    font-weight: 600;
    color: #333;
}

.post-item .time {
    font-size: 12px;
    color: #999;
}

.post-item .post-content {
    margin: 10px 0;
    color: #555;
    line-height: 1.6;
}

.post-item .post-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.post-item .post-images img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.post-item .post-footer {
    display: flex;
    gap: 20px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.post-item .post-footer a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.post-item .post-footer a:hover {
    color: #0d6efd;
}

.post-item .post-footer i {
    margin-right: 4px;
}

/* 圈子样式 */
.circle-card {
    text-align: center;
    padding: 20px;
}

.circle-card .circle-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.circle-card .circle-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.circle-card .circle-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.circle-card .circle-meta {
    font-size: 12px;
    color: #999;
}

/* 侧边栏样式 */
.sidebar-card .card-header {
    background-color: #fff;
    border-bottom: 2px solid #0d6efd;
    font-weight: 600;
}

.user-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.user-list li:last-child {
    border-bottom: none;
}

.user-list .rank {
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #f0f0f0;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 12px;
    font-weight: 600;
}

.user-list li:nth-child(1) .rank {
    background-color: #ffd700;
    color: #fff;
}

.user-list li:nth-child(2) .rank {
    background-color: #c0c0c0;
    color: #fff;
}

.user-list li:nth-child(3) .rank {
    background-color: #cd7f32;
    color: #fff;
}

.user-list .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-list .user-info {
    flex: 1;
}

.user-list .nickname {
    font-weight: 500;
    color: #333;
}

.user-list .score {
    font-size: 12px;
    color: #999;
}

/* 评论样式 */
.comment-list {
    margin-top: 20px;
}

.comment-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}

.comment-item .comment-body {
    flex: 1;
}

.comment-item .comment-header {
    margin-bottom: 5px;
}

.comment-item .username {
    font-weight: 600;
    color: #333;
}

.comment-item .time {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

.comment-item .comment-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 5px;
}

.comment-item .comment-actions {
    font-size: 12px;
}

.comment-item .comment-actions a {
    color: #999;
    margin-right: 15px;
    text-decoration: none;
}

.comment-item .comment-actions a:hover {
    color: #0d6efd;
}

.comment-item .reply-list {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.comment-item .reply-item {
    padding: 5px 0;
    font-size: 14px;
}

/* 个人主页样式 */
.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px 0;
    margin-bottom: 30px;
    border-radius: 10px;
}

.profile-header .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #fff;
    margin-bottom: 15px;
}

.profile-header .username {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-header .signature {
    opacity: 0.9;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.profile-stats .stat-item {
    text-align: center;
}

.profile-stats .stat-value {
    font-size: 24px;
    font-weight: 600;
}

.profile-stats .stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* 表单样式 */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

/* 徽章样式 */
.badge-circle {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
}

/* 富文本编辑器 */
.editor-toolbar {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    padding: 8px;
    border-radius: 4px 4px 0 0;
}

.editor-toolbar button {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    color: #666;
}

.editor-toolbar button:hover {
    color: #0d6efd;
    background-color: #e9ecef;
    border-radius: 4px;
}

.editor-content {
    min-height: 200px;
    border: 1px solid #dee2e6;
    border-radius: 0 0 4px 4px;
    padding: 15px;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .post-item .post-images img {
        width: 80px;
        height: 80px;
    }
    
    .profile-header {
        padding: 20px 0;
    }
    
    .profile-header .avatar {
        width: 70px;
        height: 70px;
    }
    
    .profile-stats {
        gap: 20px;
    }
}
