/* ===================== markdown.css ===================== */

.md-modal-content { max-width: 860px; width: 92%; margin: 3% auto; display: flex; flex-direction: column; max-height: 92vh; }
.md-modal-content.fullscreen { margin: 0; width: 100%; max-width: none; height: 100%; max-height: 100vh; border-radius: 0; }

.md-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--bg-card-hover); border-bottom: 1px solid var(--border);
}
.md-tool-btn { background: none; border: 1px solid var(--border); color: var(--text-secondary); border-radius: 5px; padding: 4px 10px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s; }
.md-tool-btn:hover { background: var(--bg-card-hover); color: #3182ce; border-color: #3182ce; }

.md-body { flex: 1; overflow-y: auto; min-height: 0; }
.md-rendered { padding: 24px 32px; max-width: 760px; margin: 0 auto; }
#mdRawTextarea { width: 100%; height: 100%; min-height: 400px; padding: 20px; font-family: 'Consolas','Monaco',monospace; font-size: 13.5px; line-height: 1.7; background: #1e1e2e; color: #cdd6f4; border: none; outline: none; resize: none; }

/* Markdown 渲染样式 */
.md-h1 { font-size: 2em; font-weight: 700; color: #2d3748; margin: 0.8em 0 0.4em; border-bottom: 2px solid var(--border); padding-bottom: 0.3em; }
.md-h2 { font-size: 1.5em; font-weight: 700; color: #2d3748; margin: 0.8em 0 0.4em; border-bottom: 1px solid var(--border); padding-bottom: 0.2em; }
.md-h3 { font-size: 1.25em; font-weight: 600; color: #2d3748; margin: 0.7em 0 0.3em; }
.md-h4,.md-h5,.md-h6 { font-size: 1em; font-weight: 600; color: var(--text-primary); margin: 0.6em 0 0.3em; }
.md-p { color: var(--text-primary); line-height: 1.8; margin: 0.6em 0; }
.md-ul, .md-ol { padding-left: 2em; margin: 0.6em 0; color: var(--text-primary); line-height: 1.8; }
.md-ul li, .md-ol li { margin: 0.2em 0; }
.md-blockquote { border-left: 4px solid #3182ce; padding: 8px 16px; margin: 12px 0; background: rgba(0,102,255,0.1); border-radius: 0 6px 6px 0; color: var(--text-primary); }
.md-hr { border: none; border-top: 2px solid var(--border); margin: 20px 0; }
pre { background: #1e1e2e; border-radius: 8px; padding: 16px; overflow-x: auto; margin: 12px 0; position: relative; }
pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 12px; font-size: 11px; color: var(--text-secondary); text-transform: uppercase; font-family: monospace; }
.md-code-block { color: #cdd6f4; font-family: 'Consolas','Monaco',monospace; font-size: 13px; line-height: 1.65; }
.md-code { background: var(--bg-card-hover); color: #805ad5; padding: 1px 5px; border-radius: 4px; font-family: 'Consolas','Monaco',monospace; font-size: 0.9em; }
.md-link { color: #3182ce; text-decoration: none; }
.md-link:hover { text-decoration: underline; }
.md-img { max-width: 100%; border-radius: 8px; margin: 8px 0; display: block; }
.md-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.md-table th { background: var(--bg-card-hover); padding: 10px 14px; text-align: left; font-weight: 600; color: var(--text-primary); border: 1px solid var(--border); }
.md-table td { padding: 9px 14px; border: 1px solid var(--border); color: var(--text-primary); }
.md-table tbody tr:hover { background: var(--bg-card-hover); }

.md-loading { display: flex; flex-direction: column; align-items: center; padding: 60px 0; color: var(--text-secondary); }
.md-loading p { margin-top: 12px; }
.md-error { color: #f56565; padding: 20px; }

.md-footer-info { display: flex; gap: 8px; align-items: center; }
.md-info-tag { font-size: 12px; color: var(--text-secondary); background: var(--bg-card-hover); padding: 2px 8px; border-radius: 10px; border: 1px solid var(--border); }

/* 快速粘贴 */
.md-quick-content { max-width: 660px; width: 92%; margin: 6% auto; }
#mdQuickTextarea { width: 100%; min-height: 240px; max-height: 400px; background: #1e1e2e; color: #cdd6f4; font-family: 'Consolas','Monaco',monospace; font-size: 13px; line-height: 1.65; border: none; outline: none; padding: 14px 16px; resize: vertical; }
#mdQuickTextarea::placeholder { color: #555577; }
