/* ============================================================
   4-pages / member.css
   会员公开主页

   模板来源: page-member.php
   ============================================================ */

/* ============================================================
   搬自 forum.css 第 2048-2387 行 :: Member Profile Page
   ============================================================ */
/* ===== Member Profile Page ===== */
/* .member-profile-page 宽度由 container.css 接管（standard 1200px）
   如果希望保持 1000px，在 container.css 里把它单列一行即可 */
.member-profile-page {
    /* width handled by container.css */
}

.member-profile-layout {
    width: 100%;
}

.member-profile-header {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.member-profile-cover {
    height: 120px;
}

.member-profile-info {
    padding: 0 24px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

.member-avatar-wrapper {
    margin-top: -48px;
}

.member-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: white;
    border: 4px solid var(--bg-card);
}

.member-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.member-details {
    flex: 1;
    min-width: 200px;
}

.member-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.member-username {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.member-bio {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.member-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.member-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.member-meta-item svg {
    width: 14px;
    height: 14px;
}

.member-meta-item:hover {
    color: var(--color-primary);
}

.member-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.member-actions .btn {
    min-width: 100px;
}

.member-actions .btn.following {
    background: var(--bg-card);
    color: var(--text-primary);
}

.member-stats {
    display: flex;
    border-top: 1px solid var(--border-light);
}

.member-stat {
    flex: 1;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.member-stat:hover {
    background: var(--bg-hover);
}

.member-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.member-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Member Tabs */
.member-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 6px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.member-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    white-space: nowrap;
    transition: all 0.2s;
}


.member-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.member-tab.active {
    background: var(--color-primary);
    color: white;
}

/* Member Content */
.member-content {
    width: 100%;
}

.member-posts-list,
.member-comments-list,
.member-users-list {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
}

.member-post-item {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s;
}

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

.member-post-item:hover {
    background: var(--bg-hover);
}

.member-post-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.member-post-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.member-post-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    gap: 8px;
}

.member-comment-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

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

.member-comment-header {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.member-comment-header a {
    color: var(--color-primary);
    font-weight: 500;
}

.member-comment-content {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.member-comment-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

.member-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s;
}

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










/* ============================================================
   搬自 forum.css 第 3275-3463 行 :: Member Page Enhancements
   ============================================================ */
/* ========================================
   Member Page Enhancements
   ======================================== */

/* Member post thumbnail */
.member-post-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.member-post-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.member-post-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.member-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-post-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #9ca3af;
}

.member-post-thumb.placeholder svg {
    width: 32px;
    height: 32px;
}

[data-theme="dark"] .member-post-thumb.placeholder {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: #6b7280;
}

.member-post-content {
    flex: 1;
    min-width: 0;
}

.member-post-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.member-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Member tabs as buttons */
.member-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: none;
    padding: 0;
}

.member-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.member-tab:hover {
    background: var(--bg-hover);
    border-color: var(--text-tertiary);
}

.member-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.member-tab svg {
    width: 16px;
    height: 16px;
}

/* Share dropdown - pop up */
.share-dropdown-wrapper {
    position: relative;
}

.share-dropdown {
    animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-option:hover {
    background: var(--bg-hover);
}

/* Comment images grid - click to lightbox */
.comment-images-grid {
    cursor: pointer;
}

/* Following button states */
.btn.following {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.btn.following:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Mobile responsive for member page */
@media (max-width: 768px) {
    .member-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    
    .member-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .member-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .member-post-item {
        flex-direction: column;
    }
    
    .member-post-thumb {
        width: 100%;
        height: 160px;
    }
}



/* ============================================================
   交叉复制: forum.css 第 2402-2538 行 (Mobile Responsive Fixes)
   原本放在 forum-list.css，但其中 .post-article-* 和 .member-* 规则
   需要在 member 页面生效，故在此复制一份。
   ============================================================ */

.member-user-item:hover {
    background: var(--bg-hover);
}

.member-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.member-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.member-user-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.member-user-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.member-empty {
    padding: 48px 24px;
    text-align: center;
}

.member-empty svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.member-empty p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== New Post Page Enhancements ===== */
.compose-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-tertiary);
}

.compose-char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ===== Mobile Responsive Fixes ===== */
@media (max-width: 768px) {
    /* Mobile post title size optimization */
    .post-article-title {
        font-size: 20px !important;
        line-height: 1.3;
    }
    
    .member-profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .member-avatar-wrapper {
        margin-top: -60px;
    }
    
    .member-details {
        width: 100%;
    }
    
    .member-meta {
        justify-content: center;
    }
    
    .member-actions {
        justify-content: center;
        width: 100%;
    }
    
    .member-tabs {
        padding: 4px;
    }
    
    .member-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .member-tab svg {
        display: none;
    }
    
    .member-stat-value {
        font-size: 18px;
    }
    
    /* Forum post card title on mobile */
    .forum-post-title {
        font-size: 15px;
    }
    
    .forum-featured-title {
        font-size: 16px;
    }
}

/* .upload-preview-grid 由 3-components/upload-preview.css 管理，不在此重复 */
