* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    color: #2c3e50;
    font-size: 2rem;
}

#clearBtn {
    padding: 8px 16px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

#clearBtn:hover {
    background-color: #c0392b;
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: calc(100vh - 150px);
}

.editor-section, .preview-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

#editor {
    flex: 1;
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    resize: none;
    outline: none;
}

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

/* Markdown Preview Styles */
#preview h1 { font-size: 2em; margin-bottom: 0.5em; }
#preview h2 { font-size: 1.5em; margin-bottom: 0.5em; }
#preview h3 { font-size: 1.17em; margin-bottom: 0.5em; }
#preview p { margin-bottom: 1em; }
#preview ul, #preview ol { margin-bottom: 1em; padding-left: 2em; }
#preview code { 
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}
#preview pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1em;
}
#preview blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1em;
    margin-bottom: 1em;
    color: #666;
}
#preview a {
    color: #3498db;
    text-decoration: none;
}
#preview a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    h1 {
        font-size: 1.5rem;
    }
} 