#menu > ul{
    list-style: none;
    margin: 10px 0 0 10px;
    padding: 0;
    vertical-align: baseline;
    line-height: 1;
}

/* The container */
#menu > ul {
    display: block;
    position: relative;
    width: 180px;
}

/* The list elements which contain the links */
#menu > ul li {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
    width: 180px;
}

/* General link styling */
#menu > ul li a {
    /* Layout */
    display: block;
    position: relative;
    margin: 0;
    border-top: 1px dotted #fff;
    border-bottom: 1px dotted #d9d9d9;
    padding: 11px 20px;
    width: 140px;

    /* Typography */
    font-family:  Helvetica, Arial, sans-serif;
    color: #333;
    text-decoration: none;
    text-shadow: 0 1px 0 #fff;
    font-size: 14px;
    font-weight: 300;

    /* Background & effects */
    background: #F3F3F3;
}

#menu > ul li a.menu_connected {
    border-top: 1px dotted #aaa;
    background: #CCC;
}

#menu > ul li a .counter {
    font-size: 0.9em;
    font-family: 'Courier New', Courier, modern, monospace;
}

/* Rounded corners for the first link of the menu/submenus */
#menu > ul li:first-child>a {
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border-top: 0;
}

/* Rounded corners for the last link of the menu/submenus */
#menu > ul li:last-child>a {
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    border-bottom: 0;
}


/* The hover state of the menu/submenu links */
#menu > ul li>a:hover, #menu > ul li:hover>a {
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
    background: #aaa;
    background: -webkit-linear-gradient(bottom, #aaa, #888);
    background: -ms-linear-gradient(bottom, #aaa, #888);
    background: -moz-linear-gradient(bottom, #aaa, #888);
    background: -o-linear-gradient(bottom, #aaa, #888);
    border-color: transparent;
}

/* The arrow indicating a submenu */
#menu > ul .has-sub>a::after {
    content: '';
    position: absolute;
    top: 16px;
    right: 10px;
    width: 0px;
    height: 0px;

    /* Creating the arrow using borders */
    border: 4px solid transparent;
    border-left: 4px solid #aaa;
}

/* The same arrow, but with a darker color, to create the shadow effect */
#menu > ul .has-sub>a::before {
    content: '';
    position: absolute;
    top: 17px;
    right: 10px;
    width: 0px;
    height: 0px;

    /* Creating the arrow using borders */
    border: 4px solid transparent;
    border-left: 4px solid #fff;
}

/* Changing the color of the arrow on hover */
#menu > ul li>a:hover::after, #menu > ul li:hover>a::after {
    border-left: 4px solid #fff;
}

#menu > ul li>a:hover::before, #menu > ul li:hover>a::before {
    border-left: 4px solid rgba(0, 0, 0, .25);
}


/* THE SUBMENUS */
#menu > ul ul {
    position: absolute;
    left: 180px;
    top: -9999px;
    padding-left: 5px;
    opacity: 0;
    /* The fade effect, created using an opacity transition */
    -webkit-transition: opacity .3s ease-in;
    -moz-transition: opacity .3s ease-in;
    -o-transition: opacity .3s ease-in;
    -ms-transition: opacity .3s ease-in;
}

/* Showing the submenu when the user is hovering the parent link */
#menu > ul li:hover>ul {
    top: 0px;
    opacity: 1;
}
