/* 用户信息卡片 */
.user-profile-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.profile-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.profile-info {
    flex: 1;
}

.user-profile-name {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* 用户称号样式 - 小色块样式：背景色+白字 */
.user-profile-name .user-title {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px !important;
    line-height: 14px !important;
    font-weight: 500;
    margin-left: 0;
    vertical-align: middle;
    transition: all 0.2s ease;
    border: none;
    color: white;
    height: auto !important;
    box-sizing: border-box;
    text-align: center;
}

/* 默认称号颜色 - 小色块配色 */
.user-profile-name .user-title.default {
    background: #8590a6;
    color: white;
}

/* 称号悬停效果 */
.user-profile-name .user-title:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.profile-bio {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.profile-meta {
    display: flex;
    gap: 15px;
    color: #8590a6;
    font-size: 13px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
}

.stat-label {
    font-size: 13px;
    color: #8590a6;
}

/* 操作按钮样式 */
.profile-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.follow-btn {
    background: #007bff;
    color: white;
}

.follow-btn:hover {
    background: #0056b3;
}

.follow-btn.following {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.follow-btn.following:hover {
    background: #d6f7ff;
    color: #40a9ff;
}

.message-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.message-btn:hover {
    background: #e9ecef;
    color: #495057;
}

/* 内容区块通用样式 */
.section-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1a1a1a;
}

.view-all {
    color: #8590a6;
    font-size: 14px;
    text-decoration: none;
}

/* 项目列表 */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.project-item:hover {
    border-color: #ddd;
    background: #fafafa;
}

.project-info h3 {
    margin: 0 0 8px 0;
}

.project-info h3 a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 16px;
}

.project-info h3 a:hover {
    color: #0066ff;
}

.project-info p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    gap: 16px;
    color: #666;
    font-size: 13px;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-meta span i.fa-star {
    font-size: 14px;
    color: #8590a6;
}

.project-meta span:hover i.fa-star {
    color: #f1c40f;
}

.project-meta span.starred i.fa-star {
    color: #f1c40f;
}

/* 无项目状态 */
.no-projects,
.no-activities {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-projects-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.no-projects p,
.no-activities p {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.create-project-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}

.create-project-btn:hover {
    background: #0056b3;
}

/* 动态列表 */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #fafafa;
    border-radius: 6px;
    margin: 0 -6px;
    padding: 12px 6px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f8f9fa;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 14px;
    color: #6c757d;
}

.activity-icon i {
    font-size: 12px;
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: #1a1a1a;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.5;
}

.activity-text a {
    color: #2c3e50;
    text-decoration: none;
}

.activity-text a:hover {
    color: #007bff;
    text-decoration: underline;
}

.activity-time {
    color: #8590a6;
    font-size: 12px;
}

/* 侧边栏样式 */
.sidebar {
    align-self: start;
}

.sidebar-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 15px;
}

.sidebar-box h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #1a1a1a;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* 成就系统 */
.achievements {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 成就项目样式 - 参考个人链接的简洁风格 */
.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.achievement-item:last-child {
    border-bottom: none;
}

.achievement-item i {
    width: 16px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.achievement-label {
    flex: 1;
    color: #666;
    font-size: 13px;
}

.achievement-value {
    color: #1a1a1a;
    font-weight: 500;
    font-size: 13px;
}

/* 社交链接 */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #6c757d;
    font-size: 16px;
    border: 1px solid #e9ecef;
}

.social-link:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #dee2e6;
}

/* 未设置的社交链接样式 */
.social-link.unset {
    opacity: 0.5;
    cursor: help;
}

.social-link.unset:hover {
    background: #f8f9fa;
    transform: none;
    box-shadow: none;
    border-color: #e9ecef;
}

/* 不同社交平台的个性化颜色 */
.social-link.github:hover {
    background: #24292e;
    color: white;
    border-color: #24292e;
}

.social-link.twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.social-link.哔哩哔哩:hover {
    background: #fb7299;
    color: white;
    border-color: #fb7299;
}

.social-link.个人网站:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.social-link.youtube:hover {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
}

