@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hanalei+Fill&family=Inter:wght@300&display=swap');

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

/* --------------------------HOME-PAGE----------------------------------------- */
body {
    background-image: url(assets/gamebg.png);
    overflow: hidden;
    background-size: cover;
}

.container {
    background: url(assets/indexbg.jpg);
    background-size: cover;
    height: 100vh;
    width: 100vw;
    color: white;
    padding: 3%;
    background-color: rgb(255, 27, 27);
    overflow: hidden;
}

#biglogo {       
    width: 22%;
    opacity: 0.75;
}

.info {
    position: absolute;
    display: grid;
    left: 4%;
    bottom: 8%;
}

label {
    font-size: xx-small;
    font-family: 'Inter';
    font-weight: 800;
}

#infobutton {
    width: 50px;
    padding-left: 8px;
}

#yellowbutton {
    width: 17%;
    visibility: hidden;
}

form {
    display: flex;
    position: absolute;
    bottom: 10%;
    right: 4%;
}

#username,#name {
    color: rgb(255, 255, 255);
    width: 230px;
    height: 30px;
    border: none;
    outline: none;
    font-family: 'Inter';
    font-style: italic;
    font-weight: 600;
    font-size: x-large;
    text-decoration: underline;
    background-color: transparent;
}
/* --------homepage-resposive---------------------- */
@media only screen and (max-width: 500px){
    .container{
        height: 100vh;
        box-sizing: border-box;
        background-image: url(assets/1699274240539.jpg);
    }
    body{
        background-image: none;
        background-color: #630001;
        width: auto;
        height: auto;
    }
    form{
        position: absolute;
        transform: translate(0%, 0%)scale(0.7);
        bottom: 40px;
        right:-90px;
    }
    form input,#infobutton{
        transform: translate(0%, 0%)scale(0.8);
    }
    label{
        transform: translate(0%, 0%)scale(0.87);
    }
    #biglogo{
        transform: translate(0%, 0%)scale(1.6);
        position: absolute;
        top: 40px;
        right: 50px;
    }
    
}

/* ------------------------------------info-popup------------------ */
.popup {
    display: flex;
    position: absolute;
    height: 100vh;
    width: 100vw;
    background-color: rgba(240, 248, 255, 0.603);
    top: 0;
    visibility: hidden;
}

.bigb {
    position: absolute;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-left: 180px;
    width: 85%;
    height: 90%;
    top: 40px;
}

.box1,.box2 {
    text-align: center;
    width: 500px;
    height: 70vh;
    background-color: rgb(255, 255, 255);
    margin: 50px 50px;
    border-radius: 30px;
    padding: 20px;
    transform: scale(0.1);
    transition: transform 0.4s, top 0.4s;
}

.leftarrow {
    position: absolute;
    bottom: 40px;
    left: 50px;
    transform:scale(0.1);
    transition: transform 0.4s, top 0.4s;
    z-index: 10;
}

.popup h1 {
    font-size: xx-large;
}

.popup h2 {
    font-size: larger;
    margin-top: 90px;
}

.leftarrow img {
    width: 70px;
    border: solid black 5px;
    border-radius: 20px;
    background-color: black;
    cursor: pointer;
}

.openpopup {
    visibility: visible;
}

.openbox1,
.openbox2 {
    transform:scale(1);
}
.openleftarrow {
    transform:scale(1);
    bottom: 90px;
    left: 100px;
}
/* -----------info-popup-responsive------------- */
@media only screen and (max-width: 500px){
    .bigb{
        transform:scale(.6);
        width: 60vw;
    }
    .bigb h2{
        font-size: large;
        margin-top: 0px;
    }
    .box1,.box2{
        height: auto;
    }
    .leftarrow{
        position: absolute;
        top: 0px;
        left: 10px;
        transform:scale(.7);
    }
}
/* -------------------gamebutton-popup------------------ */

