.navbar {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    min-width: 600px;
    max-width: 95%;
    /* Increased max-width to allow more horizontal space */
    height: auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    z-index: 99999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbarContainer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.navbarLogo .logoImage {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.3));
    transform: translateY(5px);
    position: relative;
    z-index: 10;
}

.navbarMenu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navbarLink {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.navbarLink:hover {
    color: #fff;
}

/* Remove the underline effect for a cleaner look or keep it subtle */
.navbarLink::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s ease;
}

.navbarLink:hover::after {
    width: 100%;
}

/* Dropdown specific */
.dropdownContainer {
    position: relative;
}

.dropdownToggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdownArrow {
    font-size: 0.6rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.dropdownContainer:hover .dropdownArrow {
    transform: rotate(180deg);
}

.dropdownMenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 24px;
    /* Much larger invisible hover bridge */
    z-index: -1;
    animation: fadeInDown 0.3s ease forwards;
}

.dropdownMenuInner {
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    min-width: 480px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Keeping pseudo element drop area as backup */
.dropdownMenuInner::before {
    content: '';
    position: absolute;
    top: -24px;
    /* Match the padding-top above */
    left: 0;
    right: 0;
    height: 24px;
}

.dropdownItem {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
}

.dropdownItem:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.dropdownItemIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.dropdownItem:hover .dropdownItemIcon {
    background: rgba(0, 240, 255, 0.1);
    color: rgba(0, 240, 255, 1);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}


.navbarActions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger {
    display: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .navbar {
        top: 1rem;
        width: 95%;
        min-width: auto;
        padding: 0.7rem 1rem;
        border-radius: 20px;
    }

    .navbarContainer {
        gap: 0.5rem;
    }

    .navbarLogo .logoImage {
        height: 40px;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        width: 28px;
        height: 28px;
        cursor: pointer;
        z-index: 100000;
        flex-shrink: 0;
        padding: 4px;
        background: none;
        border: none;
    }

    .hamburger .bar {
        height: 2px;
        width: 18px;
        background-color: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .navbarMenu {
        position: fixed;
        top: 80px;
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        width: 90%;
        max-width: 400px;
        background: rgba(15, 15, 20, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 2rem;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 99999;
    }

    .navbarMenu.active {
        opacity: 1;
        pointer-events: all;
        transform: translateX(-50%) translateY(0);
    }

    .navbarActions {
        display: flex;
        gap: 0.3rem;
        /* Reduced gap */
        align-items: center;
    }

    .navbarButton {
        padding: 5px 10px;
        /* Reduced padding */
        font-size: 0.75rem;
        /* Slightly smaller text */
    }

    .languageSwitch {
        padding: 3px 8px;
        /* Reduced padding */
        gap: 4px;
        /* Reduced gap inside language switch */
    }

    .dropdownMenu {
        position: static;
        transform: none;
        padding-top: 10px;
        animation: none;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .dropdownMenuInner {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-width: auto;
        padding: 8px;
        background: rgba(255, 255, 255, 0.03);
        box-shadow: none;
        gap: 4px;
        border: none;
    }

    .dropdownItem {
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 0.8rem;
        gap: 8px;
    }

    .dropdownItemIcon {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
}

/* Language Switcher */
.languageSwitch {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.languageSwitch:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.langOption {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.langOption.active {
    color: #fff;
    font-weight: 600;
}

.langSeparator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

.navbarButton {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.navbarButton:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}