﻿.translate-widget {
    position: relative;
    float: left;
    margin: 1.2rem 0 0 2rem;
    /*right: 80px;
    bottom: 30px;
    z-index: 9999;*/
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.translate-trigger {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    font-size: 11px;
    border: none;
}

.translate-trigger:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.45);
}

.translate-trigger svg {
    margin-bottom: 2px;
}

.translate-menu {
    position: absolute;
    z-index: 9999;
    top: 60px;
    left: -72px;
    width: 200px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.translate-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.translate-header {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.translate-menu ul {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.translate-menu li {
    padding: 11px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    border-radius: 10px;
    margin: 2px 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.translate-menu li:hover {
    background: #f0f7ff;
    color: #0066cc;
}

.translate-menu li.active {
    background: #0066cc;
    color: #fff;
}

.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 18px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 3px;
    margin-right: 8px;
    font-family: Arial, sans-serif;
}

.translate-divider {
    height: 1px;
    background: #eee;
    margin: 6px 0;
}

.translate-cancel {
    padding: 12px 16px;
    text-align: center;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.translate-cancel:hover {
    color: #333;
    background: #f8f9fa;
}

.translate-tip {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #333;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s;
}

.translate-tip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.translate-tip.error {
    background: #e53935;
}

@media (max-width: 768px) {
    .translate-widget {
        margin-top: 0.8rem;
    }

    .translate-trigger {
        width: 48px;
        height: 48px;
    }

    .translate-trigger span {
        font-size: 10px;
    }

    .translate-menu {
        right: -40px;
        width: 180px;
    }
}