/* =========================================
   朋友圈样式 - 扁平化设计
   ========================================= */

.moments-header {
    position: relative;
    height: 300px;
}

.moments-cover {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-chat);
    position: relative;
}

.change-cover-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.change-cover-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.moments-user-info {
    position: absolute;
    bottom: 0;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transform: translateY(50%);
}

.moments-avatar {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    border: 2px solid white;
    object-fit: cover;
    margin-bottom: 8px;
}

.moments-nickname {
    color: white;
    font-size: 16px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
}

.moments-list {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-tertiary);
}

.moment-item {
    background: var(--bg-secondary);
    border: none;
    /* 分隔线：原为硬编码 #e5e5e5，深色模式下不跟随主题 */
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: 18px 15px;
    margin-bottom: 0;
    box-shadow: none;
}

.moment-item:hover {
    /* 原为硬编码 #fafafa，比日间底色 #ededed 更亮，
       悬停时几乎看不出变化（等于没有交互反馈），改用主题悬停色 */
    background: var(--list-item-hover);
}

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

.moment-user {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.moment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 12px;
    object-fit: cover;
    /* 主题底色：默认头像为白底图，深色模式下会是刺眼白块 */
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

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

.moment-nickname {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.moment-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.moment-content-wrapper {
    margin-left: 52px;
}

.moment-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
    word-wrap: break-word;
    color: var(--text-primary);
    padding: 2px 0;
}

.moment-images {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.moment-images.grid-1 {
    grid-template-columns: 1fr;
}

.moment-images.grid-2,
.moment-images.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.moment-images.grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

.moment-images.grid-5,
.moment-images.grid-6,
.moment-images.grid-7,
.moment-images.grid-8,
.moment-images.grid-9 {
    grid-template-columns: repeat(3, 1fr);
}

.moment-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    background: var(--bg-chat);
    border: 1px solid var(--border-color);
}

.moment-location {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.moment-interactions {
    background: var(--bg-tertiary);
    border-radius: 0;
    padding: 10px 12px;
    margin-top: 12px;
}

.moment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 10px;
}

.moment-action-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.moment-action-btn:hover {
    color: var(--text-primary);
}

.moment-likes {
    background: var(--bg-secondary);
    padding: 8px 12px;
    border-radius: 0;
    margin-bottom: 6px;
    font-size: 14px;
    border-left: 2px solid #07c160;
}

.like-icon {
    margin-right: 5px;
    color: #07c160;
}

.like-users {
    color: var(--text-primary);
}

.moment-comments {
    background: var(--bg-secondary);
    padding: 8px 12px;
    border-radius: 0;
}

.moment-comment {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.6;
}

.moment-comment:last-child {
    margin-bottom: 0;
}

.comment-user {
    color: #576b95;
    font-weight: 600;
}

.comment-reply {
    color: var(--text-tertiary);
}

.comment-content {
    color: var(--text-primary);
}

/* 移除更换背景按钮 */
.change-cover-btn {
    display: none;
}

/* 发布按钮扁平化 */
.publish-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 4px;
    background: #07c160;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: none;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.publish-btn:hover {
    background: #06ad56;
}

.publish-btn:active {
    background: #059848;
}

@media (max-width: 768px) {
    .publish-btn {
        bottom: 80px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--text-tertiary);
}

/* 扁平化动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 发布朋友圈弹窗样式 */
.publish-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 120px;
    box-sizing: border-box;
}

.publish-textarea:focus {
    outline: none;
    border-color: #07c160;
}

.publish-images-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.preview-image-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-chat);
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ff3b30;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-image-btn:hover {
    transform: scale(1.1);
}

.publish-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.action-btn-label {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.action-btn-label:hover {
    background: var(--bg-tertiary);
    border-color: #07c160;
    color: #07c160;
}

.publish-location-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.publish-location-display i {
    margin-right: 8px;
    color: #07c160;
}

.remove-location-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    transition: color 0.2s;
}

.remove-location-btn:hover {
    color: #ff3b30;
}

/* 评论可点击样式 */
.moment-comment {
    cursor: pointer;
    transition: background 0.2s;
    padding: 4px 0;
    border-radius: 2px;
}

.moment-comment:hover {
    background: rgba(7, 193, 96, 0.1);
}

