:root {
    --barLength: 2s;
}
#settings {
    display: flex;
    flex-direction: column;
}
#settings > * {
    margin-bottom: 10px;
}
input[type=range] {
    width: 300px;
}
.bar {
    width: 90%;
    margin: 40px 5%;
    height: 8px;
    background-color: #222;
    display: grid;
    grid-auto-flow: column;
    align-content: center;
    justify-content: space-between;
    border-radius: 4px;
}
.collapsed {
    position: absolute;
}
.collapsed:not(:first-child) {
    background-color: transparent;
}
main:has(#bars:empty) #progress-bar {
    background-color: #222;
}
#progress-bar {
    display: block;
}
.marker {
    display: inline;
    height: 4px;
    width: 4px;
    border-radius: 10px;
    transform: scale(2.5);
    border: 2px solid white;
    box-shadow: 0 0 4px black;
    background-color: var(--markerColor);
}
#playhead {
    position: relative;
    top: -6px;
    left: 0;
    height: 20px;
    width: 8px;
    background-color: red;
}
#playhead.playing {
    animation: playhead-anim var(--barLength) linear 0s infinite forwards normal;
}
@keyframes playhead-anim {
    from {
        left: 0;
    }
    to {
        left: calc(100% - 8px);
    }
}