.play-container {
    position: absolute;
    top: 470px;
    left: 905px;
    z-index: 100;
    width: 280px;
    height: 50px;   
    background-color: rgba(255, 209, 6, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    visibility: hidden;
}

.play-button {
    background-color: #ffcc00;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
    outline: none;
    width: 300px;
}
/* -------gamebutton-popup-resposive--------------- */

@media only screen and (max-width: 500px){
    .play-container {
        top: 400px;
        left: 10px;
        transform:scale(.8);
    }

}
/* ---------------tap-action-(tap somewhere to start)------------- */
.tap{
    width: 100vw;
    height: 110vh;
    background-color: rgba(218, 185, 0, 0.459);
    margin-top: -30px;
    padding-top: 500px;
}
.tap p{
    color: white;
    text-align: center;
    font-family: sans-serif;
    padding-bottom: 40%;
    font-weight: 400;
    font-style: italic;
}
/* ------------------------------------gameplay-page------------------- */
.container2 {
    background-size: cover;
    height: 100vh;
    color: white;
    padding: 1%;
    z-index: -100;
    overflow: hidden;
}

.logo {
    position: absolute;
    width: 120px;
    right: 50px;
    top: 30px;
    opacity: .89;
}

p {
    font-size: 35px;
    margin: 30px 0 0 40px;
    font-weight: 550;
}   
.usercar {
    z-index: 101;
    width: 70px;
    height: 90px;
    position: absolute;
    bottom: 50px;
    left: 450px;
    border-radius: 20px;
}

.insideroad {
    background-image: url(assets/road4.png);
    background-repeat:initial;
    height: 1900vh;
    width: 52.5vw;
    position: absolute;
    top: 0;
    left: 24.5%;
    z-index: -99;
}

#medical {
    width: 50px;
    transform: rotate(180deg);
    place-items: center;
    position: absolute;
    left: 642px;
    z-index: 100;
}

#police {
    width: 50px;
    height: 110px;
    place-items: center;
    position: absolute;
    left: 642px;
    z-index: 100;
}

#car1 {
    place-items: center;
    position: absolute;
    width: 70px;
    height: 120px;
    left: 360px;
    z-index: 100;
}

#car2 {
    place-items: center;
    position: absolute;
    width: 70px;
    height: 120px;
    left: 470px;
    z-index: 100;
}

#car3 {
    place-items: center;
    position: absolute;
    width: 70px;
    height: 120px;
    left: 538px;
    z-index: 100;
}

#car4 {
    place-items: center;
    position: absolute;
    width: 70px;
    height: 120px;
    left: 700px;
    z-index: 100;
    transform: rotate(180deg);
}

#car5 {
    place-items: center;
    position: absolute;
    width: 70px;
    height: 120px;
    left: 830px;
    z-index: 100;
    transform: rotate(180deg);
}
#car6 {
    place-items: center;
    position: absolute;
    width: 70px;
    height: 120px;
    left: 930px;
    z-index: 100;
}
.cars{
    border-radius: 20px;
}
/* -----keyframes-cars-------- */
@keyframes car1 {
    0% {
        top: -30vh;

    }
    100% {
        top: 100vh;
    }
}

@keyframes car2 {
    0% {
        top: -30vh;

    }

    100% {
        top: 100vh;
    }
}

@keyframes car3 {
    0% {
        top: -30vh;

    }

    100% {
        top: 100vh;
    }
}

@keyframes car4 {
    0% {
        top: -30vh;

    }

    100% {
        top: 100vh;
    }
}

@keyframes car5 {
    0% {
        top: -30vh;

    }

    100% {
        top: 100vh;
    }
}

@keyframes car6 {
    0% {
        top: -30vh;

    }

    100% {
        top: 100vh;
    }
}

@keyframes medical {
    0% {
        top: 100vh;

    }

    100% {
        top: -100vh;
    }
}

@keyframes police {
    0% {
        top: 150vh;

    }

    100% {
        top: -100vh;
    }
}

