/* Language Selector Styles */
.language-switcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Button Style Language Selector */
.language-buttons {
    display: flex;
    gap: 0.5rem;
    background: var(--glass-bg);
    padding: 0.25rem;
    border-radius: 25px;
    border: 1px solid var(--glass-border);
}

.language-btn {
    padding: 0.4rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    font-family: inherit;
}

.language-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.language-btn.active {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
}

.language-btn.active::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--primary-gradient);
    border-radius: 20px;
    opacity: 0.2;
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.1);
        opacity: 0;
    }
}

/* Flag icons */
.language-btn::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 15px;
    margin-right: 0.5rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

.language-btn[data-lang="pt"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 480'%3E%3Cpath fill='%23060' d='M0 0h640v480H0z'/%3E%3Cpath fill='%23ff0' d='M256 120l128 240-208-150h256L224 360z'/%3E%3Cpath fill='%23009' d='M256 180a60 60 0 1 0 0 120 60 60 0 0 0 0-120z'/%3E%3C/svg%3E");
}

.language-btn[data-lang="en"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 480'%3E%3Cg fill-rule='evenodd'%3E%3Cg stroke-width='1pt'%3E%3Cpath fill='%23bd3d44' d='M0 0h972.81v38.959H0zm0 77.918h972.81v38.96H0zm0 77.919h972.81v38.959H0zm0 77.918h972.81v38.96H0zm0 77.919h972.81v38.959H0zm0 77.918h972.81v38.96H0zm0 77.92h972.81v38.958H0z'/%3E%3Cpath fill='%23fff' d='M0 38.96h972.81v38.958H0zm0 77.918h972.81v38.959H0zm0 77.918h972.81v38.96H0zm0 77.92h972.81v38.958H0zm0 77.918h972.81v38.959H0zm0 77.918h972.81v38.96H0z'/%3E%3C/g%3E%3Cpath fill='%23192f5d' d='M0 0h389.124v272.421H0z'/%3E%3C/g%3E%3C/svg%3E");
}

/* Dropdown Style Language Selector (Alternative) */
.language-select-wrapper {
    position: relative;
    display: inline-block;
}

.language-select {
    appearance: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.language-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 206, 209, 0.3);
}

.language-select:focus {
    outline: none;
    border-color: rgba(0, 206, 209, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 206, 209, 0.1);
}

.language-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .language-buttons {
        padding: 0.2rem;
    }
    
    .language-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .language-btn::before {
        width: 16px;
        height: 12px;
        margin-right: 0.3rem;
    }
}

@media (max-width: 480px) {
    .language-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .language-btn::before {
        display: none;
    }
}