/**
 * PC端评论系统样式优化
 * 优化内容：
 * 1. 评论列表样式
 * 2. 嵌套评论样式
 * 3. 表情样式
 * 4. 评论表单样式
 * 5. 评论评分功能（准/不准）
 * 
 * @version 1.1
 * @author RENZHUNLA
 */

/* ============================================
   1. 评论区域整体优化
   ============================================ */

#comments {
    padding: 40px 0 20px;
    word-break: break-word;
    word-wrap: break-word;
}

.panelTitle {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panelTitle .commentNum {
    color: #e62828;
    font-size: 20px;
    font-weight: 700;
}

/* ============================================
   2. 评论表单优化
   ============================================ */

.comment_sendwrap {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.comment_sendwrap:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comment_avatar {
    width: 60px;
    height: 60px;
    float: left;
    margin-right: 16px;
}

.comment_avatar .userPic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #f5f5f5;
    transition: all 0.3s ease;
}

.comment_avatar .userPic:hover {
    border-color: #e62828;
    transform: scale(1.05);
}

.comment_avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment_sendPart {
    padding-left: 0;
    margin-left: 76px;
}

.comment_tips {
    font-size: 14px;
    color: #999;
    margin-top: 12px;
}

.comment_tips a {
    color: #e62828;
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment_tips a:hover {
    color: #ff4757;
    text-decoration: underline;
}

.comment-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.textarea_comment {
    flex: 1;
    padding: 12px 16px;
    min-height: 80px;
    max-height: none; /* 移除最大高度限制，允许长文本 */
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    resize: vertical; /* 允许用户手动调整高度 */
    background-color: #fafafa;
    transition: all 0.3s ease;
    font-family: inherit;
    width: auto !important; /* 覆盖 details.css 中的固定宽度 615px */
    max-width: 100%; /* 确保不超过容器宽度 */
    box-sizing: border-box; /* 包含 padding 和 border */
}

.textarea_comment:focus {
    outline: none;
    border-color: #e62828;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(230, 40, 40, 0.1);
}

.textarea_comment::placeholder {
    color: #999;
}

.new-comment-share {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e62828, #ff4757);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(230, 40, 40, 0.2);
}

.new-comment-share:hover {
    background: linear-gradient(135deg, #ff4757, #e62828);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 40, 40, 0.3);
}

.new-comment-share:active {
    transform: translateY(0);
}

.new-comment-share:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   3. 表情选择器优化
   ============================================ */

.smilies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.smilies a {
    display: inline-block;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.smilies a:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.smilies a:active {
    transform: scale(0.95);
}

.smilies img {
    width: 24px;
    height: 24px;
    display: block;
    transition: transform 0.2s ease;
}

.smilies a:hover img {
    transform: scale(1.1);
}

/* 评论中的表情 */
.comment_conBox .wp-smiley,
.comment_con .wp-smiley {
    height: 20px !important;
    max-height: 20px !important;
    width: auto;
    vertical-align: middle;
    margin: 0 2px;
    transition: transform 0.2s ease;
}

.comment_conBox .wp-smiley:hover,
.comment_con .wp-smiley:hover {
    transform: scale(1.2);
}

/* ============================================
   4. 评论列表优化
   ============================================ */

.comment_listBox {
    margin-bottom: 40px;
}

.comment_list {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-bottom: 20px;
}

.comment_list .comment-body {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible; /* 改为 visible，允许内容完整显示 */
    min-height: auto; /* 移除最小高度限制 */
    height: auto; /* 自适应高度 */
}

.comment_list .comment-body:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.comment_list .comment_avatar {
    width: 48px;
    height: auto;
    float: left;
    margin-right: 12px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comment_list .user-box-new {
    width: 48px;
    height: 48px;
    position: relative;
    margin-bottom: 4px;
}

.comment_list .user-box-new .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #f5f5f5;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.comment_list .user-box-new .user-avatar:hover {
    border-color: #e62828;
    transform: scale(1.05);
}

.comment_list .user-box-new .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment_list .user-box-new .user-medal-new {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    z-index: 10;
    border-radius: 50%;
    border: 2px solid #fff;
    overflow: hidden;
}

.comment_list .user-box-new .user-medal-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment_list .comment_avatar .grey {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    margin-top: 4px;
    display: block;
}

.comment_conBox {
    margin-left: 60px;
    padding-left: 0;
    width: auto !important; /* 覆盖 details.css 中的固定宽度 730px */
    max-width: 100%; /* 确保不超过容器宽度 */
    flex: 1;
    min-width: 0; /* 允许内容收缩 */
    overflow: visible; /* 允许内容完整显示 */
    word-wrap: break-word; /* 长单词自动换行 */
    overflow-wrap: break-word; /* 现代浏览器支持 */
    box-sizing: border-box; /* 包含 padding 和 border */
}

.comment_avatar_time {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f5f5f5;
    overflow: visible !important; /* 覆盖 details.css 中的 overflow: hidden */
    height: auto !important; /* 覆盖 details.css 中的固定高度 36px */
    min-height: auto; /* 移除最小高度限制 */
    margin-top: 0 !important; /* 覆盖 details.css 中的 margin-top: -10px */
    line-height: normal !important; /* 覆盖 details.css 中的 line-height: 36px */
}

.comment_avatar_time .time {
    font-size: 12px;
    color: #999;
    float: none;
    margin: 0;
    order: 1;
}

.comment_avatar_time .user-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px; /* 减少间距，让等级图片紧挨着昵称 */
    order: 0;
}

.comment_avatar_time a.user-name-link {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    margin-right: 0; /* 确保没有右边距 */
    flex-shrink: 0; /* 防止收缩 */
}

.comment_avatar_time a.user-name-link:hover {
    color: #e62828;
}

/* 等级徽章样式 */
.comment_avatar_time .rank.face-stuff-level {
    display: inline-flex;
    align-items: center;
    gap: 0; /* 移除内部间距 */
    margin: 0;
    margin-left: 2px; /* 紧挨着昵称，只留最小间距 */
    order: 1;
    flex-shrink: 0; /* 防止收缩 */
}

.comment_avatar_time .rank.face-stuff-level a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.comment_avatar_time .rank.face-stuff-level img,
.comment_avatar_time .rank.face-stuff-level span {
    display: inline-block;
    vertical-align: middle;
    height: 18px;
    line-height: 18px;
}

/* 作者标识 */
.comment_avatar_time .author-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e62828;
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
    margin-left: 4px;
    font-weight: 500;
    order: 3; /* 确保在最后显示 */
}

/* 回复指向箭头 */
.comment_avatar_time .reply-to {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 12px;
    margin-left: 6px; /* 在等级图片之后，增加间距 */
    order: 2; /* 确保在等级图片之后显示 */
}

.comment_avatar_time .reply-to::before {
    content: '→';
    color: #999;
    font-size: 12px;
}

.comment_con {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 12px;
    word-break: break-word;
    overflow-wrap: break-word; /* 确保长文本换行 */
    white-space: normal; /* 允许换行 */
    overflow: visible; /* 允许内容完整显示 */
    min-height: auto; /* 移除最小高度限制 */
    height: auto; /* 自适应高度 */
}

.comment_con p {
    margin: 0 0 8px 0;
}

.comment_con p:last-child {
    margin-bottom: 0;
}

.comment_action {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #f5f5f5;
    margin-top: 8px;
    min-height: 32px; /* 确保有足够高度对齐 */
    text-align: left !important; /* 覆盖details.css的text-align: right */
}

.comment_action a {
    padding: 4px 12px;
    color: #999;
    font-size: 12px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-left: 0;
    margin-right: auto; /* 确保左对齐 */
    align-self: center; /* 垂直居中 */
}

.comment_action a:hover {
    color: #e62828;
    background: #ffecec;
}

.comment_action a.current {
    color: #e62828;
    background: #ffecec;
    font-weight: 500;
}

.comment_action .come_from {
    float: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    color: #999;
}

.comment_action .come_from a {
    padding: 0;
    margin: 0;
    color: #5188a6;
    background: transparent;
}

.comment_action .come_from a:hover {
    text-decoration: underline;
    background: transparent;
}

/* ============================================
   6. 评论评分功能（准/不准）
   ============================================ */

/* 评论评分按钮容器 - 确保优先级最高 */
.comment_action .comment-rate-buttons,
.comment-rate-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important; /* 适中的按钮间距 */
    margin-left: auto !important; /* 右对齐 */
    margin-right: 0 !important;
    padding-left: 12px !important;
    padding-right: 0 !important;
    flex-shrink: 0 !important;
    align-self: center !important; /* 垂直居中 */
}

/* 评论评分按钮基础样式 - 确保优先级最高 */
.comment_action .comment-rate-btn,
.comment-rate-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important; /* 适中的内部元素间距 */
    padding: 6px 14px !important; /* 缩小内边距，使按钮更紧凑 */
    border: 1px solid transparent !important; /* 使用更细的边框 */
    border-radius: 16px !important; /* 适中的圆角 */
    background: #fff !important;
    color: #666 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; /* 更流畅的动画曲线 */
    outline: none !important;
    white-space: nowrap !important;
    min-width: 60px !important; /* 缩小最小宽度 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important; /* 减小阴影效果 */
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    vertical-align: middle !important;
    line-height: 1.4 !important;
    height: auto !important;
    align-self: center !important; /* 垂直居中 */
}

