/* Markdown编辑器样式 */
.editor-container {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #4a5568;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.toolbar-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.toolbar-btn i {
    margin-right: 4px;
}

.editor-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 0;
}

.editor-panel {
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 10px 15px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-scroll-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: normal;
}

.sync-scroll-toggle .switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.sync-scroll-toggle .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sync-scroll-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: .4s;
    border-radius: 22px;
}

.sync-scroll-toggle .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.sync-scroll-toggle input:checked + .slider {
    background-color: #667eea;
}

.sync-scroll-toggle input:checked + .slider:before {
    transform: translateX(22px);
}

.new-feature-badge {
    background: #f6ad55;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.markdown-input {
    width: 100%;
    min-height: 500px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.markdown-input:focus {
    outline: none;
    border-color: #667eea;
}

.markdown-preview {
    min-height: 500px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    background: #fff;
    overflow-y: auto;
}

/* Markdown预览样式 */
.markdown-preview h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 20px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.markdown-preview h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 18px 0 12px;
}

.markdown-preview h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 16px 0 10px;
}

.markdown-preview p {
    margin: 10px 0;
    line-height: 1.8;
}

.markdown-preview code {
    background: #f7fafc;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e83e8c;
}

.markdown-preview pre {
    background: #2d3748;
    color: #fff;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
}

.markdown-preview pre code {
    background: transparent;
    color: #fff;
    padding: 0;
}

.markdown-preview blockquote {
    border-left: 4px solid #667eea;
    padding-left: 15px;
    margin: 15px 0;
    color: #718096;
    font-style: italic;
}

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

.markdown-preview li {
    margin: 5px 0;
}

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

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

.markdown-preview table th {
    background: #f7fafc;
    font-weight: 600;
}

.markdown-preview a {
    color: #667eea;
    text-decoration: none;
}

.markdown-preview a:hover {
    text-decoration: underline;
}

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

@media (max-width: 992px) {
    .editor-panels {
        grid-template-columns: 1fr;
    }
    
    .toolbar-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .editor-toolbar {
        gap: 3px;
    }
    
    .toolbar-btn {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .toolbar-btn i {
        margin-right: 2px;
    }
    
    }