/**
 * 用户帖子页面样式
 */

/* 基础样式 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 30px;
}

.content {
    flex: 1;
    min-width: 0; /* 防止flex子项溢出 */
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* 用户信息头部 */
.user-header {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-basic {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

.user-info h1.user-name {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.user-bio {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.user-stats {
    display: flex;
    gap: 20px;
}

.user-stats .stat-item {
    font-size: 14px;
    color: #666;
}

.user-stats .stat-item strong {
    color: #333;
    font-weight: 600;
}

.user-actions {
    display: flex;
    gap: 12px;
}

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

.btn-outline {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.btn-outline:hover {
    background: #f8f9fa;
    color: #333;
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* 标签页导航 */
.tabs-nav {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    overflow: hidden;
}

.tab-link {
    flex: 1;
    padding: 16px 20px;
    text-decoration: none;
    color: #666;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.tab-link:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-link.active {
    background: #f8f9fa;
    color: #007bff;
    border-bottom-color: #007bff;
}

/* 内容列表 */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 帖子项样式 */
.post-item {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.post-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.post-header {
    margin-bottom: 15px;
}

.post-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.post-title a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-title a:hover {
    color: #007bff;
}

.private-icon {
    color: #dc3545;
    font-size: 14px;
}

.post-meta, .reply-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.category-tag {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.meta-dot {
    color: #dee2e6;
}

.post-content, .reply-content {
    margin: 15px 0;
    line-height: 1.6;
    color: #444;
}

.post-stats, .reply-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #666;
}

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

.stat-item i {
    color: #999;
}

/* 回复项样式 */
.reply-item {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #007bff;
}

.reply-header {
    margin-bottom: 15px;
}

.reply-context {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.author-link, .post-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.author-link:hover, .post-link:hover {
    text-decoration: underline;
}

.view-context {
    color: #007bff;
    text-decoration: none;
    font-size: 13px;
}

.view-context:hover {
    text-decoration: underline;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #666;
}

.empty-state p {
    margin: 0 0 25px 0;
    color: #999;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0 15px 0;
}

.page-btn {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 36px;
    text-align: center;
}

.page-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.page-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-ellipsis {
    padding: 8px 4px;
    color: #999;
}

.pagination-info {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

/* 侧边栏样式 */
.sidebar-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar-box h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* 相关链接 */
.related-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.2s ease;
}

.related-link:hover {
    background: #f8f9fa;
    color: #333;
}

.related-link i {
    width: 16px;
    color: #999;
}

/* 页面说明 */
.page-help p {
    margin: 0 0 10px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
}

.page-help .note {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 10px;
    margin-top: 15px;
    font-size: 12px;
    color: #1976d2;
}

.page-help .note i {
    margin-right: 6px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        padding: 15px;
        gap: 20px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .user-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .user-basic {
        flex-direction: column;
        gap: 15px;
    }
    
    .user-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .user-actions {
        width: 100%;
        justify-content: center;
    }
    
    .tabs-nav {
        margin-bottom: 20px;
    }
    
    .tab-link {
        font-size: 14px;
        padding: 14px 16px;
    }
    
    .post-item, .reply-item {
        padding: 20px;
    }
    
    .post-title {
        font-size: 16px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .page-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 32px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 10px;
    }
    
    .user-header, .sidebar-box, .post-item, .reply-item {
        padding: 15px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
    }
    
    .user-name {
        font-size: 20px;
    }
    
    .user-stats {
        gap: 10px;
    }
    
    .user-stats .stat-item {
        font-size: 13px;
    }
    
    .tab-link {
        font-size: 13px;
        padding: 12px 14px;
        gap: 6px;
    }
    
    .post-title {
        font-size: 15px;
    }
    
    .post-content, .reply-content {
        font-size: 14px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* 移动端表格样式优化 */
    .post-stats, .reply-stats {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .stat-item {
        font-size: 12px;
    }
    
    /* 移动端回复内容优化 */
    .reply-context {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .post-link, .author-link {
        word-break: break-all;
    }
}

/* 为用户主页帖子链接添加样式 */
.stat-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.2s ease;
}

.stat-link:hover {
    transform: translateY(-1px);
    color: #007bff;
}

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

/* 项目项样式 */
.project-item {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.project-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.project-header {
    margin-bottom: 15px;
}

.project-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

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

.project-title a:hover {
    color: #007bff;
}

.tech-tag {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.project-content {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.project-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.project-time {
    font-size: 13px;
    color: #999;
}

/* 用户项样式 */
.user-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.user-avatar-container {
    flex-shrink: 0;
}

.user-avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.user-item .user-info {
    flex: 1;
    min-width: 0;
}

.user-item .user-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.user-item .user-name a {
    color: #333;
    text-decoration: none;
}

.user-item .user-name a:hover {
    color: #007bff;
}

.user-item .user-bio {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.user-stats {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.follow-time {
    font-size: 13px;
    color: #999;
}

.user-item .user-actions {
    flex-shrink: 0;
}

.user-item .btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .project-item, .user-item {
        padding: 20px;
    }
    
    .user-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 15px;
    }
    
    .user-item .user-info {
        flex: 1;
        min-width: 0;
        width: auto;
    }
    
    .user-item .user-bio {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .user-meta {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .user-item .user-actions {
        flex-shrink: 0;
        width: auto;
    }
    
    .user-item .btn {
        padding: 5px 10px;
        font-size: 12px;
        width: auto;
        justify-content: center;
        white-space: nowrap;
    }
}

/* 移动端标签页优化 */
.mobile-tabs {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.mobile-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.mobile-tabs .tab-link {
    flex: 1; /* 均匀分布 */
    min-width: 0; /* 允许收缩 */
    padding: 12px 8px;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    white-space: nowrap;
    text-align: center;
}

.mobile-tabs .tab-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.tab-count {
    font-size: 12px;
    font-weight: 600;
    color: inherit;
    line-height: 1;
}

/* 移动端用户卡片优化 */
@media (max-width: 768px) {
    .user-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 15px;
    }
    
    .user-item .user-info {
        flex: 1;
        min-width: 0;
    }
    
    .user-item .user-name {
        font-size: 15px;
        margin-bottom: 3px;
    }
    
    .user-item .user-bio {
        font-size: 13px;
        margin-bottom: 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .user-meta {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    .user-stats {
        font-size: 12px;
        white-space: nowrap;
    }
    
    .follow-time {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100px;
    }
    
    .user-item .user-actions {
        flex-shrink: 0;
        width: auto;
    }
    
    .user-item .btn {
        padding: 5px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .user-avatar-small {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .mobile-tabs .tab-link {
        min-width: 50px;
        padding: 10px 6px;
        font-size: 11px;
    }
    
    .tab-count {
        font-size: 10px;
    }
    
    .user-item {
        padding: 12px;
        gap: 10px;
    }
    
    .user-item .user-name {
        font-size: 14px;
    }
    
    .user-item .user-bio {
        font-size: 12px;
        max-width: 120px;
    }
    
    .user-stats {
        font-size: 11px;
    }
    
    .follow-time {
        font-size: 11px;
        max-width: 80px;
    }
    
    .user-item .btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .user-avatar-small {
        width: 40px;
        height: 40px;
    }
    
    /* 移动端标签页滚动指示器 */
    .tabs-nav::after {
        content: '';
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        background: linear-gradient(to left, rgba(255,255,255,0.8), transparent);
        pointer-events: none;
        border-radius: 0 8px 8px 0;
    }
    
    .tabs-nav {
        position: relative;
    }
}

/* 优化项目项的移动端显示 */
@media (max-width: 768px) {
    .project-item {
        padding: 18px;
    }
    
    .project-title {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .project-content {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .project-stats {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 13px;
    }
    
    .tech-tag {
        font-size: 11px;
        padding: 1px 6px;
    }
}

@media (max-width: 480px) {
    .project-item {
        padding: 15px;
    }
    
    .project-title {
        font-size: 15px;
    }
    
    .project-content {
        font-size: 13px;
    }
    
    .project-stats {
        font-size: 12px;
        gap: 8px;
    }
}

/* 增强移动端滚动体验 */
@media (max-width: 768px) {
    .content-list {
        gap: 15px;
    }
    
    .main-container {
        padding: 15px 10px;
        gap: 20px;
    }
    
    /* 移动端顶部导航栏更紧凑 */
    .user-header {
        padding: 18px;
        margin-bottom: 20px;
    }
    
    .user-basic {
        gap: 12px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
    }
    
    .user-info h1.user-name {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .user-bio {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .user-stats {
        gap: 12px;
    }
    
    .user-stats .stat-item {
        font-size: 13px;
    }
}

/* 回复项移动端优化 */
@media (max-width: 768px) {
    .reply-item {
        padding: 18px;
        border-left-width: 3px;
    }
    
    .reply-context {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .reply-content {
        font-size: 14px;
        margin: 12px 0;
    }
    
    .reply-stats {
        flex-direction: row;
        gap: 15px;
        align-items: center;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .reply-item {
        padding: 15px;
    }
    
    .reply-context {
        font-size: 12px;
    }
    
    .reply-content {
        font-size: 13px;
        margin: 10px 0;
    }
    
    .reply-stats {
        gap: 10px;
        font-size: 11px;
    }
}

/* 通知样式移动端适配 */
@media (max-width: 768px) {
    .notification {
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        top: 10px !important;
    }
}

/* 返回顶部按钮移动端优化 */
@media (max-width: 768px) {
    .scroll-top-btn {
        width: 45px !important;
        height: 45px !important;
        bottom: 20px !important;
        right: 20px !important;
        font-size: 16px !important;
    }
} 