/* 按钮内部光晕效果 */
.comment-rate-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.comment-rate-btn:hover::before {
    width: 300px;
    height: 300px;
}

.comment-rate-btn:hover {
    /* 悬停效果由各自的类控制 */
    transform: translateY(-1px); /* 悬停时轻微上浮 */
}

.comment-rate-btn:active {
    transform: translateY(0) scale(0.98); /* 点击时轻微缩小 */
    transition: all 0.15s ease;
}

.comment-rate-btn.rated {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.comment-rate-btn.active {
    border-color: #e62828;
    background: #ffecec;
    color: #e62828;
    font-weight: 500;
}

/* "准"按钮 - 红色主题 */
.comment-rate-btn.comment-rate-accurate {
    border-color: #e62828 !important;
    color: #e62828 !important;
    background: linear-gradient(to bottom, #fff, #fff5f5) !important; /* 渐变背景 */
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(230, 40, 40, 0.12);
    min-width: 62px !important; /* 缩小最小宽度 */
}

.comment-rate-btn.comment-rate-accurate:hover {
    border-color: #e62828 !important;
    background: linear-gradient(to bottom, #ffecec, #ffe0e0) !important; /* 悬停时渐变加深 */
    color: #e62828 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(230, 40, 40, 0.2); /* 减小阴影 */
    border-width: 1.5px;
}

.comment-rate-btn.comment-rate-accurate.active {
    border-color: #e62828 !important;
    background: linear-gradient(to bottom, #ffecec, #ffd6d6) !important; /* 激活时渐变更深 */
    color: #e62828 !important;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(230, 40, 40, 0.25); /* 减小阴影 */
    border-width: 1.5px;
    transform: translateY(-1px);
}

/* "不准"按钮 - 灰色主题 */
.comment-rate-btn.comment-rate-inaccurate {
    border-color: #d9d9d9 !important;
    color: #8c8c8c !important;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5) !important; /* 渐变背景 */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    min-width: 62px !important; /* 缩小最小宽度 */
}

.comment-rate-btn.comment-rate-inaccurate:hover {
    border-color: #bfbfbf !important;
    background: linear-gradient(to bottom, #f5f5f5, #eeeeee) !important; /* 悬停时渐变加深 */
    color: #595959 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); /* 减小阴影 */
    border-width: 1.5px;
}

.comment-rate-btn.comment-rate-inaccurate.active {
    border-color: #bfbfbf !important;
    background: linear-gradient(to bottom, #f0f0f0, #e8e8e8) !important; /* 激活时渐变更深 */
    color: #595959 !important;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18); /* 减小阴影 */
    border-width: 1.5px;
    transform: translateY(-1px);
}

/* 确保悬停时文字仍然旋转 - 使用最高优先级 */
.comment-rate-btn.comment-rate-inaccurate:hover .rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate:hover .rate-text.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate:hover span.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate:hover span.rate-text.rate-text-rotated,
button.comment-rate-btn.comment-rate-inaccurate:hover .rate-text-rotated,
button.comment-rate-btn.comment-rate-inaccurate:hover .rate-text.rate-text-rotated {
    transform: rotate(180deg) translateY(2px) !important;
    -webkit-transform: rotate(180deg) translateY(2px) !important;
    -moz-transform: rotate(180deg) translateY(2px) !important;
    -ms-transform: rotate(180deg) translateY(2px) !important;
    -o-transform: rotate(180deg) translateY(2px) !important;
}

/* 确保激活时文字仍然旋转 - 使用最高优先级 */
.comment-rate-btn.comment-rate-inaccurate.active .rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate.active .rate-text.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate.active span.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate.active span.rate-text.rate-text-rotated,
button.comment-rate-btn.comment-rate-inaccurate.active .rate-text-rotated,
button.comment-rate-btn.comment-rate-inaccurate.active .rate-text.rate-text-rotated {
    transform: rotate(180deg) translateY(1px) !important;
    -webkit-transform: rotate(180deg) translateY(1px) !important;
    -moz-transform: rotate(180deg) translateY(1px) !important;
    -ms-transform: rotate(180deg) translateY(1px) !important;
    -o-transform: rotate(180deg) translateY(1px) !important;
}

.comment-rate-btn .rate-text {
    font-size: 13px !important; /* 缩小字体 */
    font-weight: 600 !important; /* 加粗 */
    display: inline-block !important;
    line-height: 1.2 !important;
    letter-spacing: 0.5px !important; /* 减小字间距 */
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    min-width: 16px !important; /* 缩小最小宽度 */
    text-align: center;
}

/* 确保"准"按钮的文字不旋转 */
.comment-rate-btn.comment-rate-accurate .rate-text {
    transform: none !important;
}

/* 旋转180度的"准"字 - 确保在PC端正确显示，使用最高优先级 */
.comment-rate-btn.comment-rate-inaccurate .rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate .rate-text.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate span.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate span.rate-text.rate-text-rotated,
button.comment-rate-btn.comment-rate-inaccurate .rate-text-rotated,
button.comment-rate-btn.comment-rate-inaccurate .rate-text.rate-text-rotated {
    transform: rotate(180deg) !important;
    -webkit-transform: rotate(180deg) !important;
    -moz-transform: rotate(180deg) !important;
    -ms-transform: rotate(180deg) !important;
    -o-transform: rotate(180deg) !important;
    transform-origin: center center !important;
    -webkit-transform-origin: center center !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    font-size: 13px !important; /* 缩小字体 */
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    position: relative !important;
    z-index: 1 !important;
}

.comment-rate-btn .rate-count {
    font-size: 11px !important; /* 缩小数字字体 */
    color: #999;
    min-width: 18px !important; /* 缩小最小宽度 */
    text-align: center;
    padding: 2px 6px !important; /* 缩小内边距 */
    font-weight: 600 !important; /* 加粗数字 */
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px !important; /* 缩小圆角 */
    transition: all 0.3s ease;
    margin-left: 2px !important; /* 适中的间距 */
    line-height: 1.2 !important;
}

.comment-rate-btn.comment-rate-accurate .rate-count {
    background: rgba(230, 40, 40, 0.12);
    color: #e62828;
    font-weight: 600;
}

.comment-rate-btn.comment-rate-inaccurate .rate-count {
    background: rgba(0, 0, 0, 0.08);
    color: #8c8c8c;
    font-weight: 600;
}

.comment-rate-btn.active .rate-count {
    color: inherit;
    font-weight: 600;
    transform: scale(1.1); /* 激活时数字放大 */
}

.comment-rate-btn.comment-rate-accurate.active .rate-count {
    background: rgba(230, 40, 40, 0.15);
}

.comment-rate-btn.comment-rate-inaccurate.active .rate-count {
    background: rgba(0, 0, 0, 0.1);
}

/* 评分动画 - 优化动画效果 */
@keyframes rateCountBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* 按钮点击波纹效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.comment-rate-btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

.comment-rate-btn.comment-rate-accurate:active::after {
    background: rgba(230, 40, 40, 0.3);
}

.comment-rate-btn.comment-rate-inaccurate:active::after {
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   5. 嵌套评论优化
   ============================================ */

.children {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-top: 8px; /* 减少顶部间距 */
    margin-left: 0;
    padding-left: 20px; /* 减少左边距 */
    border-left: 1px solid #f0f0f0; /* 使用更细更柔和的边框 */
    position: relative;
}

.children::before {
    display: none;
}

/* 嵌套评论的视觉连接线 */
.children .comment_list {
    position: relative;
    padding-left: 0;
    margin-bottom: 8px; /* 减少底部间距 */
    padding-bottom: 8px;
    border-bottom: none; /* 移除底部边框，减少视觉分割 */
}

.children .comment_list::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 20px;
    width: 16px;
    height: 1px;
    background: #f0f0f0; /* 使用更柔和的颜色 */
}

.children .comment_list:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.children .comment-body {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
    border-radius: 0;
    overflow: visible; /* 允许嵌套评论内容完整显示 */
    min-height: auto; /* 移除最小高度限制 */
    height: auto; /* 自适应高度 */
    transition: all 0.3s ease; /* 添加过渡动画 */
    position: relative; /* 为悬停效果做准备 */
}

.children .comment-body:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* 添加轻微阴影 */
    transform: translateY(-1px); /* 轻微上移，比原评论更柔和 */
}

.children .comment_avatar {
    display: block;
    width: 48px; /* 保持与原评论相同的48px */
    height: auto; /* 自适应高度 */
    margin-right: 12px; /* 与原评论保持一致 */
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.children .user-box-new {
    width: 48px; /* 保持与原评论相同的48px */
    height: 48px;
    position: relative;
    margin-bottom: 4px; /* 与原评论保持一致 */
}

.children .user-box-new .user-avatar {
    width: 48px; /* 保持与原评论相同的48px */
    height: 48px;
    border-width: 2px; /* 与原评论保持一致 */
    border-color: #f5f5f5;
    transition: all 0.3s ease; /* 添加过渡动画 */
    border-radius: 50%;
    overflow: hidden;
    display: block;
    margin: 0 auto;
}

.children .user-box-new .avatar-img {
    width: 100%; /* 使用100%填充容器 */
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease; /* 添加过渡动画 */
}

/* 嵌套评论楼层号样式 */
.children .comment_avatar .grey {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    margin-top: 4px;
    display: block;
}

/* 嵌套评论头像悬停效果 - 保持48px大小不变，只改变边框颜色 */
.children .user-box-new .user-avatar:hover {
    border-color: #e62828; /* 边框颜色变化 */
    /* 不添加 transform: scale()，保持头像48px大小不变 */
}

/* 嵌套评论整体悬停时，头像也有轻微反馈 */
.children .comment-body:hover .user-box-new .user-avatar {
    border-color: #e62828;
}

.children .comment_conBox {
    margin-left: 60px; /* 调整为48px头像 + 12px间距 = 60px */
    width: auto !important; /* 覆盖 details.css 中的固定宽度 */
    max-width: 100%; /* 确保不超过容器宽度 */
    min-width: 0; /* 允许内容收缩 */
    overflow: visible; /* 允许内容完整显示 */
    word-wrap: break-word; /* 长单词自动换行 */
    overflow-wrap: break-word; /* 现代浏览器支持 */
    box-sizing: border-box; /* 包含 padding 和 border */
}

.children .comment_avatar_time {
    margin-bottom: 4px; /* 减少间距 */
    padding-bottom: 4px;
}

.children .comment_con {
    font-size: 13px;
    margin-bottom: 8px;
    overflow-wrap: break-word; /* 确保长文本换行 */
    white-space: normal; /* 允许换行 */
    overflow: visible; /* 允许内容完整显示 */
    min-height: auto; /* 移除最小高度限制 */
    height: auto; /* 自适应高度 */
}

.children .comment_action {
    padding-top: 4px; /* 减少间距 */
    margin-top: 4px;
    border-top-color: #f5f5f5; /* 使用更柔和的边框颜色 */
    transition: border-color 0.3s ease; /* 添加过渡动画 */
}

/* 嵌套评论悬停时，操作区域边框颜色也变化 */
.children .comment-body:hover .comment_action {
    border-top-color: #e8e8e8; /* 悬停时边框颜色稍微加深 */
}

.children .come_from {
    display: none;
}

/* 嵌套评论中的引用 */
.children .comment_blockquote,
.children .comment_conBox blockquote {
    background-color: #fff;
    padding: 12px 16px;
    border-left: 3px solid #e62828;
    border-radius: 4px;
    margin: 8px 0;
    font-size: 13px;
    color: #666;
}

.children .comment_blockquote:last-child,
.children .comment_conBox blockquote:last-child {
    border-bottom: none;
}

/* ============================================
   6. 评论引用优化
   ============================================ */

.comment_blockquote,
.comment_conBox blockquote {
    background-color: #f5f5f5;
    padding: 12px 16px;
    border-left: 3px solid #e62828;
    border-radius: 4px;
    margin: 12px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.comment_blockquote:last-child,
.comment_conBox blockquote:last-child {
    border-bottom: none;
}

.comment_blockquote .comment_con,
.comment_conBox blockquote .comment_con {
    padding: 0;
    margin: 0;
    padding-right: 15px !important; /* 覆盖 details.css 中的设置 */
    padding-top: 0 !important; /* 覆盖 details.css 中的设置 */
    overflow-wrap: break-word; /* 确保长文本换行 */
    white-space: normal; /* 允许换行 */
    overflow: visible !important; /* 覆盖 details.css 中的 overflow: hidden */
    min-height: auto; /* 移除最小高度限制 */
    height: auto; /* 自适应高度 */
}

.comment_blockquote .comment_con a.user_name,
.comment_conBox blockquote .comment_con a.user_name {
    color: #e62828;
    font-weight: 500;
    text-decoration: none;
}

.comment_blockquote .comment_con a.user_name:hover,
.comment_conBox blockquote .comment_con a.user_name:hover {
    text-decoration: underline;
}

.comment_blockquote .comment_action,
.comment_conBox blockquote .comment_action {
    visibility: visible;
    margin-top: 8px;
    padding-top: 8px;
}

/* ============================================
   7. 快速回复优化
   ============================================ */

.quickReply {
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid #e0e0e0;
}

.textarea_quick {
    width: 100% !important; /* 覆盖 details.css 中的固定宽度 */
    min-height: 60px;
    max-height: none; /* 移除最大高度限制，允许长文本 */
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    resize: vertical; /* 允许用户手动调整高度 */
    background-color: #fff;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
    overflow-y: auto; /* 内容超出时显示滚动条 */
    overflow-x: hidden; /* 水平方向隐藏溢出 */
}

.textarea_quick:focus {
    outline: none;
    border-color: #e62828;
    box-shadow: 0 0 0 3px rgba(230, 40, 40, 0.1);
}

.quickReply .comment_operate {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quickReply .comment_share {
    width: auto;
    height: auto;
    float: none;
}

.quickReply .btn_sub,
.quickReply .btn_subGrey {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* ============================================
   8. 评论标签页优化
   ============================================ */

.comment_wrap {
    margin-top: 24px;
}

.comment-tab-box {
    border-bottom: 2px solid #f5f5f5;
    margin-bottom: 20px;
}

.tab_nav {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab_comment_li {
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab_comment_li span {
    font-size: 14px;
    color: #666;
    transition: color 0.3s ease;
}

.tab_comment_li:hover span {
    color: #e62828;
}

.tab_comment_li.current_item {
    color: #e62828;
}

.tab_comment_li.current_item span {
    color: #e62828;
    font-weight: 600;
}

.tab_comment_li.current_item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e62828;
}

/* ============================================
   9. 空状态优化
   ============================================ */

.decmt-box {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    background: #fafafa;
    border-radius: 8px;
    margin: 20px 0;
}

.decmt-box p {
    margin: 0;
    font-size: 14px;
}

.decmt-box a {
    color: #e62828;
    text-decoration: none;
}

.decmt-box a:hover {
    text-decoration: underline;
}

/* ============================================
   10. 响应式优化
   ============================================ */

@media (max-width: 768px) {
    .comment_sendwrap {
        padding: 16px;
    }
    
    .comment_avatar {
        width: 48px;
        height: 48px;
        margin-right: 12px;
    }
    
    .comment_sendPart {
        margin-left: 60px;
    }
    
    .comment-box {
        flex-direction: column;
    }
    
    .new-comment-share {
        width: 100%;
        height: 44px;
        margin-top: 12px;
    }
    
    .comment_conBox {
        margin-left: 60px;
        width: auto;
        min-width: 0; /* 移动端允许内容收缩 */
        overflow: visible; /* 允许内容完整显示 */
    }
    
    .comment_con {
        overflow: visible; /* 移动端允许内容完整显示 */
        height: auto; /* 自适应高度 */
    }
    
    .children {
        margin-left: 40px;
        padding: 12px;
    }
    
    .children .comment_conBox {
        margin-left: 40px;
        width: auto;
        min-width: 0; /* 移动端允许内容收缩 */
        overflow: visible; /* 允许内容完整显示 */
    }
    
    .children .comment_con {
        overflow: visible; /* 移动端允许内容完整显示 */
        height: auto; /* 自适应高度 */
    }
    
    .smilies {
        gap: 6px;
        padding: 10px;
    }
    
    .smilies img {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   11. 覆盖原有固定尺寸样式
   ============================================ */

/* 覆盖 style.css 中的固定高度 */
.comment-body {
    height: auto !important; /* 覆盖 style.css 中的 height: 85px */
    min-height: auto !important;
    overflow: visible !important;
}

/* 确保评论容器能够自适应 */
.comment_list .comment-body {
    display: block; /* 使用块级布局，确保内容自然流动 */
    clear: both; /* 清除浮动 */
}

/* 确保评论内容区域能够完整显示 */
.comment_list .comment-body::after {
    content: '';
    display: table;
    clear: both;
}

/* 确保评论内容区域自适应宽度 */
.comment_list .comment-body .comment_conBox {
    width: auto !important; /* 覆盖 details.css 中的固定宽度 730px */
    max-width: 100%; /* 确保不超过容器宽度 */
    /* 保持原有的 float: left，确保布局正常 */
}

/* 响应式：小屏幕时调整布局 */
@media (max-width: 768px) {
    .comment_list .comment-body {
        display: block;
    }
    
    .comment_list .comment_avatar {
        float: left;
        margin-right: 10px;
    }
    
    .comment_list .comment-body .comment_conBox {
        display: block;
        width: auto !important;
        max-width: calc(100% - 60px);
        margin-left: 60px;
        float: none;
    }
}

/* ============================================
   12. 评论评分旋转效果强制修复（最高优先级）
   ============================================ */

/* 强制"不准"按钮的文字旋转180度 - 使用最高优先级和所有可能的选择器 */
.comment-rate-btn.comment-rate-inaccurate .rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate .rate-text.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate span.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate span.rate-text.rate-text-rotated,
button.comment-rate-btn.comment-rate-inaccurate .rate-text-rotated,
button.comment-rate-btn.comment-rate-inaccurate .rate-text.rate-text-rotated,
.comment-rate-buttons .comment-rate-btn.comment-rate-inaccurate .rate-text-rotated,
.comment-rate-buttons .comment-rate-btn.comment-rate-inaccurate .rate-text.rate-text-rotated,
.comment_action .comment-rate-btn.comment-rate-inaccurate .rate-text-rotated,
.comment_action .comment-rate-btn.comment-rate-inaccurate .rate-text.rate-text-rotated {
    transform: rotate(180deg) !important;
    -webkit-transform: rotate(180deg) !important;
    -moz-transform: rotate(180deg) !important;
    -ms-transform: rotate(180deg) !important;
    -o-transform: rotate(180deg) !important;
    transform-origin: center center !important;
    -webkit-transform-origin: center center !important;
    -moz-transform-origin: center center !important;
    -ms-transform-origin: center center !important;
    -o-transform-origin: center center !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* 确保悬停时仍然旋转 */
.comment-rate-btn.comment-rate-inaccurate:hover .rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate:hover .rate-text.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate:hover span.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate:hover span.rate-text.rate-text-rotated {
    transform: rotate(180deg) !important;
    -webkit-transform: rotate(180deg) !important;
    -moz-transform: rotate(180deg) !important;
    -ms-transform: rotate(180deg) !important;
    -o-transform: rotate(180deg) !important;
}

/* 确保激活时仍然旋转 */
.comment-rate-btn.comment-rate-inaccurate.active .rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate.active .rate-text.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate.active span.rate-text-rotated,
.comment-rate-btn.comment-rate-inaccurate.active span.rate-text.rate-text-rotated {
    transform: rotate(180deg) !important;
    -webkit-transform: rotate(180deg) !important;
    -moz-transform: rotate(180deg) !important;
    -ms-transform: rotate(180deg) !important;
    -o-transform: rotate(180deg) !important;
}

/* 确保"准"按钮的文字不旋转 */
.comment-rate-btn.comment-rate-accurate .rate-text,
.comment-rate-btn.comment-rate-accurate span.rate-text,
button.comment-rate-btn.comment-rate-accurate .rate-text {
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
}

/* ============================================
   12. 无障碍优化
   ============================================ */

.comment_action a:focus,
.new-comment-share:focus,
.textarea_comment:focus {
    outline: 2px solid #e62828;
    outline-offset: 2px;
}

/* 减少动画（尊重用户偏好） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

