/* 朋友圈基础样式 */
.circle-item {
    background: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}
.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    margin-right: 10px;
}
.username {
    font-size: 16px;
    font-weight: bold;
}
.content-text {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* 图片九宫格 */
.img-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.img-item {
    width: 31%;
    aspect-ratio: 1/1;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}
.img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 点赞评论栏 */
.action-bar {
    display: flex;
    padding: 8px 0;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}
.like-btn, .comment-btn {
    display: flex;
    align-items: center;
    margin-right: 25px;
    cursor: pointer;
}
.like-active {
    color: #e54d42;
}

/* 评论区域 */
.comment-section {
    margin-top: 10px;
    background: #f7f7f7;
    padding: 10px;
    border-radius: 6px;
    display: none;
}
.comment-item {
    padding: 6px 0;
    font-size: 14px;
    justify-content: space-between;
}
.comment-user {
    color: #576b95;
    font-weight: bold;
}
.delete-btn {
    color: #999;
    cursor: pointer;
    font-size: 12px;
}
.load-more {
    text-align: center;
    color: #576b95;
    cursor: pointer;
    font-size: 14px;
    margin: 5px 0;
}

/* 评论删除按钮样式 */
.comment-item {
  position: relative;
  padding-bottom: 8px;
}
.del-box {
  right: 0;
  bottom: -20px;
  font-size: 12px;
  color: #999;
  cursor: pointer;
  line-height: 20px;
}
.del-box:hover {
  color: #ff4d4f;
}

/* 评论输入框 + 发布按钮 */
.comment-input-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}
.comment-submit {
    padding: 0 16px;
    background: #007AFF;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}
.comment-submit:active {
    background: #0062cc;
}

/* 图片全屏预览 */
.img-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.preview-img {
    max-width: 90%;
    max-height: 90%;
    position: absolute; /* 脱离文档流 */
    top: 50%;            /* 向上偏移50% */
    left: 50%;           /* 向左偏移50% */
    transform: translate(-50%, -50%);
    z-index: -1;
}
.preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}
.preview-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
}
.prev { left: 20px; }
.next { right: 20px; }
#publish-comment-btn {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 60px;
    width: 75%;
    height: 40px;
    line-height: 40px;
    background: #2979ff;
    color: #fff;
    text-align: center;
    border-radius: 20px;
    font-size: 16px;
    z-index: 999;
    cursor: pointer;
}
.avatar img{
    width: 40px;
    height: 40px;
    border-radius: 40px;
}