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

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.container {
    width: 90%;
    max-width: 650px;
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 8px;
}

.subtitle {
    color: #777;
    margin-bottom: 25px;
}

textarea {
    width: 100%;
    height: 140px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    resize: none;
    font-size: 16px;
    outline: none;
}

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

.language-section {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 15px;
    margin: 25px 0;
}

.language-section div {
    flex: 1;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
}

#swapButton {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #667eea;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

#translateButton {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #667eea;
    color: white;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

#translateButton:hover,
#copyButton:hover,
#swapButton:hover {
    opacity: 0.9;
}

.result-box {
    margin-top: 25px;
    padding: 20px;
    min-height: 100px;
    background: #f5f6ff;
    border-radius: 12px;
    text-align: left;
}

.result-box h3 {
    margin-bottom: 10px;
    color: #444;
}

#resultText {
    color: #555;
    line-height: 1.5;
}

#copyButton {
    margin-top: 15px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #333;
    color: white;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.action-buttons button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #333;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.action-buttons button:hover {
    opacity: 0.85;
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }

    .language-section {
        flex-direction: column;
        align-items: stretch;
    }

    #swapButton {
        align-self: center;
    }

    .action-buttons {
        flex-wrap: wrap;
    }
}