/* Language Selector Styles */
.language-selector {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(13, 13, 20, 0.7);
    border: 1.5px solid rgba(82, 39, 255, 0.5);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(82, 39, 255, 0.15);
    backdrop-filter: blur(15px);
}

.lang-toggle:hover {
    background: rgba(82, 39, 255, 0.2);
    border-color: rgba(82, 39, 255, 0.8);
    box-shadow: 0 6px 25px rgba(82, 39, 255, 0.3);
    transform: translateY(-1px);
}

.lang-toggle i {
    color: #B19EEF;
    font-size: 14px;
}

.current-lang {
    font-size: 16px;
    line-height: 1;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(13, 13, 20, 0.95);
    border: 1.5px solid rgba(82, 39, 255, 0.4);
    border-radius: 12px;
    padding: 6px;
    min-width: 160px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(82, 39, 255, 0.2);
    backdrop-filter: blur(25px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: left;
}

.lang-option:hover {
    background: rgba(82, 39, 255, 0.2);
    transform: translateX(3px);
}

.lang-option.active {
    background: linear-gradient(135deg, rgba(82, 39, 255, 0.3), rgba(255, 159, 252, 0.2));
    font-weight: 600;
}

.lang-option.active::after {
    content: '✓';
    margin-left: auto;
    color: #FF9FFC;
    font-weight: bold;
    font-size: 16px;
}

.lang-flag {
    font-size: 18px;
    line-height: 1;
}

.lang-name {
    color: #E0E0E0;
    flex: 1;
}

/* Translation Toast */
.translation-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(82, 39, 255, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 159, 252, 0.3);
}

.translation-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-selector {
        top: 80px;
        right: 15px;
    }

    .lang-toggle {
        padding: 6px 10px;
        font-size: 12px;
    }

    .lang-toggle i {
        font-size: 13px;
    }

    .current-lang {
        font-size: 14px;
    }

    .lang-dropdown {
        min-width: 140px;
    }

    .lang-option {
        padding: 8px 10px;
        font-size: 13px;
    }

    .lang-flag {
        font-size: 16px;
    }
}

/* Loading Animation */
@keyframes translatePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.translating {
    animation: translatePulse 1.5s ease-in-out infinite;
}

/* Loading Animation */
@keyframes translatePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.translating {
    animation: translatePulse 1.5s ease-in-out infinite;
}

/* Glow effect for language selector */
.lang-toggle::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(82, 39, 255, 0.3), rgba(255, 159, 252, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(8px);
}

.lang-toggle:hover::before {
    opacity: 1;
}
