.simple-editor {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1450px;
    min-width: 320px;
    height: 400px;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 19891015;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: all 0.3s ease;
}

.simple-editor.embed {
    position: static !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}


.simple-editor-resizer {
    height: 10px;
    background: #08c;
    cursor: row-resize;
    position: relative;
}

.simple-editor-resizer::before {
    content: "";
    display: block;
    width: 1.5em;
    border-top: 3px double #66ccff;
    margin: 3px auto auto;
}

.simple-editor-resizer::before {
    top: 4px;
}

.simple-editor-resizer::after {
    top: 8px;
}

.simple-editor-toolbar {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #f8f9fa;
    gap: 8px;
}

.simple-editor-previewTool {
    box-sizing: border-box;
    display: inline-flex; /* 关键：用 flex 布局 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    transition: border-color 0.2s;
}

.simple-editor-btn-close {
    margin-left: auto;
    border: 2px solid #cccccc00;
    border-radius: 50%;
    padding: 8px;
    box-sizing: border-box;
    display: inline-flex; /* 关键：用 flex 布局 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    transition: border-color 0.2s;
    height: 30px;
    width: 30px;
}

.simple-editor-btn-close:hover {
    border-color: #ccc;
}

.simple-editor-md-demo {
    margin-left: auto;
}

.simple-editor-content {
    flex: 1;
    display: flex;
    min-height: 0;
    border-bottom: 1px solid #e1e4e8;
    border-top: 1px solid #e1e4e8;
}

.simple-editor-input,
.simple-editor-preview {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 16px;
    box-sizing: border-box;
    background: transparent;
    color: #333333;
    line-height: 1.5;
}

.simple-editor-input {
    border-right: 1px solid #e1e4e8;
    resize: none;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.simple-editor-preview {
    background: #f8f9fa;
    overflow-y: auto;
    word-break: break-word;
    padding: 16px;
}

@media screen and (max-width: 992px) {
    .simple-editor {
        width: 100vw;
        min-width: 0;
        left: 0;
        transform: none;
        border-radius: 0;
    }

    .simple-editor-content {
        flex-direction: column;
    }

    .simple-editor-input {
        border-right: none;
        border-bottom: 1px solid #e1e4e8;
        min-height: 150px;
    }
}

.dark .simple-editor {
    background: #1e1e1e;
}

.dark .simple-editor-resizer {
    background: #08c;
}

.dark .simple-editor-toolbar {
    background: #1e1e1e;
}

.dark .simple-editor-content {
    border-bottom: 1px solid rgb(225 228 232 / 20%);
    border-top: 1px solid rgb(225 228 232 / 20%);
}

.dark .simple-editor-input {
    background: #313131;
    color: rgba(255, 255, 255, 0.5);
    border-right: 1px solid rgb(225 228 232 / 20%);
}

.dark .simple-editor-preview {
    background: #1e1e1e;
    color: rgba(255, 255, 255, 0.5);
}