/* GENERAL ELEMENTS */

@import url('https://fonts.googleapis.com/css2?family=Allerta+Stencil&display=swap');
html {
    height: 100%;
    display:block;
  }

body {
    margin: 0px;
    padding: 0px;
    background-image: url("../images/mainBackground.png");
    background-size: cover;
    font-family: 'Allerta Stencil';
    font-size: 14px;
    display: flex;  
    justify-content: center;
    align-items: center;
}


h1 {
    text-transform: uppercase;
    font-size: 3em;
    text-align: center;
}

h2 {
    text-align:center;
}


/* ELEMENTS FROM SPLASHSCREEN */
.splashScreen {
    margin: 10px auto;
    width: 450px;
    border: 10px solid black;
    padding: 0px;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content:space-between;
    align-items: center;
    transition: all 2s ease-in-out;
    transform: scaleY(0.95);
}

.splashScreen h1 {
    padding: 20px;
    margin: 0px;
}

.characterChoice {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    text-align: center;
}

.instructions {
    padding: 10px 200px;
}

.instructions div {
    padding-top: 0px;
    margin: 0px;
    display:flex;
    width: 350px;
    justify-content:space-between;
    align-content: center;
}

.instructions h2 {
    margin-bottom: 10px;
}

.start {
    margin: 25px auto;
    padding: 0px;
}

#startBtn {
    border: 5px solid black;
    padding: 30px;
    font-size: 2.5em;
    font-family: 'Allerta Stencil';
}

#characterImages {
    display: flex;
    justify-content:space-between;
    align-content: center;
    padding: 0px 35px;
    margin: 0px;
}

#characterImages button {
    background-size: contain;
    height: 90px;
    width: 70px;
    border:10px solid #ABF5E9;
    border-radius: 10px;
    
}

#characterImages button:hover {
    box-shadow: 5px 10px grey;
}

#characterImages button:focus {
    box-shadow: 5px 10px black;
}

#player1 {
    background: url("../images/girlFront.png"), #ABF5E9;
 
}

#player2 {
    background: url("../images/boyFront.png"),#ABF5E9;
   
}

/* ELEMENTS FROM GAMESCREEN */
.sceneCanvas {
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    justify-content:space-between;
    align-items: center;
    flex-wrap: wrap;  
}

.gameScreen h1 {
    padding-top: 10px;
    font-size: 3em;
    color: white;
    text-align: center;
}

.gameScreen {
    display: flex;
    flex-direction: column;
    align-content: center;
    transition: all 2s ease-in-out;
}

/* ELEMENTS FROM GAMEOVERSCREEN */
.gameOverScreen {
    width: 70%;
    margin: 30px auto;
    padding: 60px 15px;
    background-color: white;
    border: 10px solid black;
    display: flex;
    flex-direction: column;
    justify-content:space-between;
    align-items: center;
    flex-wrap: wrap; 
}

.gameOverScreen h1 {
    padding: 1px;
    font-size: 3em;
}

.gameOver {
    text-align: center;
}

.gameOver h1 {
    font-size: 2em;
}

#scoreBar {
    width: 70%;
    margin: 10px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#finalScore {
    flex-grow: 0.8;
    text-align: center;
    border: 3px solid black;
}

#reStartBtn {
    padding: 5px 15px;
    font-size: 1.5em;
    font-family: "Allerta Stencil";
    border: 3px solid black;
}


#reStartBtn:hover {
    box-shadow: 5px 10px grey;
}

#reStartBtn:focus {
    box-shadow: 5px 10px black;
}

.splashScreen #copyright, .gameOverScreen #copyright {
    margin-top: 10px;
    padding: 0px;
    color:grey;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.splashScreen #copyright p, .gameOverScreen #copyright p {
    margin-right: 4px;
}

.gameScreen #copyright {
    padding-top: 20px;
    padding-bottom: 20px;
    color:grey;
    text-align: center;
}

#responsive {
    display:none
}

@media (max-width: 600px) and (orientation: portrait){
    body, html { overflow-x:hidden; }
    body {
        width: auto;
        height:auto;
        
    }
    .splashScreen {
        width: 90%;
        margin: auto;
        height:auto;
        border: 5px solid black;    
        justify-content: center;
    }

    .instructions {
        display:flex;
        flex-direction: column;
        align-items:center;  
        margin-bottom: 0px;
    }

    .instructions div{
        width:200%;
        display:flex;
        flex-direction: column;
    }

    .instructions h2 {
        margin-top: 5px;
    }

    .start {
        margin: 10px auto;
    }

    #startBtn {
        border: 5px solid black;
        padding: 12px;
        font-size: 2.5em;
        font-family: 'Allerta Stencil';
    }
    
    #copyright {
        margin-top: 0px;
    }

    .gameScreen #copyright {
        margin-top: 25px;
        padding-top: 0px;
        color:grey;
    }

    .gameScreen {
        width: 100%;
        margin: 0;
        padding:0;        
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .sceneCanvas {
        /* --prop: Math.min(availabl); */
        transform: scale(0.42);
        transform-origin:0 0;
        margin-top: 0px;
        margin-bottom: -450px;
        display: flex;
        justify-items: center;
        align-items: center;
        margin-left: auto;
        margin-right: 10px;
    }
    
    #responsive {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-top: 15px;
        margin-bottom: -15px;        
    }

    #responsive .btn{
        border: 3px solid white;
        font-weight: 700;
        background-color: #FAAA8C;
        font-size: 1.2em;
    }

    #responsive div {
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 500px;
    }

    #btn-right {
        padding-left: 30px;
    }

    #btn-left {
        padding-right: 30px;
    }

    #btn-right, #btn-left {
        padding-top:4px;
        padding-bottom:4px;
    }

    #btn-up, #btn-down {
        padding: 2px 30px;
    }

    #btn-up {
        padding-bottom: 5px;
    }

    #btn-down {
        padding-top: 5px;
    }

    .gameOverScreen{
        width: 80%;
        padding: 20px 15px;
        margin: 15px auto;
        border: 5px solid black;    
        justify-content: center;
    }

    #scoreBar {
        width: 75%;
        flex-wrap: wrap;
        justify-content: center
    }

    #scoreBar h2 {
        margin-right: 10px;
    }

    #reStartBtn {
        padding: 5px 1px;
    }

    .gameTitle {
        margin-top: 10px;
        margin-bottom: 5px;
    }

    #finalScore {
        border:none;
        color:white;
        background-color: black;
    }
}

@media (max-width: 415px) and (orientation: portrait){
    .sceneCanvas {
        transform: scale(0.52);
        transform-origin:0 0;
        margin-bottom: -380px;
    }
    #responsive {
        margin-bottom: -10px;
    }
}

@media (max-width: 376px) and (orientation: portrait){
    .sceneCanvas {
        transform: scale(0.47);
        transform-origin:0 0;
        margin-bottom: -430px;
    }
}

@media (max-width: 361px) and (orientation: portrait){
    .sceneCanvas {
        transform: scale(0.45);
        transform-origin:0 0;
        margin-bottom: -450px;
    }
}

@media (max-width: 320px) and (orientation: portrait){
    .sceneCanvas {
        transform: scale(0.4);
        transform-origin:0 0;
        margin-bottom: -500px;
    }

    #copyright {
        font-size: 0.9em;
    }

    #responsive {
        margin-bottom: -22px;
    }
}





