/* Language Selector Styles */
.language-selector {
    margin-left: 20px;
    display: inline-flex;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 35px;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.language-selector select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.language-selector select option {
    background: var(--primary-bg, #371e10);
    color: var(--text-primary, #ffffff);
    padding: 10px;
}

/* Button style from the new design */
.language-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 35px;
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.language-btn .flag {
    font-size: 16px;
}

.language-btn .lang-text {
    font-size: 12px;
}

/* Translation sweep animation overlay */
.translation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.translation-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sweep-light {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 20%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.1) 80%,
            transparent 100%);
    transform: skewX(-20deg);
    transition: none;
}

.sweep-light.sweeping {
    animation: sweepAcross 1.2s ease-in-out forwards;
}

@keyframes sweepAcross {
    0% {
        left: -100%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Glass reflection effect */
.sweep-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    width: 20%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.8) 50%,
            transparent 100%);
    filter: blur(2px);
}

/* Responsive styles for the language button */
@media (max-width: 768px) {
    .language-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 70px;
        top: 15px;
        right: 15px;
    }
    
    .language-btn .flag {
        font-size: 14px;
    }
    
    .language-btn .lang-text {
        font-size: 10px;
        margin-left: 4px;
    }
}

@media (max-width: 480px) {
    .language-btn {
        width: 40px;
        height: 40px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        padding: 10px;
        font-size: 10px;
        border-radius: 50%;
        line-height: 20px;
        min-width: 45px;
        top: 20px;
        right: 20px;
    }
    
    .language-btn .flag {
        font-size: 12px;
    }
    
    .language-btn .lang-text {
        font-size: 9px;
    }
}