/* InkRichEditor - 富文本编辑器样式 */
.ink-editor{border:1px solid rgba(0,240,144,0.15);border-radius:12px;overflow:hidden;background:rgba(0,0,0,0.2);margin-bottom:12px}

/* 工具栏 */
.ink-editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:8px 10px;background:rgba(0,0,0,0.3);border-bottom:1px solid rgba(0,240,144,0.1)}
.ink-editor-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;font-size:13px;color:#cbd5e1;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.1);border-radius:6px;cursor:pointer;transition:all 0.2s;white-space:nowrap}
.ink-editor-btn:hover{background:rgba(0,240,144,0.1);border-color:rgba(0,240,144,0.3);color:#00f090}
.ink-editor-btn:active{transform:scale(0.96)}
.ink-editor-separator{width:1px;height:20px;padding:0 !important;background:rgba(255,255,255,0.15);border:none;cursor:default;pointer-events:none}
.ink-editor-separator:hover{background:rgba(255,255,255,0.15);border:none}
.ink-editor-upload-btn{position:relative;cursor:pointer}
.ink-editor-upload-btn:hover{background:rgba(0,240,144,0.1);border-color:rgba(0,240,144,0.3);color:#00f090}

/* 编辑区域 */
.ink-editor-content{min-height:120px;max-height:500px;overflow-y:auto;padding:12px 16px;color:#e2e8f0;font-size:14px;line-height:1.7;outline:none}
.ink-editor-content:empty:before{content:attr(data-placeholder);color:#64748b;pointer-events:none}
.ink-editor-content:focus{background:rgba(0,0,0,0.1)}
.ink-editor-dragover{background:rgba(0,240,144,0.05);box-shadow:inset 0 0 0 2px rgba(0,240,144,0.3)}

/* 编辑器内内容样式 */
.ink-editor-content p{margin:0 0 8px}
.ink-editor-content p:last-child{margin-bottom:0}
.ink-editor-content h1,.ink-editor-content h2,.ink-editor-content h3{margin:12px 0 8px;color:#f1f5f9;font-weight:600}
.ink-editor-content h1{font-size:1.5em}
.ink-editor-content h2{font-size:1.3em}
.ink-editor-content h3{font-size:1.15em}
.ink-editor-content ul,.ink-editor-content ol{margin:8px 0;padding-left:24px}
.ink-editor-content li{margin:4px 0}
.ink-editor-content blockquote{margin:8px 0;padding:8px 12px;border-left:3px solid rgba(0,240,144,0.4);background:rgba(0,240,144,0.05);color:#94a3b8;border-radius:0 6px 6px 0}
.ink-editor-content blockquote p{margin:0}
.ink-editor-content a{color:#00f090;text-decoration:underline}
.ink-editor-content a:hover{color:#00ffaa}
.ink-editor-content img{max-width:100%;max-height:500px;border-radius:8px;margin:8px 0;display:block}
.ink-editor-content .ink-img-uploading{opacity:0.6;width:100px !important;height:100px !important;object-fit:cover}

/* 代码块 */
.ink-editor-content pre,.ink-post-content pre{margin:12px 0;padding:0;background:rgba(0,0,0,0.4);border:1px solid rgba(0,240,144,0.15);border-radius:8px;overflow:hidden;position:relative;counter-reset:line}
.ink-editor-content pre code,.ink-post-content pre code{display:block;padding:12px 16px 12px 48px;color:#e2e8f0;font-family:'Consolas','Monaco','Courier New',monospace;font-size:13px;line-height:1.6;white-space:pre;overflow-x:auto;counter-increment:line}
.ink-editor-content pre code:before,.ink-post-content pre code:before{content:"";position:absolute;left:0;top:0;bottom:0;width:36px;background:rgba(0,0,0,0.3);border-right:1px solid rgba(0,240,144,0.1)}
.ink-editor-content pre code .code-line,.ink-post-content pre code .code-line{display:block;position:relative}
.ink-editor-content pre code .code-line:before,.ink-post-content pre code .code-line:before{counter-increment:line;content:counter(line);position:absolute;left:-36px;width:28px;text-align:right;color:#475569;font-size:12px}
.ink-editor-content code,.ink-post-content code{font-family:'Consolas','Monaco','Courier New',monospace;font-size:0.9em}
.ink-editor-content :not(pre) > code,.ink-post-content :not(pre) > code{padding:2px 6px;background:rgba(0,240,144,0.1);color:#00f090;border-radius:4px}

/* 帖子内容中的图片 */
.ink-post-content{overflow:hidden;border-radius:8px}
.ink-post-content img{max-width:100% !important;width:auto !important;height:auto !important;max-height:500px;border-radius:8px;margin:8px 0;display:block !important;float:none !important;position:static !important;left:auto !important;right:auto !important;top:auto !important;bottom:auto !important;cursor:pointer;object-fit:contain}
.ink-post-content img:hover{opacity:0.9}
.ink-post-content p{margin:0 0 8px}
.ink-post-content p:last-child{margin-bottom:0}
.ink-post-content ul,.ink-post-content ol{margin:8px 0;padding-left:24px}
.ink-post-content li{margin:4px 0}
.ink-post-content blockquote{margin:8px 0;padding:8px 12px;border-left:3px solid rgba(0,240,144,0.4);background:rgba(0,240,144,0.05);color:#94a3b8;border-radius:0 6px 6px 0}
.ink-post-content blockquote p{margin:0}
.ink-post-content a{color:#00f090;text-decoration:underline}
.ink-post-content h1,.ink-post-content h2,.ink-post-content h3{margin:12px 0 8px;color:#f1f5f9;font-weight:600}

/* 帖子内容样式重置 - 覆盖粘贴内容的内联样式 */
.ink-post-content,
.ink-post-content * {
    background-color: transparent !important;
    background: none !important;
    color: inherit !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: normal !important;
    line-height: inherit !important;
    text-align: left !important;
    float: none !important;
}

.ink-post-content h1, .ink-post-content h2, .ink-post-content h3,
.ink-post-content h4, .ink-post-content h5, .ink-post-content h6 {
    font-weight: 600 !important;
    color: #f1f5f9 !important;
}

.ink-post-content strong, .ink-post-content b {
    font-weight: 600 !important;
}

.ink-post-content em, .ink-post-content i {
    font-style: italic !important;
}

.ink-post-content code, .ink-post-content pre code {
    font-family: 'Consolas','Monaco','Courier New',monospace !important;
    font-size: 0.9em !important;
}

.ink-post-content pre code {
    color: #e2e8f0 !important;
}

.ink-post-content a {
    color: #00f090 !important;
}

.ink-post-content blockquote {
    color: #94a3b8 !important;
    background: rgba(0,240,144,0.05) !important;
}

/* 图片标题居中 */
.ink-post-content figure,
.ink-editor-content figure {
    margin:8px 0;
    text-align:center;
}
.ink-post-content figcaption,
.ink-editor-content figcaption {
    display:block;
    text-align:center !important;
    font-size:13px;
    color:#94a3b8 !important;
    margin-top:6px;
    padding:0 8px;
    line-height:1.5;
}
.ink-post-content figure img,
.ink-editor-content figure img {
    margin:0 auto;
}
