.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: calc(100vh - 40px);
}

.toolbar {
    display: flex;
    gap: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.tool-group {
    display: flex;
    gap: 5px;
    padding: 0 10px;
    border-right: 1px solid #ddd;
}

.tool-group:last-child {
    border-right: none;
}

.toolbar button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toolbar button:hover {
    background-color: #e9ecef;
}

.editor-container {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

.editor-section,
.preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

#editor {
    flex: 1;
    padding: 15px;
    border: none;
    resize: none;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
}

#preview {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: white;
}

.status-bar {
    display: flex;
    gap: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

/* 主题样式 */
.theme-dark {
    background-color: #1e1e1e;
    color: #d4d4d4;
}

.theme-dark #editor {
    background-color: #1e1e1e;
    color: #d4d4d4;
}

.theme-dark #preview {
    background-color: #252526;
    color: #d4d4d4;
}

.theme-dark .toolbar,
.theme-dark .status-bar {
    background-color: #333;
}

.theme-dark .toolbar button {
    background-color: #3c3c3c;
    color: #d4d4d4;
}

.theme-dark .toolbar button:hover {
    background-color: #505050;
}

/* 全屏模式 */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background-color: white;
}

.theme-dark .fullscreen {
    background-color: #1e1e1e;
}

/* Markdown样式 */
.markdown-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    word-wrap: break-word;
}

.markdown-body h1,
.markdown-body h2 {
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
}

.markdown-body code {
    padding: 0.2em 0.4em;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
}

.markdown-body pre code {
    padding: 16px;
    overflow: auto;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 6px;
    display: block;
}

.theme-dark .markdown-body code {
    background-color: #2d2d2d;
}

.theme-dark .markdown-body pre code {
    background-color: #2d2d2d;
}

@media (max-width: 768px) {
    .editor-container {
        flex-direction: column;
    }
    
    .toolbar {
        justify-content: center;
    }
} 