*{
	margin: 0;
	padding:0;
	box-sizing: border-box;
}
.container{
    display: flex;
}
.half{
    width: 50vw;
    height: 100vh;
    text-align: center;
    position: relative;
}
.traffic-light{
    width: 50px;
    height: 120px;
    background-color: #464646;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    top: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}
.traffic-light .light{
    width: 30px;
    height: 30px;
    border-radius: 50%;
}
.traffic-light .light:nth-of-type(1){
    background-color: #840707;
}
.fast .traffic-light .light:nth-of-type(2){
    background-color: #909000;
}
.fast .traffic-light .light:nth-of-type(3){
    background-color: #00ff00;
    box-shadow: 1px -1px 20px 0px #00ff00;
}
.slow .traffic-light .light:nth-of-type(2){
    background-color: #ffff00;
    box-shadow: 1px -1px 20px 0px #ffff00;
}
.slow .traffic-light .light:nth-of-type(3){
    background-color: #0b610b;
}
.fast{
    background-color: #FF7B00;
}
.slow{
    background-color: #45A6C6;
}
.racetrack{
    width: 92%;
    max-width: 1800px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 120px;
    top: 250px;
    background-color: #808183;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.racetrack .painting{
    width: 6%;
    max-width: 86px;
    min-width: 48px;
    height: 12px;
    background-color: #fff;
    margin: 0 25px;
}
.racetrack .tire-mark{
    opacity: 0;
    visibility: hidden;
    width: 100px;
    height: 6px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    background-image: linear-gradient(to right, transparent, #4c4c4c);
    transition: all .3s ease;
}
.racetrack .tire-mark:last-of-type{
    bottom: 20px;
}
.racetrack .tire-mark.active-mark{
    animation: tireMark 1s linear forwards;
}
.car{
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    left: 5px;
    transition: all .3s ease;
}
.car.moving-car{
    animation: movingCar 5.5s cubic-bezier(0.09, 1.01, 0.31, 0.15) forwards;
}
.car .top{
    border-bottom: 30px solid #1b1b1b;
    border-left: 30px solid transparent;
    border-right: 35px solid transparent;
    height: 0;
    width: 100px;
    transition: all .3s ease;
}
.car .car-body{
    width: 130px;
    height: 23px;
    background-color: #000;
    position: relative;
    transition: all .3s ease;
}
.car-body .headlight{
    width: 12px;
    height: 12px;
    background-color: #efff00f2;
    position: absolute;
    right: 2px;
    top: 2px;
    box-shadow: 20px 9px 9px #efff00f2;
}
.car-body .back-headlight{
    width: 10px;
    height: 4px;
    background-color: #ff0000;
    position: absolute;
    left: 0;
}
.car-body .back-headlight:nth-of-type(2){
    top: 2px;
}
.car-body .back-headlight:nth-of-type(3){
    top: 8px;
}
.car .tire{
    width: 20px;
    height: 20px;
    background-color: #4e3939;
    border-radius: 50%;
    position: absolute;
    bottom: -10px;
}
.car.moving-car .tire{
    animation: movingTires .3s linear infinite;
}
.car .tire:nth-of-type(3){
    left: 25px;
}
.car .tire:nth-of-type(4){
    right: 27px;   
}
.tire .wheel{
    height: 5px;
    width: 5px;
    background-color: #979797;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 7px;
    box-shadow: 1px 6px 4px 0px #000000;
    transition: all .3s ease;
}
.controller{
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 280px;
    background: #252525;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 5px 3px 4px 0px #2b2b2b91;
    padding: 0 25px;
}
.controller .main-btn{
    width: 85px;
    height: 85px;
    border-radius: 50%;
    margin-top: 12px;
    color: #fff;
    text-transform: uppercase;
    font-size: 18px;
    background-color: #ff0000;
    border: 0;
    box-shadow: 0px 11px #860000;
    cursor: pointer;
    outline: none;
}
.controller .main-btn span{
    display: none;
}
.controller .main-btn span.active-btn-txt{
    display: block;
}
.controller .main-btn.active-btn{
    box-shadow: none;
    transform: translateY(7px);
}
.controller .grid-btns{
    display: grid;
    grid-template: 22px / repeat(3, 1fr);
    /*margin-top: 30px;*/
    grid-gap: 10px;
    width: 100%;
}
.controller .grid-btns:not(:last-of-type){
    margin-bottom: 5px;
}
.controller h3{
    color: #fff;  
    font-family: Helvetica; 
    margin-bottom: 3px;
    font-size: 18px;
}
.controller h3:first-of-type{
    margin-top: 17px;
}
.grid-btns .grid-item{
    width: 100%;
    height: 100%;
}
.grid-item button{
    width: 100%;
    height: 100%;
    cursor: pointer;
    border: 0;
    box-shadow: 1px 3px #333;
}
.green{
    background-color: #6eff00;
}
.blue{
    background-color: #005aff;
}
.red{
    background-color: #960c0c;;
}
.change-top .green,
.change-tire .green{
    background-color: #82e437;
}
.change-top .red,
.change-tire .red{
    background-color: #960c0c;
}
.change-top .blue,
.change-tire .blue{
    background-color: #0a4bc3;
}
@keyframes movingTires {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
@keyframes movingCar {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(93vw);
    }
}
@keyframes tireMark {
    from {
        visibility: hidden;
        opacity: 0;
    }
    to {
        visibility: visible;
        opacity: 1;
    }
}