* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: block;
    text-align: center;
}

button {
    cursor: pointer;
    padding: 10px;
    margin: 5px;
}

button#stop {
    position:relative;
    z-index: 100;
}

/* The animation code */
@keyframes lefttoright {
    0% {left: 0;}
    50% {left: 100%;}
    100% {left: 0;}
}

#lightbar {
    position: absolute;
    padding: 0 25px 0 25px;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    transition: background-color 3s;
    background-color: white;
    display: none;
    overflow: hidden;
}

#lightbar.dark {
    background-color: black;
}

#lightbar.active {
    display: block;
}

#light {
    width: 50px;
    height: 50px;
    margin-left: -25px;
    background-color: white;
    position: absolute;
    top: 50%;
    left: 0;
    border-radius: 50%;
}

#light {
    animation: lefttoright;
    animation-duration: 2s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

fieldset {
    display: inline;
}