/* Language Switcher UI */
.lang-switcher-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    font-family: 'Space Grotesk', 'JetBrains Mono', sans-serif;
}

/* Floating Action Button (FAB) */
.lang-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lang-fab:hover {
    transform: scale(1.1);
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-fab.active {
    transform: rotate(180deg);
    background: #e2e8f0;
    color: #0f172a;
}

/* The Popup Menu */
.lang-popup {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    
    /* Animation initial state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lang-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Menu Options */
.lang-opt {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: right;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.lang-opt:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-3px);
}

.lang-opt.selected {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

.lang-opt.selected::before {
    content: "•";
    color: #38bdf8;
    margin-right: 8px;
    font-size: 1.2em;
    vertical-align: middle;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lang-switcher-wrapper {
        bottom: 20px;
        right: 20px;
    }
}
