#ai-translation-form {
    max-width: 650px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

#ai-translation-form textarea {
    width: 100%;
    height: 350px;
    margin-bottom: 0px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

#char-count {
    text-align: right;
    font-size: 0.5rem;
    color: #666;
    margin-bottom: 20px;
}

#ai-translation-form .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#ai-translation-form .language-selector {
    flex-grow: 1;
    margin-right: 10px;
}

#ai-translation-form .language-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#ai-translation-form .button {
    flex-shrink: 0;
}

#ai-translation-form .button button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#ai-translation-form button:hover {
    background-color: #005177;
}

#translation-result {
    width: 100%; /* Make it full width of its container */
    max-width: 650px; /* Match the max-width of the form */
    margin: 20px auto 0; /* Center it and add top margin */
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    box-sizing: border-box; /* Include padding and border in the width */
}

#translation-result h3 {
    margin-top: 0;
    color: #333;
}

.error-message {
    color: #d32f2f;
    background-color: #fde8e8;
    border: 1px solid #fad2d2;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
}