.editor-content {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
}

.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6 {
    font-weight: bold;
    margin: 1.2em 0 0.6em;
    line-height: 1.3;
}

.editor-content h1 { font-size: 2em; }
.editor-content h2 { font-size: 1.75em; }
.editor-content h3 { font-size: 1.5em; }
.editor-content h4 { font-size: 1.25em; }
.editor-content h5 { font-size: 1em; }
.editor-content h6 { font-size: 0.875em; }

.editor-content p {
    margin: 0 0 1em;
}

.editor-content ul,
.editor-content ol {
    padding-left: 2em;
    margin-bottom: 1em;
}

.editor-content li {
    margin-bottom: 0.4em;
}

.editor-content strong,
.editor-content b {
    font-weight: bold;
}

.editor-content em,
.editor-content i {
    font-style: italic;
}

.editor-content u {
    text-decoration: underline;
}

.editor-content a {
    color: #007bff;
    text-decoration: underline;
}

.editor-content blockquote {
    border-left: 4px solid #ccc;
    margin: 1em 0;
    padding: 0.5em 1em;
    color: #666;
    background: #f9f9f9;
}

.editor-content code {
    background-color: #f4f4f4;
    padding: 0.2em 0.4em;
    font-family: monospace;
    font-size: 90%;
    border-radius: 3px;
}

.editor-content pre {
    background: #f4f4f4;
    padding: 1em;
    overflow: auto;
    font-size: 90%;
    border-radius: 4px;
}

.editor-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

.editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.editor-content table,
.editor-content th,
.editor-content td {
    border: 1px solid #ccc;
}

.editor-content th,
.editor-content td {
    padding: 0.6em 0.8em;
    text-align: left;
}

.editor-content hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 2em 0;
}
.editor-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

/* 浮動圖示對齊樣式 */
.editor-content img[style*="float: left"] {
    float: left;
    margin-right: 1em;
    margin-bottom: 1em;
}

.editor-content img[style*="float: right"] {
    float: right;
    margin-left: 1em;
    margin-bottom: 1em;
}

.editor-content img[style*="display: block"][style*="margin: 0 auto"] {
    display: block;
    margin: 1em auto;
}

/* 清除浮動內容容器，避免圖片浮動影響後方段落 */
.editor-content::after {
    content: "";
    display: block;
    clear: both;
}

/* 加這段會解決圖片被包在 span 裡時不居中的問題 */
.editor-content p[style*="text-align: center"] img {
    display: inline-block !important;
    margin: 0 auto !important;
    text-align: center;
}