﻿*{
    margin: 0;
    padding: 0;
}

.sky{
    height: 100vh;
    width: 100%;
    background-image: url('./images/sky.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow-x: hidden;
}

.road{
    height: 200px;
    width: 500%;
    display: block;
    background-image: url('./images/road.jpg');
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
    background-repeat: repeat-x;
    animation: road 3s linear infinite;
}

.city{
    height: 250px;
    width: 500%;
    display: block;
    background-image: url('./images/city.png');
    position: absolute;
    bottom: 200px;
    left: 0;
    right: 0;
    z-index: 1;
    background-repeat: repeat-x;
    animation: city 12s linear infinite;
}

.car{
    width: 400px;
    transform: translateX(-50%);
    position: absolute;
    bottom: 50px;
    left: 50%;
    z-index: 2;
}

.car img{
    width: 100%;
    animation: car 1s linear infinite;
}

.wheel{
    left: 50%;
    bottom: 133px;
    transform: translateX(-50%);
    position: absolute;
    z-index: 2;
}

.wheel img{
    height: 72px;
    width: 72px;
    animation: wheel 1s linear infinite;
}

.back-wheel{
    left: -165px;
    position: absolute;
}
.front-wheel{
    left: 80px;
    position: absolute;
}

@keyframes wheel {
    100%{
        transform: rotate(360deg);
    }
}

@keyframes car {
    100%{
        transform: translateX(-1px);
    }
    50%{
        transform: translateX(1px);
    }
    0%{
        transform: translateX(-1px);
    }
}

@keyframes road {
    100%{
        transform: translateX(-1000px);
    }
}

@keyframes city {
    100%{
        transform: translateX(-1440px);
    }
}