/* 评论系统样式 */

.comments-section {
    background: #fff;
    padding: 40px 0;
    margin-top: 40px;
}

.comments-section h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
}

/* 评论表单 */
.comment-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.comment-form textarea {
    border-radius: 8px;
    border: 1px solid #ddd;
    resize: vertical;
    min-height: 100px;
}

.comment-form textarea:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.15);
    outline: none;
}

.comment-form .btn {
    min-width: 120px;
}

/* 评论列表 */
#commentsList {
    margin-top: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.comment-content-wrapper {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.comment-author {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.comment-time {
    color: #999;
    font-size: 13px;
}

.comment-content {
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.comment-actions button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-actions button:hover {
    color: var(--bs-primary);
}

.comment-actions button i {
    font-size: 16px;
}

/* 回复/子评论 */
.comment-replies {
    margin-left: 63px;
    border-left: 2px solid #f0f0f0;
    padding-left: 20px;
    margin-top: 10px;
}

.comment-replies .comment-item {
    padding: 15px 0;
}

.comment-replies .comment-avatar img {
    width: 40px;
    height: 40px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    margin: 0;
    font-size: 15px;
}

/* 加载状态 */
.comment-loading {
    text-align: center;
    padding: 40px 20px;
}

/* 管理员标识 */
.comment-header .badge {
    font-size: 11px;
    padding: 2px 8px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comments-section {
        padding: 30px 0;
    }

    .comment-item {
        gap: 12px;
    }

    .comment-avatar img {
        width: 40px;
        height: 40px;
    }

    .comment-replies {
        margin-left: 52px;
        padding-left: 15px;
    }

    .comment-replies .comment-avatar img {
        width: 36px;
        height: 36px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-actions {
        gap: 15px;
    }

    .comment-form {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .comment-replies {
        margin-left: 0;
        padding-left: 15px;
        border-left-width: 1px;
    }
}
