.ed-comment-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ed-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ed-comment-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ed-comment-count {
    color: #999;
    font-size: 14px;
}

.ed-comment-form {
    margin-bottom: 0;
}

.ed-comment-form-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.ed-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 12px;
}

.ed-comment-user-info {
    flex: 1;
}

.ed-comment-username {
    font-weight: 500;
    color: #333;
}

.ed-comment-login-tip {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 60px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.ed-comment-login-link {
    color: #007bff;
    text-decoration: none;
}

.ed-comment-login-link:hover {
    text-decoration: underline;
}

.ed-comment-editor-wrapper {
    margin-bottom: 15px;
}

#ed-comment-md {
    border-radius: 5px;
}

.ed-comment-editor {
    width: 100%;
    min-height: 120px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

.ed-comment-editor:focus {
    outline: none;
    border-color: #007bff;
}

.ed-comment-form-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.ed-comment-submit-btn {
    background-color: #79b67c;
    color: white;
    border: none;
    padding: 7px 15px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.ed-comment-submit-btn:hover {
    background-color: #0056b3;
}

.ed-comment-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.ed-comment-list {
    margin-top: 20px;
}

.ed-comment-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ed-comment-item:last-child {
    border-bottom: none;
}

/* 新布局：头像在左边，内容在右边 */
.ed-comment-item-row {
    display: flex;
}

.ed-comment-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #28a745;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.ed-comment-item-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.ed-comment-item-body {
    margin-left: 12px;
    flex: 1;
    min-width: 0;
}

.ed-comment-item-info {
    margin-bottom: 8px;
}

.ed-comment-item-username {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    display: block;
}

.ed-comment-item-time {
    color: #999;
    font-size: 12px;
    display: inline-block;
    margin-right: 8px;
}

.ed-comment-status-pending {
    display: inline-block;
    background-color: #fff3cd;
    color: #856404;
    padding: 0 6px;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 0px;
    border: 1px solid #ffeeba;
}

/* 九宫格 */
.pics {
    margin-top: 10px !important;
    margin-left: 0px !important;
    width: 100% !important;
}

.pics img {
    margin-bottom: 4px !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 24.4% !important;
    min-width: 24.4% !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 10px !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,.10) !important;
    object-fit: cover !important;
    object-position: top !important;
    display: inline;
}

.pics img:only-child {
    max-width: 49% !important;
    max-height: 49% !important;
    display: block !important;
  /*相当于删除已设置的某一属性*/;
}

.pics img:nth-child(3):nth-last-child(4) {
    margin-right: 10px !important;
    display: inline!important;
}

.pics img:nth-child(3):nth-last-child(7),.pics img:nth-child(6):nth-last-child(4) {
    margin-right: 10px !important;
    display: inline!important;
}

.ed-comment-item-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.ed-comment-item-content img {
    max-width: 50%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: top;
}

/* Markdown 引用样式 */
.ed-comment-item-content blockquote {
    padding: 10px 15px;
    margin: 10px 0;
    background-color: #f5f5f5;
    border-left: 3px solid #007bff;
    font-size: 13px;
    color: #666;
    border-radius: 4px;
    quotes: none;
}

.ed-comment-item-content blockquote p {
    margin: 0;
}

.ed-comment-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.ed-comment-action-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ed-comment-action-btns {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ed-comment-expand-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.ed-comment-expand-btn:hover {
    text-decoration: underline;
}

.ed-comment-action-btn:hover {
    color: #007bff;
}

.ed-comment-action-btn.liked {
    color: #dc3545;
}

.ed-comment-replies {
    margin-top: 15px;
    padding-left: 48px;
}

.ed-comment-reply-item {
    padding: 12px 0;
    border-bottom: 1px solid #f9f9f9;
}

.ed-comment-reply-item:last-child {
    border-bottom: none;
}

.ed-comment-reply-item .ed-comment-item-actions {
    margin-top: 8px;
}

.ed-comment-quote {
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: #f5f5f5;
    border-left: 3px solid #007bff;
    font-size: 13px;
    color: #666;
    border-radius: 4px;
    display: block;
    clear: both;
    word-break: break-word;
    overflow: hidden;
}

.ed-comment-reply-form-container {
    margin-top: 0;
    width: 100%;
}

.ed-comment-reply-form {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.ed-comment-reply-editor {
    width: 100%;
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.ed-comment-reply-editor:focus {
    outline: none;
    border-color: #007bff;
}

.ed-comment-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ed-comment-cancel-btn {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.ed-comment-cancel-btn:hover {
    border-color: #999;
}

.ed-comment-reply-submit-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.ed-comment-reply-submit-btn:hover {
    background-color: #0056b3;
}

.ed-comment-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ed-comment-page-btn {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.ed-comment-page-btn:hover:not(:disabled) {
    border-color: #007bff;
    color: #007bff;
}

.ed-comment-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ed-comment-page-info {
    color: #999;
    font-size: 13px;
}

.ed-comment-empty {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
}

.ed-comment-loading {
    text-align: center;
    padding: 20px 0;
    color: #999;
    font-size: 14px;
}

/* 消息提示样式 */
.ed-comment-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    color: white;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.ed-comment-message-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ed-comment-message-success {
    background-color: #28a745;
}

.ed-comment-message-error {
    background-color: #dc3545;
}

/* 代码块样式 */
.ed-comment-item-content pre {
    background-color: #f7f8f8;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
    overflow-x: auto;
    font-family: "PingFang SC", "Microsoft YaHei", 微软雅黑, Verdana, Helvetica, Georgia, Serif;
    font-size: 14px;
    line-height: 1.7;
    color: #24292e;
}

.ed-comment-item-content code {
    background-color: #f6f8fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: "PingFang SC", "Microsoft YaHei", 微软雅黑, Verdana, Helvetica, Georgia, Serif;
    font-size: 0.9em;
    color: #e83e8c;
    border: 1px solid #e1e4e8;
    font-weight: 500;
}

.ed-comment-item-content pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    color: #24292e;
    display: block;
}

/* 移除自定义的 highlight.js 样式，使用 highlight.js 自带样式 */