.dynamic-navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(136, 120, 204, 0.2);
    border-radius: 50px;
    padding: 8px 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    width: auto;
    font-family: 'Jost', sans-serif;
}

.dynamic-navbar.expanded {
    border-radius: 24px;
    padding: 12px 32px;
    background: rgba(15, 15, 35, 0.9);
}

.dynamic-navbar .navbar-brand {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: rgba(226, 232, 240, 0.8);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 0 2px;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: white;
    background: rgba(136, 120, 204, 0.2);
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(136, 120, 204, 0.3), rgba(168, 85, 247, 0.3));
    color: white;
}

@media (min-width: 769px) {
    #navLinks {
        display: flex !important;
        gap: 12px;
        align-items: center;
        margin-left: 24px;
    }
    
    .nav-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .dynamic-navbar {
        width: calc(100% - 40px);
        max-width: none;
        padding: 12px 20px;
        border-radius: 24px;
    }
    
    #navLinks {
        display: none;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 15, 35, 0.95);
        backdrop-filter: blur(20px);
        border-radius: 20px;
        margin-top: 8px;
        padding: 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(136, 120, 204, 0.2);
    }
    
    #navLinks.show {
        display: flex;
    }
    
    .nav-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        padding: 8px;
        border-radius: 12px;
        transition: all 0.3s ease;
        cursor: pointer;
        margin-left: auto;
    }
    
    .nav-toggle:hover {
        background: rgba(136, 120, 204, 0.2);
    }
    
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
        margin: 0;
    }
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.dropdown-toggle:hover {
    color: #a855f7;
    text-decoration: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(136, 120, 204, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(136, 120, 204, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 8px 0;
    margin-top: 8px;
    display: block;
}

.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0;
}

.dropdown-item:hover {
    background: rgba(136, 120, 204, 0.1);
    color: #a855f7;
    text-decoration: none;
}

.dropdown-divider {
    height: 1px;
    background: rgba(136, 120, 204, 0.2);
    margin: 8px 16px;
}

.dropdown-toggle i {
    transition: transform 0.3s ease;
}

.nav-dropdown.open .dropdown-toggle i {
    transform: rotate(180deg);
}

@media (min-width: 769px) {
    .nav-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background: rgba(136, 120, 204, 0.05) !important;
        margin: 0.5rem 0 0 0 !important;
        border-radius: 8px !important;
        padding: 0 !important;
        width: 100% !important;
        min-width: auto !important;
        z-index: 1001 !important;
        
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        display: block !important; 
    }
    
    .nav-dropdown.open .dropdown-menu {
        max-height: 500px !important;
        padding: 0.5rem 0 !important;
    }
    
    .nav-dropdown .dropdown-item {
        padding: 12px 16px !important;
        font-size: 14px !important;
        border-bottom: 1px solid rgba(136, 120, 204, 0.1) !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .nav-dropdown .dropdown-item:last-child {
        border-bottom: none !important;
    }
    
    .nav-dropdown .dropdown-toggle {
        width: 100% !important;
        text-align: left !important;
        justify-content: space-between !important;
        padding: 12px 16px !important;
        color: rgba(226, 232, 240, 0.8) !important;
    }
    
    .nav-dropdown .dropdown-toggle:hover {
        background: rgba(136, 120, 204, 0.2) !important;
        color: white !important;
    }
    
    .nav-dropdown .dropdown-divider {
        margin: 8px 16px !important;
        height: 1px !important;
        background: rgba(136, 120, 204, 0.2) !important;
    }
}

.language-switcher {
    display: flex;
    background: rgba(136, 120, 204, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(136, 120, 204, 0.2);
    border-radius: 25px;
    padding: 4px;
    gap: 3px;
    transition: all 0.3s ease;
    margin-left: 16px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: rgba(226, 232, 240, 0.7);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.lang-btn:hover {
    color: white;
    background: rgba(136, 120, 204, 0.2);
    transform: scale(1.05);
}

.lang-btn.active {
    background: linear-gradient(135deg, rgba(136, 120, 204, 0.3), rgba(168, 85, 247, 0.3));
    color: white;
    box-shadow: 0 2px 8px rgba(136, 120, 204, 0.2);
}

@media (max-width: 768px) {
    .language-switcher {
        order: -1;
        margin-left: 12px;
        margin-right: 12px;
    }
    
    .lang-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .lang-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .dropdown-toggle {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        touch-action: manipulation;
    }
    
    .nav-dropdown {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .nav-dropdown .dropdown-menu {
        min-height: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    .nav-dropdown.open .dropdown-menu {
        max-height: 300px;
        padding: 0.5rem 0;
    }
}

.nav-link.dropdown-toggle::after {
    display: none !important;
}