:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --light-gray: #f5f5f5;
    --dark-gray: #333;
    --medium-gray: #757575;
    --border-color: #ddd;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f9f9f9;
    color: var(--dark-gray);
    line-height: 1.6;
    padding: 20px;
}

.translator-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

h1 i {
    margin-right: 10px;
}

.language-selectors {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

.language-selector {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--medium-gray);
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    background-color: white;
    transition: border 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.app-footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: var(--medium-gray);
    font-size: 14px;
}

.app-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.app-footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.swap-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.swap-btn:hover {
    background-color: #3367d6;
}

.text-areas {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.text-area-container {
    flex: 1;
    position: relative;
}

textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    resize: none;
    font-size: 16px;
    transition: border 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

#translated-text {
    background-color: var(--light-gray);
}

.text-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: var(--medium-gray);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px 5px;
    border-radius: 3px;
}

.action-buttons {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.icon-btn {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--medium-gray);
    transition: all 0.3s;
}

.icon-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.translate-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 30px;
}

.translate-btn:hover {
    background-color: #3367d6;
}

.translate-btn i {
    margin-right: 8px;
}

.translation-history {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.translation-history h3 {
    margin-bottom: 15px;
    color: var(--medium-gray);
}

#history-list {
    list-style: none;
}

#history-list li {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.3s;
}

#history-list li:hover {
    background-color: var(--light-gray);
}

.history-item {
    display: flex;
    justify-content: space-between;
}

.history-text {
    flex: 1;
}

.history-delete {
    color: var(--accent-color);
    margin-left: 10px;
}

@media (max-width: 768px) {
    .text-areas {
        flex-direction: column;
    }
    
    .language-selectors {
        flex-direction: column;
    }
    
    .swap-btn {
        transform: rotate(90deg);
        margin: 10px 0;
    }
}
