/* 博客编辑器样式 */
.blog-editor-container {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: #fff;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    flex-wrap: wrap;
}

.editor-toolbar .btn {
    border: 1px solid #ced4da;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.editor-toolbar .btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.toolbar-divider {
    width: 1px;
    height: 1.5rem;
    background: #dee2e6;
    margin: 0 0.5rem;
}

.editor-content {
    position: relative;
}

.editor-area textarea {
    border: none;
    border-radius: 0;
    resize: vertical;
    min-height: 300px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.editor-area textarea:focus {
    box-shadow: none;
    outline: none;
}

.preview-area {
    padding: 1rem;
    min-height: 300px;
    background: #f8f9fa;
    overflow-y: auto;
}

.preview-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.preview-content h1,
.preview-content h2,
.preview-content h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.preview-content h1 {
    font-size: 1.75rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.preview-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.25rem;
}

.preview-content h3 {
    font-size: 1.25rem;
}

.preview-content p {
    margin-bottom: 1rem;
}

.preview-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin-left: 0;
    color: #6c757d;
    font-style: italic;
}

.preview-content code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #e83e8c;
}

.preview-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.preview-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.preview-content ul,
.preview-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.preview-content li {
    margin-bottom: 0.25rem;
}

.preview-content a {
    color: #007bff;
    text-decoration: none;
}

.preview-content a:hover {
    text-decoration: underline;
}

.preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.preview-content strong {
    font-weight: 600;
}

.preview-content em {
    font-style: italic;
}

.editor-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    font-size: 0.75rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .editor-toolbar {
        gap: 0.125rem;
        padding: 0.25rem;
    }
    
    .editor-toolbar .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .preview-area {
        padding: 0.5rem;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .blog-editor-container {
        border-color: #495057;
        background: #343a40;
    }
    
    .editor-toolbar {
        background: #495057;
        border-color: #6c757d;
    }
    
    .editor-area textarea {
        background: #343a40;
        color: #f8f9fa;
    }
    
    .preview-area {
        background: #495057;
        color: #f8f9fa;
    }
    
    .preview-content code {
        background: #6c757d;
        color: #f8f9fa;
    }
    
    .preview-content pre {
        background: #6c757d;
    }
    
    .editor-footer {
        background: #495057;
        border-color: #6c757d;
    }
}