.social-link.rss订阅:hover {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
}

/* 技能标签 */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    border-radius: 5%;
    transition: all 0.2s ease;
    font-weight: 500;
}

.skill-tag:hover {
    background: #e0e0e0;
    color: #333;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .user-profile-card {
        margin: 0;
        border-radius: 0;
        padding: 15px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        align-items: center;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        margin: 0 auto;
    }
    
    .profile-info {
        text-align: center;
        width: 100%;
    }
    
    .user-profile-name {
        font-size: 20px;
        gap: 6px;
        justify-content: center;
    }
    
    /* 移动端称号样式调整 */
    .user-profile-name .user-title {
        font-size: 11px !important;
        padding: 2px 5px !important;
        line-height: 12px !important;
        height: auto !important;
    }
    
    .profile-bio {
        font-size: 13px;
    }

    .profile-meta {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
    }

    .profile-actions {
        justify-content: center;
        gap: 8px;
        width: 100%;
        margin-top: 10px;
    }

    .action-btn {
        font-size: 13px;
        padding: 6px 12px;
        min-width: 80px;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 15px;
    }
    
    .stat-item {
        padding: 8px;
        background: #f8f9fa;
        border-radius: 6px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .section-box {
        margin: 10px 0;
        border-radius: 0;
        padding: 15px;
    }
    
    .section-header h2 {
        font-size: 16px;
    }
    
    .sidebar {
        margin-top: 15px;
    }
    
    .sidebar-box {
        margin-bottom: 15px;
        border-radius: 0;
        padding: 12px;
    }
    
    .project-item {
        padding: 12px;
    }
    
    .project-info h3 a {
        font-size: 15px;
    }
    
    .project-info p {
        font-size: 13px;
    }
    
    .project-meta {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
    }
    
    .activity-item {
        padding: 10px 0;
    }
    
    .activity-icon {
        font-size: 16px;
        width: 20px;
    }
    
    .activity-text {
        font-size: 13px;
    }
    
    .activity-time {
        font-size: 11px;
    }
    
    .social-links {
        justify-content: flex-start;
        gap: 8px;
        padding: 6px 0;
        flex-wrap: wrap;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-radius: 6px;
    }
    
    .social-link img {
        width: 14px;
        height: 14px;
    }
    
    .coins {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .coin-item {
        padding: 6px;
    }
    
    .coin-value {
        font-size: 11px;
    }
    
    .coin-label {
        font-size: 9px;
    }
    
    .skill-tags {
        gap: 6px;
        justify-content: flex-start;
    }
    
    .skill-tag {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 5%;
        margin-bottom: 4px;
    }
    
    .no-projects-icon svg,
    .no-activities svg {
        width: 80px;
        height: 80px;
    }
    
    .create-project-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* 更小屏幕的额外优化 */
@media screen and (max-width: 480px) {
    .user-profile-card {
        padding: 12px;
    }
    
    .profile-header {
        gap: 12px;
    }
    
    .profile-avatar {
        width: 50px;
        height: 50px;
    }
    
    .user-profile-name {
        font-size: 18px;
        gap: 4px;
        justify-content: center;
    }
    
    /* 小屏幕称号样式调整 */
    .user-profile-name .user-title {
        font-size: 10px !important;
        padding: 1px 4px !important;
        line-height: 10px !important;
        height: auto !important;
    }
    
    .profile-actions {
        gap: 6px;
    }
    
    .action-btn {
        font-size: 12px;
    padding: 5px 10px;
        min-width: 70px;
    }
    
    .profile-stats {
        gap: 8px;
}

    .stat-value {
        font-size: 14px;
}

    .section-box {
        padding: 12px;
}

    .sidebar-box {
        padding: 10px;
    }
}

/* 统计链接样式 - 修复 */
.stat-item.stat-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 5px;
}

.stat-item.stat-link:hover {
    transform: translateY(-2px);
    background: rgba(0, 123, 255, 0.05);
}

.stat-item.stat-link:hover .stat-value {
    color: #007bff;
    transform: scale(1.05);
}

.stat-item.stat-link:hover .stat-label {
    color: #007bff;
}