* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    max-width: 800px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

p {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

.input-section, .output-section {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea[readonly] {
    background-color: #f8f9fa;
    cursor: default;
}

.file-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.file-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.file-input-group label {
    margin-bottom: 0;
    font-weight: 600;
}

input[type="file"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

#fileName {
    color: #666;
    font-size: 14px;
}

.button-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

button:active {
    transform: translateY(0);
}

.button-section button:nth-child(1) {
    background: #4CAF50;
    color: white;
}

.button-section button:nth-child(2) {
    background: #2196F3;
    color: white;
}

.button-section button:nth-child(3) {
    background: #FF9800;
    color: white;
}

.button-section button:nth-child(4) {
    background: #f44336;
    color: white;
}

.output-section button {
    background: #9C27B0;
    color: white;
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .button-section {
        flex-direction: column;
    }
    
    button {
        min-width: unset;
    }
}