/* 评论交流区域样式 */
.WapCommentBox {
margin: 40px 0;
background: linear-gradient(135deg, #fffaf0 0%, #fef9f3 100%);
border-radius: 12px;
border: 1px solid #e8d9c5;
box-shadow: 0 4px 20px rgba(139, 69, 19, 0.08);
overflow: hidden;
font-family: "Microsoft YaHei", "SimSun", sans-serif;
}

/* 评论头部 */
.WapCommentBox .head {
display: flex;
justify-content: space-between;
align-items: center;
padding: 25px 30px;
background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
color: white;
}

.WapCommentBox .head .tag {
font-size: 20px;
font-weight: bold;
color: #FFD700;
text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.WapCommentBox .head .more button {
background: rgba(255, 255, 255, 0.2);
color: white;
border: 1px solid rgba(255, 215, 0, 0.5);
padding: 10px 20px;
border-radius: 25px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
}

.WapCommentBox .head .more button:hover {
background: rgba(255, 215, 0, 0.3);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* 评论列表 */
.ListComment {
padding: 0 30px;
}

.lists {
display: flex;
padding: 25px 0;
border-bottom: 1px solid #e8d9c5;
position: relative;
}

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

.lists::before {
content: '';
position: absolute;
left: -10px;
top: 50%;
transform: translateY(-50%);
width: 4px;
height: 0;
background: linear-gradient(to bottom, #8B4513, #A0522D);
border-radius: 2px;
transition: height 0.3s ease;
}

.lists:hover::before {
height: 60px;
}

/* 用户头像 */
.lists .icon {
flex-shrink: 0;
margin-right: 20px;
position: relative;
}
.lists .icon img {
width: 50px;
height: 50px;
border-radius: 50%;
object-fit: cover;
position: relative;
z-index: 2;
border: 2px solid white;
box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

/* 评论内容区域 */
.lists .infos {
flex: 1;
list-style: none;
}

.lists .name {
margin-bottom: 12px;
}

.lists .name b {
color: #8B4513;
font-size: 16px;
font-weight: bold;
background: linear-gradient(135deg, #8B4513, #A0522D);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 1px 2px rgba(139, 69, 19, 0.1);
}

.lists .comment {
color: #5a4a3a;
line-height: 1.7;
margin-bottom: 15px;
font-size: 15px;
background: rgba(255, 253, 248, 0.8);
padding: 15px;
border-radius: 8px;
border-left: 3px solid #A0522D;
box-shadow: 0 2px 8px rgba(139, 69, 19, 0.05);
}

/* 评论操作栏 */
.lists dl {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}

.lists dt {
color: #a08c7a;
font-size: 13px;
font-style: italic;
}

.lists dd {
display: flex;
gap: 20px;
}

.lists dd span {
color: #8B4513;
font-size: 13px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: 15px;
background: rgba(139, 69, 19, 0.08);
}

.lists dd span:hover {
background: rgba(139, 69, 19, 0.15);
color: #A0522D;
transform: translateY(-1px);
}

/* 关键修复：当有回复内容时显示 */
.repalyinfs:not(:empty) {
display: block;
animation: fadeInUp 0.4s ease-out;
}

/* 备用方案：通过PHP添加has-replies类 */
.repalyinfs.has-replies {
display: block !important;
}

.repalyinfs div {
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px dashed #ced4da;
position: relative;
}

.repalyinfs div:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}

.repalyinfs div::before {
content: '↳';
position: absolute;
left: -15px;
top: 0;
color: #6c757d;
font-size: 16px;
font-weight: bold;
}

.repalyinfs a {
color: #495057;
font-weight: 600;
font-size: 14px;
text-decoration: none;
transition: color 0.3s ease;
}

.repalyinfs a:hover {
color: #0056b3;
text-decoration: underline;
}

.repalyinfs dd {
color: #6c757d;
line-height: 1.6;
margin: 8px 0 0 0;
padding: 12px 15px;
background: rgba(255, 255, 255, 0.8);
border-radius: 8px;
border-left: 3px solid #adb5bd;
font-size: 14px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* 发表评论区域 */
.PostCommentBox,
.PostCommentBox1 {
padding: 30px;
background: linear-gradient(135deg, #fefcf8 0%, #fdfaf5 100%);
border-bottom: 1px solid #e8d9c5;
position: relative;
}

.PostCommentBox ol,
.PostCommentBox1 ol {
margin-bottom: 20px;
position: relative;
}

.PostCommentBox textarea,
.PostCommentBox1 textarea {
width: 100%;
min-height: 120px;
padding: 20px 20px 20px 50px;
border: 2px solid #e8d9c5;
border-radius: 12px;
resize: vertical;
font-size: 15px;
line-height: 1.6;
font-family: inherit;
background: rgba(255, 255, 255, 0.9);
transition: all 0.3s ease;
color: #5a4a3a;
}

.PostCommentBox textarea:focus,
.PostCommentBox1 textarea:focus {
outline: none;
border-color: #A0522D;
box-shadow: 0 0 0 3px rgba(160, 82, 45, 0.1);
background: white;
}

.PostCommentBox1 .fa-edit {
position: absolute;
left: 20px;
top: 20px;
color: #A0522D;
font-size: 18px;
}

.PostCommentBox li,
.PostCommentBox1 li {
display: flex;
gap: 15px;
justify-content: flex-end;
}

.PostCommentBox button,
.PostCommentBox1 button {
background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
color: white;
border: none;
padding: 12px 30px;
border-radius: 25px;
cursor: pointer;
font-size: 15px;
font-weight: bold;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.PostCommentBox button:hover,
.PostCommentBox1 button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.PostCommentBox button:last-child,
.PostCommentBox1 button:last-child {
background: linear-gradient(135deg, #a08c7a 0%, #8a7868 100%);
box-shadow: 0 4px 15px rgba(128, 112, 96, 0.3);
}

.PostCommentBox button:last-child:hover,
.PostCommentBox1 button:last-child:hover {
box-shadow: 0 6px 20px rgba(128, 112, 96, 0.4);
}

/* 表情选择 */
.PostCommentBox em {
display: inline-block;
margin: 3px;
cursor: pointer;
border: 2px solid transparent;
border-radius: 6px;
padding: 3px;
transition: all 0.3s ease;
}

.PostCommentBox em:hover {
border-color: #A0522D;
transform: scale(1.1);
background: rgba(160, 82, 45, 0.1);
}

.PostCommentBox em img {
width: 22px;
height: 22px;
border-radius: 3px;
}

/* 更多评论按钮 */
.ShowMoreComment {
text-align: center;
padding: 25px;
background: linear-gradient(135deg, #fdf8f2 0%, #fbf5ed 100%);
border-top: 1px solid #e8d9c5;
}

.ShowMoreComment button {
background: transparent;
color: #8B4513;
border: 2px solid #A0522D;
padding: 12px 30px;
border-radius: 25px;
cursor: pointer;
font-size: 15px;
font-weight: bold;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 8px;
}

.ShowMoreComment button:hover {
background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
color: white;
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}

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

@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}

/* 点赞计数 */
me {
font-style: normal;
margin-left: 4px;
font-weight: bold;
color: #A0522D;
}

/* 图标样式 */
.fa-commenting-o:before { 
content: "💭";
font-size: 14px;
}
.fa-edit:before { 
content: "✍️";
}
.fa-angle-double-down:before { 
content: "⬇️";
}

/* 弹窗样式 */
.layui-layer-demo {
border-radius: 16px !important;
overflow: hidden;
border: 2px solid #e8d9c5;
box-shadow: 0 10px 40px rgba(139, 69, 19, 0.2) !important;
}

.layui-layer-demo .PostCommentBox {
margin: 0;
background: linear-gradient(135deg, #fffaf0 0%, #fef9f3 100%);
box-shadow: none;
border: none;
}

.layui-layer-demo .PostCommentBox textarea {
min-height: 150px;
background: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
.WapCommentBox .head {
flex-direction: column;
gap: 15px;
align-items: flex-start;
padding: 20px;
}

.lists {
flex-direction: column;
padding: 20px 0;
}

.lists .icon {
margin-right: 0;
margin-bottom: 15px;
align-self: flex-start;
}

.lists::before {
left: 0;
top: 25px;
transform: none;
width: 30px;
height: 3px;
}

.lists:hover::before {
height: 3px;
width: 50px;
}

.lists dl {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}

.lists dd {
gap: 15px;
}

.PostCommentBox,
.PostCommentBox1 {
padding: 20px;
}

.PostCommentBox textarea,
.PostCommentBox1 textarea {
min-height: 100px;
padding-left: 45px;
}

.PostCommentBox1 .fa-edit {
left: 15px;
top: 15px;
}

.ListComment {
padding: 0 20px;
}

.repalyinfs {
margin-top: 15px;
padding: 15px;
border-radius: 10px;
}

.repalyinfs div {
margin-bottom: 12px;
padding-bottom: 12px;
}

.repalyinfs dd {
padding: 10px 12px;
font-size: 13px;
}

.repalyinfs div::before {
left: -12px;
font-size: 14px;
}
}

/* 加载动画 */
.lists .icon img:hover {
animation: pulse 0.6s ease-in-out;
}

/* 分页评论样式 */
.ListComment .pages {
animation: fadeInUp 0.5s ease-out;
}