/* 顶部导航 */
.header {
    padding-top: 15px;
    display: flex;
    justify-content: right;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
#camera-btn{
    background-color: #4070ff;
    color: #fff;
    width: 105px;
    height: 40px;
    border-radius: 66px;
    border: #4070ff;
}
.logo {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* 发布区域 */
.post-area {
    background-color: #fff;
    margin: 12px;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.post-input-wrap {
    flex: 1;
}

#post-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background-color: #f5f5f5;
    border-radius: 24px;
    font-size: 15px;
    outline: none;
}

.post-tools {
    display: flex;
    gap: 24px;
    margin-top: 12px;
}

.tool-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #888;
}

.tool-btn:hover {
    color: #333;
}

/* 动态列表 */
.timeline {
    padding: 0 0px 0px;
}

.post-card {
    background-color: #fff;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.post-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

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

.post-username {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.post-time {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.post-menu {
    font-size: 18px;
    color: #999;
    cursor: pointer;
}

.post-content {
    padding: 0 16px 12px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.post-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 0 16px;
}

.post-image {
    width: 100%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.post-video {
    padding: 0 16px;
    position: relative;
}

.post-video video {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.post-stats {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
}

.action-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    color: #333;
}

/* 弹窗样式 */
.modal {
    display: none;
    padding: 20px;
}

#post-content {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    resize: none;
    outline: none;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.upload-item {
    aspect-ratio: 1;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.upload-item.add-more {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 32px;
    cursor: pointer;
}

.upload-item.add-more:hover {
    background-color: #e8e8e8;
}

.upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-item .remove-img {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-preview {
    margin-top: 16px;
}

.video-preview video {
    width: 100%;
    border-radius: 8px;
}

.remove-video {
    margin-top: 8px;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 20px;
    color: #666;
    cursor: pointer;
}

.modal-footer {
    padding: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
}

.cancel-btn {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    background-color: #fff;
    color: #666;
    font-size: 15px;
    cursor: pointer;
}

.post-btn {
    flex: 2;
    padding: 10px;
    border: none;
    border-radius: 24px;
    background-color: #1677ff;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.post-btn:hover {
    background-color: #4096ff;
}

/* 评论区 */
.comments-section {
    border-top: 1px solid #f0f0f0;
    padding: 12px 16px;
    display: none;
}

.comments-section.active {
    display: block;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.comment-item-head {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.comment-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-main {
    flex: 1;
}

.comment-content {
    font-size: 14px;
    display: inline-block;
    max-width: 100%;
}

.comment-username {
    font-weight: 600;
    color: #f07008;
    margin-right: 6px;
}

.comment-text {
    color: #333;
    word-break: break-all;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #999;
}

.comment-time {
    margin-right: auto;
}

.comment-actions {
    display: flex;
    gap: 16px;
}

.comment-action {
    cursor: pointer;
}

.comment-action:hover {
    color: #1677ff;
}

/* 二级评论 */
.sub-comments {
    padding-left: 60px;
    display: flex;
    flex-direction: column;
}

.sub-comment-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.sub-comment-avatar img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.sub-comment-main {
    flex: 1;
}

.sub-comment-content {
    font-size: 13px;
    display: inline-block;
    max-width: 100%;
}

.sub-comment-username {
    font-weight: 600;
    color: #f07008;
    margin-right: 4px;
}

.sub-comment-reply-to {
    color: #1677ff;
}

.sub-comment-text {
    color: #333;
    word-break: break-all;
}

.sub-comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 11px;
    color: #999;
}

/* 查看全部评论按钮 */
.view-all-comments {
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    color: #999;
    cursor: pointer;
}

.view-all-comments:hover {
    color: #1677ff;
}

/* 评论输入框 */
.comment-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.comment-input-wrap input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
}

.comment-input-wrap button {
    padding: 10px 20px;
    border: none;
    border-radius: 24px;
    background-color: #1677ff;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.comment-input-wrap button:hover {
    background-color: #4096ff;
}

/* 回复输入框 */
.reply-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 0;
}

.reply-input-wrap input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
}

.reply-input-wrap button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background-color: #1677ff;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.reply-input-wrap button:hover {
    background-color: #4096ff;
}

.reply-input-wrap .cancel-btn {
    background-color: #f0f0f0;
    color: #666;
}

.reply-input-wrap .cancel-btn:hover {
    background-color: #e0e0e0;
}

/* 图片预览 */
.image-preview-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.image-preview-modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
}

.image-preview-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-content img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
.view-line{
    height: 1px;
    background-color: #f0f0f0;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .post-images {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .upload-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}