Add the following in Design > Custom CSS.
Note that you can comment/un-comment code to change the alignment of the underline for mobile, desktop and desktop submenu items.
Additionally, add the following code to Settings > Advanced > Code Injection > Footer