@keyframes road {
    0% {
        top: -1500vh;

    }

    100% {
        top: -200vh;
    }
}
/* -------------gameplay-responsive------------------- */
@media only screen and (max-width: 700px){
    .container2{
        background-image: url(assets/road4.png);
    }
    .insideroad{
        width: 100%;
        left: 0;
    }
    .logo{
        transform:scale(.7);
        position: absolute;
        right: -10px;
    }
    p{
        transform:scale(.5);
        position: absolute;
        left: -50px;
        top: o;
    }       
    .usercar {
        transform: scale(0.8);
        top: 20;
        left: 20;
        visibility: hidden; 
    }
    .insideroad {
        transform:scale(.9);
        background-repeat:no-repeat;
        height: 100vh;
        width: 100vw;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -99;
    }
    
    #medical {
        display: none;
    }
    
    #police {
        display: none;
    }
    
    #car1 {
        transform: scale(0.8);
        width: 70px;
        left: 50px;
        top: 100px;
    }
    
    #car2 {
        transform: scale(0.8);
        width: 70px;
        left: 150px;
        top: 100px;
    }
    
    #car3 {
        transform: scale(0.8);
        width: 70px;
        left: 250px;
        top: 100px;
    }
    
    #car4 {
        display: none;
    }
    
    #car5 {
        display: none;
    }
    #car6 {
        display: none;
    }
    #tap{
        width: 110vw;
        height: 110vh;
    }
}

/* -----------------------------gameover-page----------------------------- */
.container3 {
    background: url(assets/gameoverbg.jpg);
    background-size: cover;
    height: 100vh;
    color: #630001;
    padding: 3%;
    font-family: 'inter';
}

#home {
    width: 80px;
}

#Havean {
    position: absolute;
    top: 70px;
    left: 10%;
    font-weight:bold;
    background-color: #cec1c13b;
    border-radius: 10px;
    padding: 5px;
    border: black solid 2px;
    font-style: italic;
    font-size: 27px;
}
#playagain {
    position: absolute;
    bottom: 50px;
    width: 250px;
    left: 70%;
}

.score,.hiscore {
    width: 250px;
    display: block;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: rgba(245, 222, 179, 0.342);
    border-radius: 30px;
    padding: 30px;
}
#phrases{
    font-size: 20px;
    color:#FBFB3A;
    width: 250px;
    display: block;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #a4b50754;
    border-radius: 30px;
    padding: 30px;
}
.whole {
    position: absolute;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 60%;
    text-align: center;
    margin-left: 40px;
    top: 35%;
}

h2 {
    color: rgb(0, 0, 0);
    font-size: 40px;
}

h1 {
    font-family: 'hanalei fill';
    font-size: 60px;
    font-weight: bolder;
    color: black;
}
h3{
    position: absolute;
    top: 50px;
    right: 150px;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.863);
    padding: 10px;
    border-radius: 10px;
}
/* ----------gameover-page-responsive------------------- */
@media only screen and (max-width: 700px){
    .container3{
        height: auto;
        width: 100vw !important;
        height:100vh !important ;
    }
    .whole{
        position: absolute;
        transform:scale(.5);
        width: auto;
        margin-left: -130px;
    }
    .container3 p{
        font-weight: 900;
        margin-right: 20px;
        font-size: x-large;
    }
    #home{
        transform:scale(.7);
    }
    #playagain{
        transform:scale(.7);
        position: absolute;
        bottom: 30px;
        left: 20px;
    }
    h3{
        top: 25px;
        right: 7px;
        transform:scale(.8);
        opacity: .8;
    }
}
@media only screen and (max-width: 390px){
    .container3{
        height: auto;
        width: 100vw !important;
        height:100vh !important ;
    }
    .whole{
        transform:scale(.4);
        left:-85px;
    }
    #Havean{
        font-size: 35px;
        position: absolute;
        top: 15;
        left: 0;
    }
}


/* ------------------------------------------END-------------------------------------------------- */