#container {
    position: relative;
}

@keyframes animate-up-in {
    0% {
        margin-top: 3em;
        opacity: 0;
    }

    100% {
        margin-top: 0;
        opacity: 1;
    }
}

.sound {
    margin-left: 1em;
    display: inline-block;
    border-radius: 0.1em;
    cursor: pointer;
    width: 50px;
    height: 35px;
    background-repeat: no-repeat;
    background-position: center center;
    opacity: 0.5;
    transition: all 0.3s ease-in-out;
    position: relative;
    top: 0.2em;
}

.sound:hover {
    opacity: 1;
}

.sound.on {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8cGF0aCBkPSJNMyAxNlY4SDZMMTEgNFYyMEw2IDE2SDNaIiBzdHJva2U9IiNGRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPg0KPHBhdGggZD0iTTEzIDlDMTMgOSAxNSA5LjUgMTUgMTJDMTUgMTQuNSAxMyAxNSAxMyAxNSIgc3Ryb2tlPSIjRkZGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4NCjxwYXRoIGQ9Ik0xNSA3QzE1IDcgMTggNy44MzMzMyAxOCAxMkMxOCAxNi4xNjY3IDE1IDE3IDE1IDE3IiBzdHJva2U9IiNGRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPg0KPHBhdGggZD0iTTE3IDVDMTcgNSAyMSA2LjE2NjY3IDIxIDEyQzIxIDE3LjgzMzMgMTcgMTkgMTcgMTkiIHN0cm9rZT0iI0ZGRiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+DQo8L3N2Zz4=);
}

.sound.off {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8cGF0aCBkPSJNMyAxNlY4SDZMMTEgNFYyMEw2IDE2SDNaIiBzdHJva2U9IiNGRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPg0KPHBhdGggZD0iTTE0LjUgMTVMMjAuNSA5IiBzdHJva2U9IiNGRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPg0KPHBhdGggZD0iTTE0LjUgOUwyMC41IDE1IiBzdHJva2U9IiNGRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPg0KPC9zdmc+);
}


#container #races {
    display: table;
    font-size: 1.3em;
    flex-direction: column;
    box-shadow: 0 0 2em #000;
    margin: 3.3em auto 0 auto;
    padding: 0;
    min-width: 40em;
    transition: all 1s ease-in-out;
    background-color: #000;
    position: relative;
    border: 1px solid #000;
    z-index: 90;
    min-height: 6em;
}

#container #races.empty::before {
    position: absolute;
    top: 0.7em;
    left: 0;
    width: 100%;
    color: #333;
    font-size: 2em;
    content: 'Nothing to show';
    text-align: center;
}


#container #races .race {
    display: table-row;
    flex-direction: row;
    background: linear-gradient(180deg, #333 0%, #111 1px, #111 75%, #080808 100%);
    color: #666;
    font-weight: normal;
    position: relative;
}

#container #races .race>div {
    padding: 0.9em 0.5em;
    display: table-cell;
    vertical-align: middle;
}

#container #races .race .time {
    width: 2em;
}

#container #races .race .country {
    padding: 4px;
}

#container #races .race .name {
    width: auto;
    white-space: nowrap;
}

#container #races .race .status {
    min-width: 5em;
    filter: brightness(0.4);
    text-transform: capitalize;
    position: relative;
}


#container #races .race .progress {
    min-width: 6em;
    position: relative;
    padding: 0;
    text-align: center;
}

#container #races .race .progress::before,
#container #races .race .progress::after {
    content: '';
    display: block;
    position: absolute;
    width: var(--perc);
    height: 4px;
    bottom: 6px;
    transition: all 0.5s ease-in-out;
    border-radius: 2px;
}


#container #races .race[status="live"],
#container #races .race[status="SD"],
#container #races .race[status="PR"],
#container #races .race[status="GD"],
#container #races .race[status="GB"],
#container #races .race[status="AP"],
#container #races .race[status="LD"],
#container #races .race[status="LG"],
#container #races .race[status="R"],
#container #races .race[status="parading"] {
    color: #FFF;
    font-weight: bold;
}

#container #races .race[status="LG"] .progress::after,
#container #races .race[status="LD"] .progress::after,
#container #races .race[status="R"] .progress::after,
#container #races .race[status="running"] .progress::after,
#container #races .race[status="loaded"] .progress::after,
#container #races .race[status="loading"] .progress::after {
    border-radius: 2px;
    width: 100%;
}

#container #races .race[status="running"] .progress::after,
#container #races .race[status="R"] .progress::after {
    background-color: #030;
}

#container #races .race[status="loading"] .progress::after,
#container #races .race[status="LG"] .progress::after,
#container #races .race[status="loaded"] .progress::after,
#container #races .race[status="LD"] .progress::after {
    background-color: #412300;
}

#container #races .race[status="waiting"] {
    color: #DDD;
}

#container #races .race[status="warning"] {
    color: #F00;
    font-weight: bold;
}

#container #races .race[status="canceled"] {
    color: #E20;
    text-decoration: line-through;

}



#container #races .race[status="running"],
#container #races .race[status="R"] {
    font-weight: bold;
    color: #0D0;
}

#container #races .race[status="running"] .progress::before,
#container #races .race[status="R"] .progress::before {
    background-color: #0D0;
    z-index: 42;
}


#container #races .race[status="loading"],
#container #races .race[status="LG"] {
    color: #E68000;
    font-weight: bold;
}

#container #races .race[status="loaded"],
#container #races .race[status="LD"] {
    color: #ff9d24;
    font-weight: bold;
}

#container #races .race[status="loading"] .progress::before,
#container #races .race[status="LG"] .progress::before {
    background-color: #E68000;
    z-index: 42;
}

#container #races .race[status="loaded"] .progress::before,
#container #races .race[status="LD"] .progress::before {
    background-color: #ff9d24;
    z-index: 42;
}

#container #races .race[status="finished"] {
    color: #666;
}

#container #races .race[status="deleted"] {
    display: none !important;
}

#container #races .race[status="finished"] .country {
    opacity: 0.4;
}

#container #countries {
    margin: 0;
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: row;
    position: absolute;
    width: 100%;
    top: -1em;
    z-index: 1;
    justify-content: center;
    transition: all 0.5s ease-in-out;

}

#container #countries li {
    height: 2em;
    width: 2em;
    display: inline-block;
    cursor: pointer;
    margin: 0 0.4em;
    filter: grayscale(1);
    opacity: 0.3;
}

#container #countries:hover {
    top: -2em;
}

#container #countries li.shown {
    filter: grayscale(0);
    opacity: 1;
}

@media only screen and (max-width: 800px) {
    #container #countries {
        top: -3em;
        left: 0;
    }

    #container #countries:hover {
        top: -3em;
    }

    #container #races {
        width: 99%;
        max-width: 99%;
        min-width: auto;
        box-shadow: none;
        margin: 3em 0;
    }

    #container #races .race .name {
        white-space: unset;
    }
}