:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #f5f6fa;
    --editor-bg: #fff;
    --text-color: #2c3e50;
    --border-color: #e0e0e0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    animation: slideDown 0.5s ease;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.btn {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

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

.editor-section, .preview-section {
    background: var(--editor-bg);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.editor-section:hover, .preview-section:hover {
    transform: translateY(-5px);
}

.section-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
}

.section-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

#editor {
    width: 100%;
    height: calc(100% - 55px);
    padding: 20px;
    border: none;
    resize: none;
    font-family: 'Consolas', monospace;
    font-size: 16px;
    line-height: 1.6;
}

#editor:focus {
    outline: none;
}

#preview {
    height: calc(100% - 55px);
    padding: 20px;
    overflow-y: auto;
}

/* Markdown Preview Styles */
#preview h1, #preview h2, #preview h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

#preview p {
    margin-bottom: 1rem;
}

#preview code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
}

#preview pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

#preview blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
}

#preview ul, #preview ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

    .editor-section, .preview-section {
        height: 500px;
    }

    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}