/**
 * 微信朋友圈风格样式
 * Version: 2.0
 */

/* ========== 全局样式 ========== */
.moments-container {
    max-width: 100%;
    margin: 0 auto;
    background: #f0f0f0;
    min-height: 100vh;
}

/* ========== 封面区域 ========== */
.moments-header {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: #576b95;
}

.moments-header-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moments-header-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.moments-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.3s;
}

.moments-user-avatar:hover {
    transform: scale(1.05);
}

/* ========== 标签切换 ========== */
.moments-tabs {
    background: #fff;
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.moments-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    position: relative;
    color: #666;
    font-size: 15px;
    transition: color 0.3s;
}

.moments-tab.active {
    color: #576b95;
    font-weight: 500;
}

.moments-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #576b95;
    border-radius: 2px;
}

/* ========== 发布区域 ========== */
.moments-publish {
    background: #fff;
    padding: 15px;
    margin-bottom: 10px;
}

.moments-publish-textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px;
    font-size: 15px;
    resize: vertical;
    font-family: inherit;
}

.moments-publish-textarea:focus {
    outline: none;
    border-color: #576b95;
}

.moments-publish-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}

.moments-publish-left {
    display: flex;
    gap: 10px;
}

.moments-tool-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: background 0.3s;
}

.moments-tool-btn:hover {
    background: #e5e5e5;
}

.moments-tool-btn i {
    margin-right: 4px;
}

.moments-publish-btn {
    padding: 8px 24px;
    background: #576b95;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.moments-publish-btn:hover {
    background: #485a8c;
}

.moments-publish-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ========== 时间线列表 ========== */
.moments-timeline {
    background: #fff;
}

.moments-item {
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.3s;
}

.moments-item:hover {
    background: #fafafa;
}

.moments-item-header {
    display: flex;
    gap: 12px;
}

.moments-item-avatar {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.moments-item-content {
    flex: 1;
    min-width: 0;
}

.moments-item-username {
    font-size: 15px;
    font-weight: 500;
    color: #576b95;
    cursor: pointer;
    display: inline-block;
}

.moments-item-username:hover {
    text-decoration: underline;
}

.moments-item-message {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin: 8px 0;
    word-wrap: break-word;
}

.moments-item-location {
    font-size: 13px;
    color: #8590a6;
    margin: 5px 0;
}

.moments-item-location i {
    margin-right: 4px;
}

/* ========== 九宫格图片 ========== */
.moments-images {
    display: grid;
    gap: 6px;
    margin: 10px 0;
}

.moments-images.count-1 {
    grid-template-columns: repeat(1, 1fr);
    max-width: 250px;
}

.moments-images.count-2,
.moments-images.count-4 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 500px;
}

.moments-images.count-3,
.moments-images.count-5,
.moments-images.count-6,
.moments-images.count-7,
.moments-images.count-8,
.moments-images.count-9 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 500px;
}

.moments-image-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.moments-image-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.moments-image-item:hover img {
    transform: scale(1.05);
}

/* ========== 底部信息栏 ========== */
.moments-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    color: #8590a6;
}

.moments-item-time {
    flex: 1;
}

.moments-item-actions {
    display: flex;
    gap: 5px;
}

.moments-action-btn {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #8590a6;
    font-size: 13px;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.moments-action-btn:hover {
    color: #576b95;
}

.moments-action-btn i {
    font-size: 16px;
}

/* ========== 点赞和评论区域 ========== */
.moments-interactions {
    background: #f7f7f7;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
}

.moments-likes {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    font-size: 14px;
    padding: 5px 0;
}

.moments-likes-icon {
    color: #576b95;
    margin-right: 5px;
}

.moments-like-user {
    color: #576b95;
    cursor: pointer;
    display: inline;
}

.moments-like-user:hover {
    text-decoration: underline;
}

.moments-like-separator {
    color: #999;
    margin: 0 3px;
}

.moments-comments {
    border-top: 1px solid #e5e5e5;
    padding-top: 8px;
    margin-top: 8px;
}

.moments-comment-item {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.moments-comment-user {
    color: #576b95;
    font-weight: 500;
    cursor: pointer;
}

.moments-comment-user:hover {
    text-decoration: underline;
}

.moments-comment-reply {
    color: #576b95;
}

.moments-comment-content {
    color: #333;
}

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

.moments-comment-delete {
    color: #999;
    font-size: 12px;
    margin-left: 8px;
    cursor: pointer;
}

.moments-comment-delete:hover {
    color: #f56c6c;
}

/* ========== 评论输入框 ========== */
.moments-comment-input-wrapper {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
}

.moments-comment-input-wrapper.show {
    display: flex;
}

.moments-comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.moments-comment-input:focus {
    border-color: #576b95;
}

.moments-comment-send {
    margin-left: 10px;
    padding: 8px 20px;
    background: #576b95;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.moments-comment-send:hover {
    background: #485a8c;
}

/* ========== 可见性标签 ========== */
.moments-visibility-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 3px;
    margin-left: 8px;
}

.moments-visibility-badge.public {
    background: #e7f4e7;
    color: #52c41a;
}

.moments-visibility-badge.friends {
    background: #e6f7ff;
    color: #1890ff;
}

.moments-visibility-badge.private {
    background: #fff1f0;
    color: #f5222d;
}

/* ========== 加载更多 ========== */
.moments-loadmore {
    text-align: center;
    padding: 20px;
    background: #fff;
}

.moments-loadmore-btn {
    padding: 10px 30px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.moments-loadmore-btn:hover {
    background: #e5e5e5;
}

/* ========== 统计卡片 ========== */
.moments-stats {
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.moments-stats-item {
    text-align: center;
    flex: 1;
}

.moments-stats-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.moments-stats-label {
    font-size: 13px;
    color: #999;
}

/* ========== 空状态 ========== */
.moments-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: #fff;
}

.moments-empty-icon {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.moments-empty-text {
    font-size: 15px;
}

/* ========== 浮动发布按钮 ========== */
.moments-publish-fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #576b95;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(87, 107, 149, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
    text-decoration: none;
}

.moments-publish-fab:hover {
    background: #485a8c;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(87, 107, 149, 0.5);
    color: #fff;
}

.moments-publish-fab:active {
    transform: scale(0.95);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .moments-header {
        height: 200px;
    }
    
    .moments-publish-fab {
        bottom: 60px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .moments-user-avatar {
        width: 60px;
        height: 60px;
    }
    
    .moments-item {
        padding: 12px;
    }
    
    .moments-item-avatar {
        width: 40px;
        height: 40px;
    }
    
    .moments-images {
        gap: 4px;
    }
    
    .moments-images.count-1 {
        max-width: 200px;
    }
    
    .moments-images.count-2,
    .moments-images.count-4 {
        max-width: 400px;
    }
    
    .moments-images.count-3,
    .moments-images.count-5,
    .moments-images.count-6,
    .moments-images.count-7,
    .moments-images.count-8,
    .moments-images.count-9 {
        max-width: 400px;
    }
}

/* ========== 动画效果 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.moments-item {
    animation: fadeIn 0.5s ease;
}

/* ========== 图片预览大图 ========== */
.moments-image-preview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.moments-image-preview.show {
    display: flex;
}

.moments-image-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.moments-image-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

.moments-image-preview-close:hover {
    background: rgba(255,255,255,0.2);
}

