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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.converter-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-area, .output-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.textarea-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

label {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
}

select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    font-size: 14px;
}

textarea {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.actions {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2980b9;
}

#convert-btn {
    padding: 12px 20px;
    font-size: 16px;
}

#copy-btn, #download-btn {
    margin-top: 10px;
    align-self: flex-end;
}

#copy-btn {
    background-color: #27ae60;
}

#copy-btn:hover {
    background-color: #219653;
}

#download-btn {
    background-color: #f39c12;
}

#download-btn:hover {
    background-color: #d35400;
}

#swap-btn {
    background-color: #9b59b6;
}

#swap-btn:hover {
    background-color: #8e44ad;
}

.instructions {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.instructions h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.instructions p {
    margin-bottom: 8px;
}

.file-import-area {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.import-label {
    margin-right: 10px;
    font-weight: 500;
}

.import-tip {
    margin-left: 10px;
    color: #666;
    font-size: 12px;
}

#file-import {
    padding: 5px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.format-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 10px;
    background-color: #f1f1f1;
    color: #333;
}

.format-markdown {
    background-color: #5bc0de;
    color: #fff;
}

.format-doc {
    background-color: #f0ad4e;
    color: #fff;
}

.detected-format {
    font-style: italic;
    color: #555;
    margin-left: 5px;
    font-size: 14px;
    font-weight: normal;
}

@media (min-width: 768px) {
    .converter-container {
        flex-direction: row;
    }
    
    .actions {
        flex-direction: column;
        justify-content: center;
    }
    
    #copy-btn, #download-btn {
        display: inline-block;
        margin-left: 10px;
    }
} 