/* 评论区样式 */
#comments {
    margin-top: 40px;
}

.comment-title {
    font-size: 20px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* 评论表单样式 */
#comment-form {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.comment-post-title {
    font-size: 18px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group label.required::after {
    content: '*';
    color: #ff4d4f;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
}

.comment-form-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.comment-form-info .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.form-submit {
    text-align: right;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* 评论列表样式 */
.comment-list {
    margin-top: 30px;
}

.comment-item {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.comment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-item.comment-child {
    margin-left: 60px;
    margin-top: 20px;
}

.comment-body {
    display: flex;
}

.comment-avatar {
    flex-shrink: 0;
    margin-right: 15px;
}

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-meta {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 500;
    color: #333;
    margin-right: 15px;
}

.comment-by-author .comment-author {
    color: #007bff;
}

.comment-time {
    font-size: 12px;
    color: #999;
    margin-right: 15px;
}

.comment-reply {
    font-size: 12px;
}

.reply-link {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.reply-link:hover {
    text-decoration: underline;
}

.comment-text {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.comment-text p {
    margin-bottom: 10px;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

/* 评论分页样式 */
.comment-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    list-style: none;
}

.comment-pagination li {
    margin: 0 5px;
}

.comment-pagination a,
.comment-pagination span {
    display: block;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.comment-pagination .active span {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.comment-pagination a:hover {
    background-color: #f0f0f0;
}

/* 评论关闭提示 */
.comment-closed {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    text-align: center;
    color: #999;
}

/* 登录提示 */
.comment-logged-in {
    margin-bottom: 20px;
    padding: 10px 0;
    color: #666;
}

.comment-logged-in a {
    color: #007bff;
    text-decoration: none;
}

.comment-logged-in a:hover {
    text-decoration: underline;
}