#players {
    margin: 15px 0;
    max-height: 50vh;
    width: 100%;
    overflow-y: scroll;
    scroll-behavior: smooth;
    --title-height: 30;
}

#players .player-div {
    height: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    margin: 2px 3px;
    background-color: #6d6d6d4d;
    user-select: none;
    border-radius: 4px;
    border: 1.5px solid rgba(0, 0, 0, 0.26);
    padding-right: 2px;
}

#players .player-div.selected {
    background: linear-gradient(270deg, #ffffff, #6d6d6d);
    background-size: 400% 400%;
    animation: AnimationName 2s ease infinite;
    border: 2px solid #000000;
}

@keyframes AnimationName {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

#players .player-div:nth-child(even) {
    background-color: #0000004d;
}

#players .name {
    white-space: nowrap;
    flex: 1;
    text-overflow: ellipsis;
    overflow: hidden;
    min-width: 0;
    color: hsl(255, 15%, 11%);
    font-weight: 400;
}

#players .number {
    display: inline-block;
    z-index: 2;
    flex-shrink: 0;
    width: 24px;
    color: #fff;
    font-weight: 900;
    text-align: center;
    margin: 0 6px;
    font-size: 18px;
    /* filter: drop-shadow(0px 0px 4px #bbb); */
    line-height: 24px;
    filter: drop-shadow(0px 0px 1.5px #000) drop-shadow(0px 0px 7px #000) drop-shadow(0px 0px 2px #f2f2f2);

    text-shadow: 0 0 0.8px #000;
}

#players .position {
    display: inline-block;
    background: rgb(0, 0, 0);
    border-radius: 2px;
    border: 1.2px solid rgba(0, 0, 0, 0.2);
    color: #fff;
    font-weight: 900;
    text-align: center;
    padding: 0px 2px;
    margin: 0px 1.5px;
    font-size: x-small;
    text-shadow: 0px 0px 5px #000;
    letter-spacing: 0.5px;
}

#players .position.gr {
    background: #000;
}

#players .position.df {
    background: rgb(0, 128, 55);
}

#players .position.md {
    background: rgb(166, 163, 0);
}

#players .position.av {
    background: rgb(128, 0, 0);
}


/*Vars need to be updated on change*/
#players .gr {
    --top: 0;
    --bottom: 3
}

#players .df {
    --top: 1;
    --bottom: 2
}

#players .md {
    --top: 2;
    --bottom: 1
}

#players .av {
    --top: 3;
    --bottom: 0
}

#players .title-div {
    height: 0px;
    visibility: hidden;
    transform: translateY(calc(var(--title-height) * var(--top) * -1px));
}

#players a.link-div {
    margin: 3px 0;
    z-index: 5;
    position: sticky;
    display: block;
    height: calc(var(--title-height)*1px);
    top: 0;
    bottom: 0;
    background-color: rgb(128, 162, 196);
    text-decoration: none;
    color: rgb(255, 255, 255);
    line-height: calc(var(--title-height)*1px);
    padding-left: 5px;
    font-weight: 700;
    top: calc(var(--title-height) * var(--top) * 1px);
    bottom: calc(var(--title-height) * var(--bottom) * 1px);
    backdrop-filter: blur(4px);
}

#players a.link-div.gr {
    background: rgba(0, 0, 0, .8);
}

#players a.link-div.df {
    background: rgba(0, 128, 55, .8);
}

#players a.link-div.md {
    background: rgba(179, 176, 0, .8);
}

#players a.link-div.av {
    background: rgba(128, 0, 0, .8);
}