/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    max-width: 690px;
    width: 100%;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.wrapper {
    border-radius: 5px;
    border: 1px solid #ccc;
}

.text-input {
    display: flex;
    border-radius: 5px;
}

.text-input .to-text {
    border-radius: 0px 5px 0px 0px;
    border-left: 1px solid #ccc;
}

.text-input textarea {
    height: 250px;
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    background: none;
    font-size: 18px;
    padding: 10px 15px;
    border-radius: 5px 0px 0px 0px;
}

.text-input textarea::placeholder {
    color: #b7b6b6;
}

.controls, li, .icons, .icons i {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.controls {
    list-style: none;
    padding: 12px 15px;
    border-top: 1px solid #ccc;
}

.controls .row .icons {
    width: 38%;
}

.controls .row .icons i {
    width: 50px;
    color: #adadad;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease;
    justify-content: center;
}

.controls .row.from .icons {
    padding-right: 15px;
    border-right: 1px solid #ccc;
}

.controls .row.to .icons {
    padding-left: 15px;
    border-left: 1px solid #ccc;
}

.controls .row select {
    color: #333;
    border: none;
    outline: none;
    font-size: 18px;
    background: none;
    padding-left: 5px;
}

.text-input textarea::-webkit-scrollbar {
    width: 4px;
}

.controls .row select::-webkit-scrollbar {
    width: 8px;
}

.text-input textarea::-webkit-scrollbar-track,
.controls .row select::-webkit-scrollbar-track {
    background: #fff;
}

.text-input textarea::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 8px;
}

.controls .row select::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 8px;
    border-right: 2px solid #ffffff;
}

.controls .exchange {
    color: #adadad;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.controls i:hover {
    color: #667eea;
    transform: scale(1.1);
}

.translate-btn {
    width: 100%;
    padding: 14px;
    outline: none;
    border: none;
    color: #fff;
    cursor: pointer;
    margin-top: 20px;
    font-size: 17px;
    border-radius: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

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

.translate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
}

.status.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status.error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.status.loading {
    background: rgba(255, 193, 7, 0.1);
    color: #FF9800;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Responsive Design */
@media (max-width: 660px) {
    .container {
        padding: 20px;
    }

    .wrapper .text-input {
        flex-direction: column;
    }

    .text-input .to-text {
        border-left: 0px;
        border-radius: 0px;
        border-top: 1px solid #ccc;
    }

    .text-input textarea {
        height: 200px;
        border-radius: 0px;
    }

    .controls .row .icons {
        display: none;
    }

    .controls .row select {
        font-size: 16px;
    }
}

/* Loading animation */
.loading-dots {
    display: inline-block;
}

.loading-dots:after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #FF9800;
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 #FF9800,
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 #FF9800,
            .5em 0 0 #FF9800;
    }
}