*{
    padding: 0;
    margin: 0;
}
body {
    background-color: #fefae0;
    width: 100%;
    height: 100vh;
}
main {
    margin: 20px;
}
/*CONTAINER*/
/*CENTERS THE FRAME AND
   HIDES EVERYTHING THAT OVERFLOWS THE FRAME*/
.container{
    position: absolute;
    width: 550px;
    height: 450px;
    overflow: hidden; 
    left: 50%;
    top: 475px;
    transform: translate(-50%, -50%);
    border-style: inset;
}

/*THE CITY*/
.sky {
    width: 550px;
    height: 450px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /*THIS COULD BE USED AS A BACKGROUND COLOR*/
    /*background: linear-gradient(#ABDCFB, #9198e5);*/
    background-color: #ABDCFB;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
}
.ground{
    left: 0;
    bottom: 0;
}
.sidewalk{
    background-color: #dad7cd;
    width: 100%;
    height: 10px;
    position: absolute;
    bottom: 60px;
    left: 0;
}
.road{
    background-color: #595959;
    width: 100%;
    height: 60px;
    position: absolute;
    bottom: 0;
    left: 0;
}

.road-line {
    position: absolute;
    bottom: 30px;
    left: 20px;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(to right,
    #F0F0F2 0%, #F0F0F2 2%,
    transparent 2%, transparent 5% 
    );
    z-index: 2;
}
.sun {
    height: 100px;
    width: 100px;
    border-radius: 100%;
    position: absolute;
    top: 30px;
    left: 120px;
    background-color: yellow;
}
.moon {
    height: 100px;
    width: 100px;
    border-radius: 100%;
    position: relative;
}
.crescent {
    height: 72px;
    width: 72px;
    border-radius:100%;
    position: absolute;
    top: 7px;
    left: -2px;
}
/*BUILDING*/
.building {
    background-color: #ebebec;
    bottom: 70px;
}

.building0 {
    position: absolute;
    left: 0;
    width: 100px;
    height: 210px;
}
.window1-bld0 {
    top: 25px;
    left: 20px;
}

.window2-bld0 {
    top: 60px;
    left: 70px;
}

.window3-bld0 {
    top: 100px;
    left: 50px;
}

.window4-bld0 {
    top: 140px;
    left: 75px;
}
.window5-bld0 {
    top: 150px;
    left: 10px;
}
/*FIRST BUILDING ON THE LEFT*/
.building1 {
    position: absolute;
    left: 100px;
    width: 90px;
    height: 170px;
}
.window {
    position: absolute;
    height: 10px;
    width: 10px;
    background-color: #ADD8E6;
}
.window1-bld1 {
    top: 25px;
    left: 20px;
}
.window2-bld1 {
    top: 45px;
    left: 55px;
}
.window3-bld1 {
    top: 125px;
    left: 60px;
}
.window4-bld1 {
    top: 75px;
    left: 55px;
}
.window5-bld1 {
    top: 75px;
    left: 55px;
}
.window-person {
    position: relative;
    top: 95px;
    left: 20px;
}
#person {
    position: absolute;
    bottom: 0;
}
.person-head {
    border-radius: 100%;
    height: 3px;
    width: 2px;
    background-color: #495057;
    position: relative;
    margin-bottom: 0;
}
.person-body {
    border-radius: 35% 35% 0% 0%;
    background-color: #495057;
    height: 5px;
    width: 3px;
    position: relative;
    margin-bottom: 0;
}
/*SECOND BUILDING*/
.building2 {
    position: absolute;
    left: 190px;
    width: 110px;
    height: 240px;
}
.window1-bld2 {
    top: 25px;
    left: 20px;
}
.window2-bld2 {
    top: 50px;
    left: 70px;
}
.window3-bld2 {
    top: 90px;
    left: 40px;
}
.window4-bld2 {
    top: 140px;
    left: 60px;
}
.window5-bld2 {
    top: 200px;
    left: 40px;
}

/*THIRD BUILDING*/
.building3 {
    position: absolute;
    left: 300px;
    width: 90px;
    height: 150px;
}
.window1-bld3 {
    bottom: 37px;
    left: 27px;
}
.window2-bld3 {
    bottom: 85px;
    left: 60px;
}
.window3-bld3 {
    bottom: 110px;
    left: 20px;
}
.window4-bld3 {
    bottom: 70px;
    left: 15px;
}
/* FOURTH BUILDING */
.building4 {
    position: absolute;
    left: 390px;
    width: 110px;
    height: 180px;
}

.window1-bld4 {
    top: 20px;
    left: 15px;
}

.window2-bld4 {
    top: 50px;
    left: 50px;
}

.window3-bld4 {
    top: 90px;
    left: 30px;
}

.window4-bld4 {
    top: 130px;
    left: 10px;
}

.window5-bld4 {
    top: 115px;
    left: 75px;
}

/* FIFTH BUILDING */
.building5 {
    position: absolute;
    left: 500px; 
    width: 75px;
    height: 160px;
}

.window1-bld5 {
    top: 30px;
    left: 10px;
}

.window2-bld5 {
    top: 70px;
    left: 45px;
}

.window3-bld5 {
    top: 110px;
    left: 20px;
}

