* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    color: #2c3e50;
    font-size: 24px;
}

.mode-switch {
    display: flex;
    gap: 10px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

button.active {
    background-color: #2c3e50;
    color: white;
}

main {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: calc(100vh - 120px);
}

#editor, #preview {
    display: none;
    height: 100%;
    padding: 20px;
}

#editor.active, #preview.active {
    display: block;
}

#markdown-input {
    width: 100%;
    height: calc(100vh - 180px);
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
}

#preview {
    padding: 20px;
}

#preview h1, #preview h2, #preview h3 {
    margin: 1em 0 0.5em;
}

#preview p {
    margin-bottom: 1em;
}

#preview code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

#preview pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1em 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #markdown-input {
        height: calc(100vh - 200px);
    }
} 