/* Markdown编辑器三栏布局 */
#markdown-editor-container {
    display: none;
    width: 100%;
    height: 100%;
    display: flex;
    background-color: #fff;
    overflow: hidden;
}

/* 左侧编辑器样式 */
.markdown-editor-left {
    width: 38%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
    overflow: hidden;
}

/* 编辑器头部 */
.editor-header {
    background-color: #f5f5f5;
    padding: 10px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.editor-header h4 {
    margin: 0;
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

/* 编辑器工具按钮 */
.editor-tools-m {
    display: flex;
    gap: 5px;
}

.tool-btn-m {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tool-btn-m:hover {
    background-color: #f0f0f0;
    border-color: #2AAE67;
}

/* Markdown编辑器 */
#markdown-editor {
    flex: 1;
    padding: 15px;
    border: none;
    resize: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    background-color: #fff;
}

/* 中间预览区域 */
.markdown-editor-middle {
    width: 38%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
    overflow: hidden;
}

/* 预览头部 */
.preview-header {
    background-color: #f5f5f5;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h4 {
    margin: 0;
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

/* 预览工具按钮 */
.preview-tools {
    display: flex;
    gap: 5px;
}

.btn {
    padding: 7px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

.btn-primary {
    background-color: #2AAE67;
    color: white;
}

.btn-primary:hover {
    background-color: #259659;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 预览内容 */
#markdown-preview {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    background-color: #fff;
}

/* 右侧主题区域 */
.markdown-editor-right {
    width: 24%;

    background-color: #f9f9f9;
    overflow: hidden;
}

.markdown-editor-right h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    padding:15px;
}

/* 主题列表 */
.theme-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    font-size: 12px;
    padding: 20px;
}

/* 主题项 */
.theme-item {

    padding: 8px 24px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-item.active {
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #10b10b;
}

/* 主题颜色 */
.theme-item[data-theme="tech-blue"] {
    background-color: #17a2b8;
    color: white;
}

.theme-item[data-theme="tech-blue"]:hover {
    background-color: #138496;
}

.theme-item[data-theme="emerald-green"] {
    background-color: #28a745;
    color: white;
}

.theme-item[data-theme="emerald-green"]:hover {
    background-color: #218838;
}

.theme-item[data-theme="vitality-orange"] {
    background-color: #fd7e14;
    color: white;
}

.theme-item[data-theme="vitality-orange"]:hover {
    background-color: #e0a800;
}

.theme-item[data-theme="lemon-yellow"] {
    background-color: #ffc107;
    color: #333;
}

.theme-item[data-theme="lemon-yellow"]:hover {
    background-color: #e0a800;
}

.theme-item[data-theme="cherry-pink"] {
    background-color: #e83e8c;
    color: white;
}

.theme-item[data-theme="cherry-pink"]:hover {
    background-color: #c2185b;
}

.theme-item[data-theme="medical-green"] {
    background-color: #20c997;
    color: white;
}

.theme-item[data-theme="medical-green"]:hover {
    background-color: #17a2b8;
}

/* Markdown预览样式 */
#markdown-preview h1,
#markdown-preview h2,
#markdown-preview h3,
#markdown-preview h4,
#markdown-preview h5,
#markdown-preview h6 {
    margin: 10px 0;
    color: #333;
    font-weight: bold;
}

#markdown-preview h1 {
    font-size: 24px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

#markdown-preview h2 {
    font-size: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

#markdown-preview h3 {
    font-size: 18px;
}

#markdown-preview h4 {
    font-size: 16px;
}

#markdown-preview h5 {
    font-size: 14px;
}

#markdown-preview h6 {
    font-size: 12px;
    color: #666;
}

#markdown-preview p {
    margin-bottom: 10px;
}

#markdown-preview ul,
#markdown-preview ol {
    margin: 10px 0;
    padding-left: 25px;
}

#markdown-preview li {
    margin-bottom: 5px;
}

#markdown-preview strong {
    font-weight: bold;
    color: #333;
}

#markdown-preview em {
    font-style: italic;
    color: #666;
}

#markdown-preview code {
    padding: 2px 4px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #c7254e;
}

#markdown-preview pre {
    margin: 10px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
}

#markdown-preview pre code {
    padding: 0;
    background-color: transparent;
    border: none;
    color: #333;
}

#markdown-preview blockquote {
    margin: 10px 0;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-left: 4px solid #2AAE67;
    color: #666;
    font-style: italic;
}

#markdown-preview table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

#markdown-preview table th,
#markdown-preview table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

#markdown-preview table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
}

#markdown-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

#markdown-preview hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}
