/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 15px;
    z-index: 1000;
}

.current-lang {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 120px;
    justify-content: space-between;
}

.current-lang:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.current-lang .arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.current-lang.active .arrow {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2c3e50;
    border: 1px solid #34495e;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    margin-top: 5px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-menu a {
    display: block;
    padding: 12px 15px;
    color: #ecf0f1;
    text-decoration: none;
    border-bottom: 1px solid #34495e;
    transition: all 0.3s ease;
    font-size: 14px;
}

.lang-menu a:last-child {
    border-bottom: none;
}

.lang-menu a:hover {
    background: #3498db;
    color: #fff;
}

.lang-menu a.active {
    background: #e74c3c;
    color: #fff;
    font-weight: bold;
}

.lang-menu a.active:hover {
    background: #c0392b;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 10px;
    }

    .current-lang {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 100px;
    }

    .lang-menu {
        min-width: 150px;
        right: -20px;
    }

    .lang-menu a {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Language notification */
.language-notification {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-size: 14px;
    border-radius: 5px;
    margin: 10px 0;
    position: relative;
    animation: fadeInNotification 0.5s ease;
}

@keyframes fadeInNotification {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-notification .close-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-notification .close-btn:hover {
    opacity: 0.7;
}

/* Loading indicator for language change */
.lang-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 5px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lang-menu {
        background: #1a252f;
        border-color: #2c3e50;
    }

    .lang-menu a {
        color: #bdc3c7;
        border-bottom-color: #2c3e50;
    }
}

/* Integration with existing header */
.header .language-switcher {
    position: absolute;
    top: 15px;
    right: 20px;
}

@media (max-width: 768px) {
    .header .language-switcher {
        position: static;
        margin: 10px auto;
        display: flex;
        justify-content: center;
    }
}