* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 900px;
    width: 100%;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

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

.description {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

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

@media (min-width: 768px) {
    .translator-container {
        flex-direction: row;
    }
    
    .input-container, .output-container {
        width: 50%;
    }
}

.input-container, .output-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #34495e;
}

textarea, .output-area {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.5;
}

textarea {
    border: 2px solid #e0e0e0;
    resize: none;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
}

.output-area {
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    overflow-y: auto;
    position: relative;
}

.placeholder {
    color: #95a5a6;
    font-style: italic;
}

#translate-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

#translate-btn:hover {
    background-color: #2980b9;
}

#translate-btn:active {
    transform: scale(0.98);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    border-top: 4px solid #3498db;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