.window4-bld5 {
    top: 140px;
    left: 50px;
}
/*CARS/TRUCKS*/
@keyframes movingCar  {
    from {
        margin-left: -30%;
    }

    to {
        margin-left: 110%;
    }
}
/*TRUCK*/
.truck {
    position: absolute;
    bottom: 62px;
    z-index: 1;
    animation: reverse movingCar 8s  infinite;
}
.truck-cabin {
    width: 27px;
    height: 35px;
    margin-left: 12px;
    border-top-left-radius: 9px;
    border-top-right-radius: 2px;
    background-color: firebrick;
    position: relative;
}
.truck-window {
    width: 20px;
    height: 11px;
    position: absolute;
    left: 2.3px;
    margin-top: 3px;
    background-color: lightsteelblue;
    border: solid #2f2f2f 0.3px;
    border-top-left-radius: 6px;
}
.truck-door {
    width: 24px;
    height: 30.5px;
    position: absolute;
    left: 1px;
    bottom: 2px;
    border: solid #2f2f2f 0.3px;
    border-top-left-radius: 6px;
}
.truck-handle-door {
    width: 3px;
    border: solid #2f2f2f 1px;
    position: absolute;
    right: 3px;
    bottom: 8px;
}
.truck-trailer {
    width: 100px;
    height: 32px;
    background-color: darkgray;
    position: absolute;
    left: 43px;
    bottom: 0px;
    border: double #2f2f2f;
    display: flex;
    justify-content: center;
    align-items: center;
}
.truck-trailer > p {
    font-size: 18px;
    font-family: Georgia, sans-serif;
    font-style: italic;
    font-weight: bold;
}
.truck-wheel {
    width: 15px;
    height: 15px;
    background-color: black;
    border-radius: 50%;
}
.truck-wheel-front {
    position: absolute;
    bottom: -10px;
    left: 15px;
}
.truck-wheel-middle {
    position: absolute;
    bottom: -10px;
    left: 50px;
}
.truck-wheel-back-1 {
    position: absolute;
    bottom: -10px;
    left: 108px;
}
.truck-wheel-back-2 {
    position: absolute;
    bottom: -10px;
    left: 125px;
}
.truck-rim {
    margin: 2.4px;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    background-color: lightslategrey;
}

/*CAR WINDOWS*/
/*WINDOWS FOR THE CARS IN THE FOREGROUND*/
.car-back-window {
    width: 16px;
    height: 8px;
    position: absolute;
    margin-left: 4px;
    margin-top: 1.5px;
    background-color: lightsteelblue;
    border-top-left-radius: 3px;
    border: solid #2f2f2f 0.3px;
}
.car-front-window {
    width: 15px;
    height: 8px;
    position: absolute;
    right: 4px;
    margin-top: 1.5px;
    background-color: lightsteelblue;
    border: solid #2f2f2f 0.3px;
    border-top-right-radius: 15px;
}
/*CAR WHEELS*/
.car-wheel-left {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: solid #595959 1.6px;
    background-color: black;
    position: absolute;
    bottom: -4px;
    left: 4px;
}
.car-wheel-right {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: solid #595959 1.6px;
    background-color: black;
    position: absolute;
    bottom: -4px;
    right: 9px;
}
.car-rim {
    margin: 1.4px;
    border-radius: 50%;
    width: 6px;
    height: 6px;
    background-color: lightslategrey;
}

/*GREEN CAR*/
.car-green {
    position: absolute;
    bottom: 40px;
    z-index: 2;
    animation: reverse movingCar 6s infinite;
}
.car-trapezoid-green {
    width: 25px;
    height: 11px;
    margin-left: 12px;
    border-top-left-radius: 14px;
    border-top-right-radius: 2px;
    background-color: green;
    position: relative;
}
.car-rect-green {
    width: 65px;
    height: 12px;
    background-color: green;
    position: relative;
    border-top-left-radius: 8px;
    border-top-right-radius: 3px;
}
.car-green .car-front-window {
    /* Flips the front window horizontally */
    transform: scaleX(-1);
    height: 8px;
}

/*RED CAR*/
.car-red {
    position: absolute;
    bottom: 15px;
    z-index: 3;
    animation: movingCar 5s infinite;
}
.car-trapezoid-red{
    width: 43px;
    height: 11px;
    margin-left: 5px;
    border-top-left-radius: 33px;
    border-top-right-radius: 60px;
    background-color: red;
    position: relative;
}
.car-rect-red {
    width: 60px;
    height: 12px;
    background-color: red;
    position: relative;
    border-top-left-radius: 5px;
    border-top-right-radius: 15px;
}

/*ORANGE CAR*/
.car-orange {
    position: absolute;
    bottom: 10px;
    z-index: 4;
    animation: movingCar 8s infinite;
}
.car-trapezoid-orange {
    width: 45px;
    height: 12px;
    margin-left: 5px;
    border-top-left-radius: 35px;
    border-top-right-radius: 62px;
    background-color: orange;
    position: relative;
}
.car-rect-orange {
    width: 62px;
    height: 14px;
    background-color: orange;
    position: relative;
    border-top-left-radius: 6px;
    border-top-right-radius: 16px;
}

