/* Language Switcher Styles */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Arial', sans-serif;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-current {
    background: rgba(40, 46, 57, 0.95);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 140px;
    text-align: left;
}

.language-current:hover {
    background: rgba(50, 56, 67, 0.95);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.language-current::after {
    content: '▼';
    float: right;
    margin-left: 10px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.language-dropdown:hover .language-current::after {
    transform: rotate(180deg);
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(40, 46, 57, 0.98);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    margin-top: 5px;
    min-width: 140px;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

.language-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: block;
    width: 100%;
    padding: 12px 15px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.language-option:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.language-option:last-child {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.language-option:hover {
    background: rgba(154, 120, 223, 0.7);
    transform: translateX(3px);
}

.language-option.active {
    background: rgba(154, 120, 223, 0.5);
    color: #ffffff;
    font-weight: bold;
}

.language-option.active::before {
    content: '✓ ';
    margin-right: 5px;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    
    .language-current,
    .language-option {
        font-size: 14px;
        padding: 8px 12px;
        min-width: 100px;
    }
}

/* Smooth animations for language change */
.translating {
    transition: opacity 0.2s ease;
}

.translating.fade-out {
    opacity: 0.7;
}

/* Focus styles for accessibility */
.language-current:focus,
.language-option:focus {
    outline: 2px solid rgba(154, 120, 223, 0.8);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .language-current,
    .language-options {
        border-color: white;
        background: black;
    }
    
    .language-option:hover {
        background: white;
        color: black;
    }
}