/* CTOComment - 纯自主评论系统，无第三方版权 */
.cto-comment-wrap{font-size:14px;color:#333;line-height:1.6}
.cto-comment-wrap *{box-sizing:border-box}
.cto-comment-wrap .cto-clearfix{clear:both}
.cto-comment-wrap .cto-hidden{display:none!important}

/* 标题 */
.cto-comment-wrap .cto-header{margin-bottom:20px}
.cto-comment-wrap .cto-header h3{margin:0 0 5px;font-size:18px;font-weight:600}
.cto-comment-wrap .cto-header .cto-count{color:#888;font-size:13px}

/* 输入区 */
.cto-comment-wrap .cto-input-area{margin-bottom:20px;border:1px solid #e5e5e5;border-radius:6px;overflow:hidden;background:#fff}
.cto-comment-wrap .cto-input-area .cto-tabs{display:flex;border-bottom:1px solid #e5e5e5;background:#fafafa}
.cto-comment-wrap .cto-input-area .cto-tabs .cto-tab{padding:8px 16px;cursor:pointer;font-size:13px;color:#666;border-right:1px solid #eee}
.cto-comment-wrap .cto-input-area .cto-tabs .cto-tab.active{background:#fff;color:#333;font-weight:500}
.cto-comment-wrap .cto-input-area .cto-editor-wrap{position:relative}
.cto-comment-wrap .cto-input-area textarea.cto-editor{width:100%;min-height:120px;padding:12px;border:none;resize:vertical;font-size:14px;font-family:inherit;outline:none;background:#fff}
.cto-comment-wrap .cto-input-area .cto-preview{width:100%;min-height:120px;padding:12px;display:none;background:#fff;overflow:auto}
.cto-comment-wrap .cto-input-area .cto-preview.active{display:block}
.cto-comment-wrap .cto-input-area textarea.cto-editor.active{display:none}
.cto-comment-wrap .cto-input-area .cto-footer{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#fafafa;border-top:1px solid #e5e5e5}
.cto-comment-wrap .cto-input-area .cto-footer .cto-meta-left{display:flex;gap:8px;align-items:center}
.cto-comment-wrap .cto-input-area .cto-footer .cto-meta-left input[type=text]{padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:13px;width:auto}
.cto-comment-wrap .cto-input-area .cto-footer .cto-submit{padding:6px 16px;background:#333;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:13px}
.cto-comment-wrap .cto-input-area .cto-footer .cto-submit:hover{background:#555}
.cto-comment-wrap .cto-input-area .cto-footer .cto-submit:disabled{background:#999;cursor:not-allowed}
.cto-comment-wrap .cto-input-area .cto-reply-to{font-size:12px;color:#888;margin-bottom:8px;padding:6px 10px;background:#fff9e6;border-radius:4px;display:flex;align-items:center;justify-content:space-between}
.cto-comment-wrap .cto-input-area .cto-reply-to .cto-cancel-reply{cursor:pointer;color:#e74c3c;margin-left:8px}

/* 空状态 */
.cto-comment-wrap .cto-empty{text-align:center;padding:30px;color:#999}

/* 排序切换 */
.cto-comment-wrap .cto-sort-bar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:13px;color:#888}
.cto-comment-wrap .cto-sort-bar .cto-sort a{margin-left:12px;cursor:pointer;color:#888}
.cto-comment-wrap .cto-sort-bar .cto-sort a.active{color:#333;font-weight:500}
.cto-comment-wrap .cto-sort-bar .cto-sort a:hover{color:#333}

/* 评论列表 */
.cto-comment-wrap .cto-list{}
.cto-comment-wrap .cto-item{padding:15px 0;border-bottom:1px solid #f0f0f0}
.cto-comment-wrap .cto-item .cto-head{display:flex;align-items:center;margin-bottom:8px}
.cto-comment-wrap .cto-item .cto-head .cto-avatar{width:32px;height:32px;border-radius:50%;margin-right:10px;background:#eee;overflow:hidden;flex-shrink:0}
.cto-comment-wrap .cto-item .cto-head .cto-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.cto-comment-wrap .cto-item .cto-head .cto-name{font-weight:500;color:#333}
.cto-comment-wrap .cto-item .cto-head .cto-label{font-size:11px;padding:1px 6px;margin-left:6px;background:#3498db;color:#fff;border-radius:3px}
.cto-comment-wrap .cto-item .cto-head .cto-label.author{background:#e67e22}
.cto-comment-wrap .cto-item .cto-head .cto-label.admin{background:#2ecc71}
.cto-comment-wrap .cto-item .cto-head .cto-meta{color:#999;font-size:12px;margin-left:10px}
.cto-comment-wrap .cto-item .cto-head .cto-meta .cto-info{margin-left:8px}
.cto-comment-wrap .cto-item .cto-body{margin-left:42px}
.cto-comment-wrap .cto-item .cto-body .cto-content{word-break:break-word}
.cto-comment-wrap .cto-item .cto-body .cto-content img{max-width:100%}
.cto-comment-wrap .cto-item .cto-body .cto-content blockquote{border-left:3px solid #ddd;padding:4px 10px;margin:4px 0;color:#888;background:#f8f8f8;border-radius:0 4px 4px 0;font-size:13px}
.cto-comment-wrap .cto-item .cto-body .cto-content p{margin:4px 0}
.cto-comment-wrap .cto-item .cto-body .cto-content code{background:#f0f0f0;padding:1px 5px;border-radius:3px;font-size:13px}
.cto-comment-wrap .cto-item .cto-body .cto-content pre{background:#f5f5f5;padding:10px;border-radius:4px;overflow-x:auto;margin:6px 0}
.cto-comment-wrap .cto-item .cto-body .cto-content pre code{background:none;padding:0}
.cto-comment-wrap .cto-item .cto-body .cto-content ul,.cto-comment-wrap .cto-item .cto-body .cto-content ol{padding-left:20px;margin:4px 0}
.cto-comment-wrap .cto-item .cto-body .cto-content table{border-collapse:collapse;margin:4px 0}
.cto-comment-wrap .cto-item .cto-body .cto-content td,.cto-comment-wrap .cto-item .cto-body .cto-content th{border:1px solid #ddd;padding:4px 8px}

/* 引用块 */
.cto-comment-wrap .cto-quote{border-left:3px solid #ddd;padding:4px 10px;margin:4px 0;color:#888;background:#f8f8f8;border-radius:0 4px 4px 0;font-size:13px}

/* 操作栏 */
.cto-comment-wrap .cto-item .cto-body .cto-actions{margin-top:8px;font-size:12px;color:#888}
.cto-comment-wrap .cto-item .cto-body .cto-actions .cto-action{margin-right:12px;cursor:pointer;display:inline-flex;align-items:center}
.cto-comment-wrap .cto-item .cto-body .cto-actions .cto-action:hover{color:#333}
.cto-comment-wrap .cto-item .cto-body .cto-actions .cto-action .cto-icon{margin-right:3px}
.cto-comment-wrap .cto-item .cto-body .cto-actions .cto-action.liked{color:#e74c3c}
.cto-comment-wrap .cto-item.cto-waiting .cto-body .cto-content::after{content:'(等待审核中)';color:#e67e22;font-size:12px;margin-left:8px}
.cto-comment-wrap .cto-item .cto-sticky-badge{background:#e74c3c;color:#fff;font-size:11px;padding:1px 6px;border-radius:3px;margin-left:6px}

/* 子评论 */
.cto-comment-wrap .cto-children{margin-top:12px;padding-left:20px;border-left:2px solid #f0f0f0}
.cto-comment-wrap .cto-children .cto-item{padding:10px 0}
.cto-comment-wrap .cto-children .cto-item .cto-children{border-left-color:#f5f5f5;padding-left:15px}

/* 分页 */
.cto-comment-wrap .cto-pagination{display:flex;justify-content:center;align-items:center;margin-top:20px;gap:5px}
.cto-comment-wrap .cto-pagination .cto-page-btn{padding:4px 10px;border:1px solid #ddd;background:#fff;border-radius:3px;cursor:pointer;font-size:13px;color:#333}
.cto-comment-wrap .cto-pagination .cto-page-btn:hover{border-color:#333}
.cto-comment-wrap .cto-pagination .cto-page-btn.active{background:#333;color:#fff;border-color:#333}
.cto-comment-wrap .cto-pagination .cto-page-btn:disabled{color:#ccc;cursor:not-allowed}
.cto-comment-wrap .cto-pagination .cto-page-info{color:#999;font-size:12px;margin:0 5px}

/* 加载中 */
.cto-comment-wrap .cto-loading{text-align:center;padding:20px;color:#999;font-size:13px}
.cto-comment-wrap .cto-loading .cto-spinner{display:inline-block;width:18px;height:18px;border:2px solid #ddd;border-top-color:#333;border-radius:50%;animation:cto-spin 0.8s linear infinite;vertical-align:middle;margin-right:5px}
@keyframes cto-spin{to{transform:rotate(360deg)}}

/* 回复输入框 */
.cto-comment-wrap .cto-reply-input{margin-top:10px;border:1px solid #e5e5e5;border-radius:4px;overflow:hidden;background:#fff}
.cto-comment-wrap .cto-reply-input textarea{width:100%;min-height:60px;padding:10px;border:none;resize:vertical;font-size:13px;outline:none}
.cto-comment-wrap .cto-reply-input .cto-reply-footer{display:flex;justify-content:flex-end;gap:8px;padding:6px 10px;background:#fafafa;border-top:1px solid #e5e5e5}
.cto-comment-wrap .cto-reply-input .cto-reply-footer .cto-cancel{padding:4px 12px;background:#fff;border:1px solid #ddd;border-radius:3px;cursor:pointer;font-size:12px}
.cto-comment-wrap .cto-reply-input .cto-reply-footer .cto-reply-submit{padding:4px 12px;background:#333;color:#fff;border:none;border-radius:3px;cursor:pointer;font-size:12px}

/* 登录按钮 */
.cto-comment-wrap .cto-login-area{text-align:center;padding:15px;margin-bottom:15px;border:1px dashed #ddd;border-radius:4px;background:#fafafa}
.cto-comment-wrap .cto-login-area .cto-login-btn{padding:8px 24px;background:#333;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:14px}

/* 消息提示 */
.cto-comment-wrap .cto-toast{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:10px 20px;background:rgba(0,0,0,0.8);color:#fff;border-radius:4px;z-index:9999;font-size:14px}
.cto-comment-wrap .cto-toast.success{background:#27ae60}
.cto-comment-wrap .cto-toast.error{background:#c0392b}
.cto-comment-wrap .cto-toast.info{background:#3498db}

/* 评论关闭提示 */
.cto-closed{padding:28px 0;text-align:center;color:#999;font-size:14px;background:#fafafa;border-radius:6px;margin-top:12px;}
.cto-captcha-wrap{display:inline-flex;align-items:center;gap:6px;}
