/* 编辑器内容渲染样式 */
.tiptap-content {
    color: #213547;
    line-height: 1.6;
}

.tiptap-content img {
    max-width: 100%;
    height: auto;
}

/* 图片对齐样式 */
.tiptap-content img[data-align="left"] {
    float: left;
    margin-right: 1rem;
}

.tiptap-content img[data-align="center"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.tiptap-content img[data-align="right"] {
    float: right;
    margin-left: 1rem;
}

/* 视频样式 */
.tiptap-content video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 视频对齐样式 */
.tiptap-content video[data-align="left"] {
    float: left;
    margin-right: 1rem;
}

.tiptap-content video[data-align="center"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.tiptap-content video[data-align="right"] {
    float: right;
    margin-left: 1rem;
}

.tiptap-content p {
    margin: 0 0 0.5rem;
    color: #213547;
}

.tiptap-content h1,
.tiptap-content h2,
.tiptap-content h3,
.tiptap-content h4 {
    margin: 1rem 0 0.5rem;
    color: #213547;
    line-height: 1.3;
}

.tiptap-content a{
    font-weight: 500;
    color: #646cff;
    text-decoration: inherit;
}

.tiptap-content a:hover{
    color: #646cff;
}

.tiptap-content h1 {
    font-size: 2rem;
    font-weight: 700;
}

.tiptap-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

.tiptap-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.tiptap-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

.tiptap-content ul,
.tiptap-content ol {
    margin: 0 0 0.5rem;
    padding-left: 1.5rem;
    color: #213547;
}

.tiptap-content blockquote {
    border-left: 3px solid #ccc;
    margin: 0 0 0.5rem;
    padding-left: 0.8rem;
    color: #213547;
    font-style: italic;
}

.tiptap-content pre {
    background: #f8f8f8;
    color: #213547;
    font-family: 'JetBrainsMono', monospace;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0 0 0.5rem;
    overflow-x: auto;
}

.tiptap-content pre code {
    color: inherit;
    padding: 0;
    background: none;
    font-size: 0.8rem;
}

.tiptap-content code {
    background-color: #f0f0f0;
    border-radius: 0.25em;
    padding: 0.125rem 0.25rem;
    font-family: 'JetBrainsMono', monospace;
    color: #213547;
}

.tiptap-content a {
    color: #0088ff;
    text-decoration: underline;
}

.tiptap-content a:hover {
    color: #0066cc;
}

/* 表格样式 */
.tiptap-content table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    margin: 1rem 0;
}

.tiptap-content table td,
.tiptap-content table th {
    min-width: 1em;
    padding: 8px 12px;
    vertical-align: top;
    box-sizing: border-box;
    position: relative;
}

/* 根据data-has-border属性控制边框显示 */
.tiptap-content table[data-has-border="true"] td,
.tiptap-content table[data-has-border="true"] th {
    border: 2px solid #ced4da;
}

.tiptap-content table[data-has-border="false"] td,
.tiptap-content table[data-has-border="false"] th {
    border: 2px solid transparent;
}

/* 默认情况下显示边框（向后兼容） */
.tiptap-content table td,
.tiptap-content table th {
    border: 2px solid #ced4da;
}

/* 根据data-width-auto属性控制表格宽度 */
.tiptap-content table[data-width-auto="false"] {
    table-layout: auto;
}

.tiptap-content table th {
    font-weight: bold;
    text-align: left;
    background-color: #f1f3f5;
}

/* 占位符图片样式 */
.tiptap-content img[alt="占位符图片"] {
    opacity: 0.7;
    border: 2px dashed #ccc;
}