/* Language Selector Styles */
.language-selector {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 1000;
}

/* Current language button */
.lang-current {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 70px;
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.lang-text {
    font-weight: 600;
}

.lang-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

.language-selector.open .lang-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: rgba(0, 33, 71, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.language-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    text-align: left;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.lang-option:first-child {
    border-radius: 4px 4px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 4px 4px;
}

.lang-option.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
}

/* Responsive styles */
@media (max-width: 768px) {
    .language-selector {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 10000;
    }

    .lang-current {
        padding: 5px 10px;
        font-size: 0.7rem;
        min-width: 55px;
        gap: 5px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .lang-dropdown {
        min-width: 100px;
        right: 0;
        left: auto;
    }

    .lang-option {
        padding: 12px 16px;
        font-size: 0.8rem;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* Dark mode support */
body.dark-mode .lang-current {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .lang-current:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

body.dark-mode .lang-dropdown {
    background: rgba(0, 33, 71, 0.98);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .lang-option.active {
    background: rgba(255, 255, 255, 0.12);
}

/* Ensure header has relative positioning for absolute positioning to work */
header {
    position: relative;
}
