* {
    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;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    width: 100%;
    padding: 30px;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5em;
}

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

.section {
    display: flex;
    flex-direction: column;
}

.section h2 {
    color: #667eea;
    font-size: 1.1em;
    margin-bottom: 10px;
}

textarea {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: none;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea.error {
    border-color: #e74c3c;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
    font-weight: 500;
}

.message.error {
    background: #fadbd8;
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.message.success {
    background: #d5f4e6;
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.message.show {
    display: block;
}

.indent-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.indent-control label {
    color: #666;
    font-weight: 500;
}

.indent-control input {
    width: 60px;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
        min-height: 300px;
    }

    h1 {
        font-size: 1.8em;
    }

    .controls {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}
