/* 评论区整体容器 */
.comments-section {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 2rem 0;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* 评论列表容器 */
.comments-list-container {
    padding: 1.5rem;
}

/* 评论项样式 */
.comment-item {
    background: #fff;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* 头像样式优化 */
.comment-avatar-wrapper {
    position: relative;
    margin-right: 1rem;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 2px solid #fff;
}

.comment-avatar:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.comment-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid #fff;
}

/* 评论连接线优化 */
.reply-tree {
    position: relative;
}

/* 基础回复样式 */
.reply-item {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    
}

/* 不同层级的样式和缩进 */
.reply-level-1 {
    --level-color: #0d6efd;
    margin-left: 3.5rem;
    padding-left: 1.5rem;
    background: linear-gradient(to right, rgba(13, 110, 253, 0.03), transparent);
    border-left: 3px solid var(--level-color);
}

.reply-level-2 {
    --level-color: #198754;
    margin-left: 5rem;
    padding-left: 1.5rem;
    background: linear-gradient(to right, rgba(25, 135, 84, 0.03), transparent);
    border-left: 3px solid var(--level-color);
}

.reply-level-3 {
    --level-color: #dc3545;
    margin-left: 6.5rem;
    padding-left: 1.5rem;
    background: linear-gradient(to right, rgba(220, 53, 69, 0.03), transparent);
    border-left: 3px solid var(--level-color);
}

.reply-level-4 {
    --level-color: #fd7e14;
    margin-left: 8rem;
    padding-left: 1.5rem;
    background: linear-gradient(to right, rgba(253, 126, 20, 0.03), transparent);
    border-left: 3px solid var(--level-color);
}

.reply-level-5 {
    --level-color: #6f42c1;
    margin-left: 9.5rem;
    padding-left: 1.5rem;
    background: linear-gradient(to right, rgba(111, 66, 193, 0.03), transparent);
    border-left: 3px solid var(--level-color);
}

/* 连接线样式 */
.reply-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    width: 20px;
    height: 2px;
    background-color: var(--level-color);
}

.reply-item::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 50%;
    width: 2px;
    background-color: var(--level-color);
}

/* 层级指示器 */
.level-indicator {
    position: absolute;
    left: -35px;
    top: 1rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--level-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 回复内容容器 */
.reply-content-wrapper {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .reply-level-1 { 
        margin-left: 2rem; 
        padding-left: 1rem;
    }
    .reply-level-2 { 
        margin-left: 3rem; 
        padding-left: 1rem;
    }
    .reply-level-3 { 
        margin-left: 4rem; 
        padding-left: 1rem;
    }
    .reply-level-4 { 
        margin-left: 5rem; 
        padding-left: 1rem;
    }
    .reply-level-5 { 
        margin-left: 6rem; 
        padding-left: 1rem;
    }
}

/* 悬浮效果 */
.reply-item:hover {
    transform: translateX(5px);
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.1);
}

/* 回复引用样式 */
.reply-reference {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    background: rgba(var(--level-rgb), 0.05);
    border-left: 3px solid var(--level-color);
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
}

/* 回复徽章 */
.reply-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin: 0 0.5rem;
    font-weight: 600;
}

.reply-level-1 .reply-badge { background: rgba(13, 110, 253, 0.1); color: #0d6efd; }
.reply-level-2 .reply-badge { background: rgba(25, 135, 84, 0.1); color: #198754; }
.reply-level-3 .reply-badge { background: rgba(220, 53, 69, 0.1); color: #dc3545; }
.reply-level-4 .reply-badge { background: rgba(253, 126, 20, 0.1); color: #fd7e14; }
.reply-level-5 .reply-badge { background: rgba(111, 66, 193, 0.1); color: #6f42c1; }

/* 评论内容样式 */
.comment-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #2c3e50;
    padding: 0.5rem 0;
}

/* 回复样式 */
.reply-item {
    margin-left: 3rem;
    border-left: 3px solid;
    border-radius: 0 1rem 1rem 0;
    position: relative;
    transition: all 0.3s ease;
}

/* 回复按钮样式 */
.reply-btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.reply-btn:hover {
    background: #f8f9fa;
    color: #0d6efd;
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.1);
}

.reply-btn-small {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    opacity: 0.8;
}

/* 回复表单样式 */
.reply-form {
    background: #f8f9fa;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-top: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.reply-form textarea {
    border-radius: 0.75rem;
    resize: none;
    transition: all 0.3s ease;
}

.reply-form textarea:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
}

/* 评论者信息样式 */
.comment-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.comment-date {
    color: #6c757d;
    font-size: 0.85rem;
}

/* 无评论状态 */
.no-comments {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(to bottom right, #f8f9fa, #fff);
    border-radius: 1rem;
}

.no-comments .bi {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .reply-item {
        margin-left: 1.5rem;
    }
    
    .comments-list-container {
        padding: 1rem;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
    }
    .reply-level-1 { margin-left: 2.5rem; }
    .reply-level-2 { margin-left: 3rem; }
    .reply-level-3 { margin-left: 3.5rem; }
    .reply-level-4 { margin-left: 4rem; }
    .reply-level-5 { margin-left: 4.5rem; }
} 