/* Language Selector Styles */
.language-selector {
    position: relative;
    display: inline-block;
    margin-right: 1rem;
}

.language-dropdown {
    position: relative;
}

.language-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    min-width: 80px;
}

.language-current:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.language-current.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.flag-icon {
    font-size: 1rem;
    line-height: 1;
}

.lang-code {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.dropdown-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.language-current.active .dropdown-icon {
    transform: rotate(180deg);
}

.language-options {
    position: fixed;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.language-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    text-align: left;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.language-option.active {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border-left: 3px solid #00ff88;
}

.language-option.active:hover {
    background: rgba(0, 255, 136, 0.15);
}

.lang-name {
    flex: 1;
    font-weight: 500;
}

.language-option .lang-code {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .language-selector {
        margin-right: 0.5rem;
    }
    
    .language-current {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .language-options {
        min-width: 180px;
        right: 0;
        left: auto;
    }
    
    .language-option {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Animation for smooth transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-options.show {
    animation: fadeInUp 0.3s ease;
}

/* Dark theme compatibility */
.portal-container .language-selector {
    color: white;
}

.portal-container .language-current {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.portal-container .language-current:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.portal-container .language-options {
    background: rgba(15, 15, 25, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Integration with existing header styles */
.header-content .user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-content .user-actions .language-selector {
    margin-right: 0;
}