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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-section, .preview-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.toolbar {
    background: #34495e;
    color: white;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.toolbar button {
    background: #3498db;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.toolbar button:hover {
    background: #2980b9;
}

#markdownInput {
    width: 100%;
    height: 400px;
    border: none;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    resize: none;
    outline: none;
}

#preview {
    height: 400px;
    padding: 20px;
    overflow-y: auto;
    border: none;
}

#preview h1, #preview h2, #preview h3 {
    margin: 20px 0 10px 0;
    color: #2c3e50;
}

#preview p {
    margin-bottom: 15px;
    line-height: 1.6;
}

#preview ul, #preview ol {
    margin: 15px 0;
    padding-left: 30px;
}

#preview code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

#preview pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.action-bar {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#convertBtn, #copyBtn {
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    min-width: 180px;
}

#convertBtn {
    background: #27ae60;
    color: white;
}

#convertBtn:hover {
    background: #229954;
}

#convertBtn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

#copyBtn {
    background: #3498db;
    color: white;
}

#copyBtn:hover {
    background: #2980b9;
}

#copyBtn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

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

    #markdownInput, #preview {
        height: 300px;
    }

    .action-bar {
        flex-direction: column;
        align-items: center;
    }

    #convertBtn, #copyBtn {
        width: 100%;
        max-width: 300px;
        margin: 5px 0;
    }
}