@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Press Start 2P', cursive;
}


body{
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.speedWay{
    position: absolute;
    display: flex;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background-image: linear-gradient(to right, rgb(77, 77, 77),rgb(127, 127, 127),rgb(77, 77, 77));
}

.range{
    position: absolute;
    width: 100vw;
    width: 10px;
    height: 50px;
    background-color: rgb(237, 237, 237);
}

.playerCar {
    position: absolute;
    width: 69px;
    height: 125px;
    z-index: 7;
    bottom: 20%;
    animation: carRoad 377ms infinite linear;
}

.cpuCar{
    position: absolute;
    width: 69px;
    height: 125px;
    z-index: 7;
    transform: rotate(180deg);
}


.btnsControls{
    display: flex;
    justify-content: space-between;
    position: absolute;
    background-color: transparent;
    width: 100vw;
    height: 100vh;
}

.btns{
    font-size: 3em;
    color: rgba(255, 255, 255, 0.507);
    width: 50%;
    background-color: transparent;
    border: none;
    margin: 0px;
    z-index: 10;
}

.esq {
    animation: btnEsqAnimate 2s infinite linear;
}
.esqAnimate {
    animation: esqAnimateEffect 27ms linear both;
}
.dirAnimate {
    animation: dirAnimateEffect 27ms linear both;
}


.score{
    position: absolute;
    right: 3%;
    top: 2%;
    color: white;
}

.meters{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    font-size: 5.7em;
    color: white;
    opacity: 0;
}

.metersAnimation {
    animation: scoreAnimation 700ms 7 linear ;
}

.gameOver {
    position: absolute;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;
    width: 80%;
    height: 35%;
    border: 5px solid rgb(77, 77, 77);
    background-color: wheat;
    border-radius: 20px;
    top: 25%;
    z-index: 10;
    visibility: hidden;
}

.reload{
    border: none;
    border-radius: 10px;
    padding: 5px;
    background-color: transparent;
    font-size: 1.3em;
}

.newGame{
    position: absolute;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;
    width: 80%;
    height: 35%;
    border: 5px solid rgb(77, 77, 77);
    background-color: wheat;
    border-radius: 20px;
    top: 25%;
    z-index: 11;
}
.init {
    border: none;
    border-radius: 10px;
    padding: 5px;
    background-color: transparent;
    font-size: 1.7em;
}
.devGame {
    font-size: 0.7em;
}

.scoreGameOver {
    margin-top: 20px;
}
@keyframes scoreAnimation{
    from{
        opacity: 0;
    }
    to{
        opacity: 1;
    }
    
}
@keyframes btnEsqAnimate{
    0%{
        margin-right: 0px;
    }
    50%{
        margin-right: 77px;
    }
    100%{
        margin-right: 0px;
    }
}


@keyframes carRoad{
    0%{
        transform: translateY(0px);
    }
    50%{
        transform: translateY(1px);
    }
    100%{
        transform: translateY(0px);
    }
}





@keyframes esqAnimateEffect {
    to{
        transform: rotate(-27deg)
    }
}
@keyframes dirAnimateEffect {
    to{
        transform: rotate(27deg)
    }
}