
/* 评论留言框架样式 */
.WapCommentBox {
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px var(--shadow-light);
}

/* 发表评论区域 */
.PostCommentBox1 {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
}

.PostCommentBox1 ol {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    position: relative;
}

.PostCommentBox1 ol i {
    position: absolute;
    left: 15px;
    top: 15px;
    color: var(--primary-color);
    font-size: 18px;
}

.PostCommentBox1 textarea.pinglun {
    width: 100%;
    min-height: 100px;
    padding: 15px 15px 15px 45px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s;
    background-color: var(--neutral-light);
    font-family: inherit;
}

.PostCommentBox1 textarea.pinglun:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}

.PostCommentBox1 li {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.PostCommentBox1 button {
    padding: 8px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.PostCommentBox1 button:hover {
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
    transform: translateY(-1px);
}

/* 评论头部 */
.WapCommentBox .head {
    margin-bottom: 20px;
}

.WapCommentBox .tag {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* 评论列表 */
.ListComment {
    margin-bottom: 20px;
}

.ListComment ul.lists {
    margin: 0;
    padding: 20px 0;
    list-style: none;
    display: flex;
    border-bottom: 1px dashed var(--border-color);
}

.ListComment ul.lists:last-child {
    border-bottom: none;
}

.ListComment ol.icon {
    margin: 0;
    padding: 0;
    margin-right: 15px;
    flex-shrink: 0;
}

.ListComment ol.icon a {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

.ListComment ol.icon a:hover {
    border-color: var(--primary-color);
}

.ListComment ol.icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ListComment li.infos {
    flex: 1;
}

.ListComment .name {
    margin-bottom: 8px;
}

.ListComment .name a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s;
}

.ListComment .name a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.ListComment .comment {
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--text-color);
    word-break: break-word;
}

.ListComment dl {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.ListComment dt {
    color: var(--neutral-gray);
    font-size: 13px;
}

.ListComment dd {
    margin: 0;
    display: flex;
    gap: 15px;
}

.ListComment dd span {
    display: flex;
    align-items: center;
    color: var(--neutral-gray);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 3px;
}

.ListComment dd span:hover {
    color: var(--primary-color);
    background-color: rgba(139, 69, 19, 0.05);
}

.ListComment dd span i {
    margin-right: 5px;
}

.ListComment me {
    margin-left: 3px;
    font-weight: bold;
}

/* 回复区域 - 修复版 */
.repalyinfs {
    margin-top: 15px;
}

/* 隐藏空回复区域 */
.repalyinfs:empty {
    display: none !important;
}

/* 单条回复样式 */
.reply-item {
    padding: 12px 15px;
    background-color: var(--neutral-light);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 8px;
    position: relative;
}

.reply-item:last-child {
    margin-bottom: 0;
}

.reply-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.reply-item a:hover {
    text-decoration: underline;
}

.reply-item .reply-content {
    color: var(--text-color);
    line-height: 1.6;
    word-break: break-word;
    font-size: 14px;
}

/* 加载更多评论按钮 */
.ShowMoreComment {
    text-align: center;
    margin-top: 20px;
}

.ShowMoreComment button {
    padding: 10px 25px;
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ShowMoreComment button:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

/* 重命名评论弹窗样式 - 避免冲突 */
.comment-popup-layer {
    position: fixed;
    background: white;
    border-radius: 6px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 19891015;
    overflow: hidden;
    font-family: "Microsoft Yahei", "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
    min-width: 280px;
    max-width: 400px;
}

.comment-popup-page {
    width: 320px !important;
}

.comment-popup-anim {
    animation: commentPopupFadeIn 0.2s ease-out;
}

@keyframes commentPopupFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 弹窗标题栏 */
.comment-popup-title {
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-size: 14px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: move;
    user-select: none;
    position: relative;
}

/* 弹窗内容区域 */
.comment-popup-content {
    padding: 15px;
    background: white;
    color: var(--text-color);
    max-height: 60vh;
    overflow-y: auto;
}

/* 弹窗内的评论输入区域 */
.CommentPopupBox {
    margin: 0;
    padding: 0;
    list-style: none;
}

.CommentPopupBox ol {
    margin: 0;
    padding: 0;
    margin-bottom: 10px;
}

.CommentPopupBox textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
    transition: all 0.2s;
    background-color: var(--neutral-light);
    font-family: inherit;
    box-sizing: border-box;
}

.CommentPopupBox textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}

.CommentPopupBox textarea::placeholder {
    color: var(--neutral-gray);
    font-size: 13px;
}

.CommentPopupBox li {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.CommentPopupBox li em {
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
    transition: all 0.2s;
}

.CommentPopupBox li em:hover {
    background-color: rgba(139, 69, 19, 0.1);
}

.CommentPopupBox li em img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.CommentPopupBox li button {
    padding: 6px 15px;
    border: 1px solid;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.CommentPopupBox li button:first-of-type {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: var(--primary-color);
}

.CommentPopupBox li button:first-of-type:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.CommentPopupBox li button:last-of-type {
    background: white;
    color: var(--neutral-gray);
    border-color: var(--border-color);
}

.CommentPopupBox li button:last-of-type:hover {
    background: var(--neutral-light);
    color: var(--text-color);
    border-color: var(--neutral-gray);
}

/* 弹窗按钮区域 */
.comment-popup-btns {
    padding: 10px 15px;
    background: var(--neutral-light);
    border-top: 1px solid var(--border-color);
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.comment-popup-btns a {
    display: inline-block;
    padding: 6px 15px;
    border: 1px solid;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

.comment-popup-confirm {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: var(--primary-color) !important;
}

.comment-popup-confirm:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    transform: translateY(-1px);
}

.comment-popup-cancel {
    background: white;
    color: var(--neutral-gray);
    border-color: var(--border-color);
}

.comment-popup-cancel:hover {
    background: var(--neutral-light);
    color: var(--text-color);
    border-color: var(--neutral-gray);
}

/* 修复关闭按钮 */
.comment-popup-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
}

.comment-popup-close:before {
    content: "×";
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
}

.comment-popup-close:hover:before {
    color: white;
    transform: scale(1.2);
}

/* 确保关闭按钮可点击区域 */
.comment-popup-close a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* 调整大小手柄 - 隐藏 */
.comment-popup-resize {
    display: none;
}

/* 弹窗遮罩层 */
.comment-popup-shade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 19891014;
}

/* 弹窗关闭动画 */
.comment-popup-close-anim {
    animation: commentPopupFadeOut 0.15s ease-in forwards;
}

@keyframes commentPopupFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}
.PostCommentBox textarea {
    width: 90%;
    padding: 2%;
    height: 110px;
    margin: 10px auto;
}
/* 移动端适配 */
@media (max-width: 768px) {
    .WapCommentBox {
        padding: 15px;
        margin: 15px 0;
    }
    
    .PostCommentBox1 textarea.pinglun {
        min-height: 80px;
        padding: 12px 12px 12px 40px;
    }
    
    .PostCommentBox1 ol i {
        left: 12px;
        top: 12px;
    }
    
    .ListComment ul.lists {
        flex-direction: column;
        padding: 15px 0;
    }
    
    .ListComment ol.icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .ListComment ol.icon a {
        width: 40px;
        height: 40px;
    }
    
    .ListComment dl {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ListComment dd {
        gap: 10px;
    }
    
    .PostCommentBox1 button {
        width: 100%;
    }
    
    .repalyinfs {
        margin-top: 12px;
    }
    
    .reply-item {
        padding: 10px 12px;
        margin-bottom: 6px;
    }
    
    .ShowMoreComment button {
        width: 100%;
        padding: 12px;
    }
    
    /* 弹窗在移动端的优化 */
    .comment-popup-page {
        width: 90vw !important;
        max-width: 300px !important;
        left: 5vw !important;
        right: 5vw !important;
    }
    
    .comment-popup-content {
        padding: 12px;
    }
    
    .comment-popup-title {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .comment-popup-btns {
        padding: 8px 12px;
    }
    
    .comment-popup-btns a {
        padding: 5px 12px;
        font-size: 11px;
        min-width: 45px;
    }
    
    .CommentPopupBox textarea {
        min-height: 70px;
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .CommentPopupBox li {
        justify-content: center;
    }
    
    .CommentPopupBox li button {
        flex: 1;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .WapCommentBox {
        padding: 12px;
    }
    
    .ListComment .name a {
        font-size: 14px;
    }
    
    .ListComment .comment {
        font-size: 13px;
    }
    
    .ListComment dd {
        gap: 8px;
    }
    
    .repalyinfs {
        margin-top: 10px;
    }
    
    .reply-item {
        padding: 8px 10px;
    }
    
    .reply-item a {
        font-size: 12px;
    }
    
    .reply-item .reply-content {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* 确保弹窗在移动端居中 */
@media (max-width: 480px) {
    .comment-popup-layer {
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
    }
}