/* ===== Language Selector (topbar - always dark bg) ===== */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    outline: none;
    font-family: inherit;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(240, 116, 0, 0.4);
}

.lang-btn:focus-visible {
    border-color: rgba(240, 116, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(240, 116, 0, 0.2);
}

.lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    flex-shrink: 0;
}

.lang-code {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.75);
}

.lang-arrow {
    transition: transform 0.2s ease;
    opacity: 0.5;
    color: rgba(255, 255, 255, 0.7);
}

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

/* Dropdown */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: rgba(40, 40, 40, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 1002;
    animation: langSlideIn 0.2s ease;
    padding: 4px;
}

@keyframes langSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

.lang-option.active {
    color: #F07400;
    font-weight: 600;
}

.lang-option.active:hover {
    background: rgba(240, 116, 0, 0.08);
}

.lang-check {
    margin-left: auto;
    color: #F07400;
    flex-shrink: 0;
}

/* Responsive: hide text on mobile, show only flag */
@media (max-width: 480px) {
    .lang-code {
        display: none;
    }

    .lang-arrow {
        display: none;
    }

    .lang-btn {
        padding: 6px 8px;
    }
}
