@font-face {
    font-family: "MouldyCheese";
    src: url('../MouldyCheeseRegular-WyMWG.ttf');
}

body {
    width: 95vw;
    background-size: cover;   
    text-align: center;
    color:black;
    display: grid;
}

@media all and (orientation: landscape) {

    body {
        background-image: url('../images/lightsand.webp');
        grid-template-rows: 2rem 5rem 1fr 1fr;
        grid-template-columns: 1fr 1fr;
        height: 95vh;
    }

    main {
        height: 100vh;
        width: 116vh;
        grid-row: 1 / 5;
        grid-column: 1 /2;
        display: grid;
        grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    }

    #winningbox {
        height: 100vh;
        width: 100vh;
        grid-row: 1 / 5;
        grid-column: 1 /2;
    }

    .card {
        height: 15vh; /*24vh /*19vh;*/
    }
    
    nav {
        grid-row: 1 / 2;
        grid-column: 2 / 3;
    }

    #title {
        grid-row: 2 / 3;
        grid-column: 2 / 3;
    }

    #buttonarea {
        grid-row: 3 / 4;
        grid-column: 2 / 3;
    }

    #foundcardarea {
        grid-row: 4 / 5;
        grid-column: 2 / 3;
    }

    .foundcard {
        height: 10vh;
        margin: 5px;
    }
}

@media all and (orientation: portrait) {

    body {
        background-image: url('../images/lightsand-portrait.webp');
        grid-template-rows: 2rem 5rem 1fr auto auto;
        grid-template-columns: 1fr;
    }

    nav {
        grid-row: 1 / 2;
    }

    #title {
        grid-row: 2 / 3;
    }

    main {
        grid-row: 3 / 4;
        height: 120vw;
        width: 100vw;
        display: grid;
        grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    }

    #winningbox {
        height: 100vw;
        width: 100vw;
        grid-row: 3 / 4;
    }

    .card {
        height: 15vw;
        width: 15vw;
    }

    #buttonarea {
        grid-row: 4 / 5;
        margin-bottom: 1rem;
        height: fit-content;
    }

    #foundcardarea {
        grid-row: 5 / 6;
        height: fit-content;
    }

    .foundcard {
        height: 10vw; /*12vw;*/
        margin: 5px;
    }
}


/* nav */

#homebutton {
    height: 3rem;  
    margin-right: 5px; 
}

#homebox {
    display: grid;
    grid-template-columns: auto auto;
    width: fit-content;
    font-size: larger;
    float: right;
    margin-right: 20px;
}

/* title */

h1 {
    font-family: "MouldyCheese";
    letter-spacing: 0.3rem;
    margin-bottom: 0px;
}


/* game */

#winningbox {
    position: absolute;
    display:grid;
    grid-template-rows: 1fr 1fr 1fr;
    align-items: center;
    justify-content: center;
    font-family: "MouldyCheese";
}

#congratulations {
    grid-row: 1 / 2;
    font-size: 4rem;
    letter-spacing: 0.3rem;
    color:hsl(0, 100%, 30%);
}

#winningtext {
    grid-row: 2 / 3;
    font-size: xx-large;
    letter-spacing: 0.1rem;
}

#playagain {
    grid-row: 3 / 4;
    background-color: hsl(35, 40%, 70%);
    font-size: x-large;
    font-family: "MouldyCheese";
    letter-spacing: 0.3rem;
    margin: 0.5em;
    padding: 0.5em;
}
#playagain:hover {
    background-color: hsl(35, 40%, 60%);
}



/* button area */

#movesCounter {
    font-size: 2.5rem;
    font-family: "MouldyCheese";
    margin-bottom: 0;
}

/*#newgamebutton {
    background-color: hsl(35, 40%, 90%);
    font-size: x-large;
    font-family: "MouldyCheese";
    letter-spacing: 0.3rem;
    margin: 0.5em;
    padding: 0.5em;
}
#newgamebutton:hover {
    background-color: hsl(35, 40%, 80%);
}*/

#howtoplaybutton {
    background-color: hsl(35, 40%, 90%);
    font-size: x-large;
    font-family: "MouldyCheese";
    letter-spacing: 0.3rem;
    margin: 0.5em;
    padding: 0.5em;
}
#howtoplaybutton:hover {
    background-color: hsl(35, 40%, 80%);
}

.choice {
    font-family: "MouldyCheese";
    font-size: x-large;
    letter-spacing: 0.2rem;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 0;
}

.difficultybutton {
    background-color: hsl(35, 40%, 90%);
    margin: 0.5rem;
    font-family: "MouldyCheese";
    width: 25%;
}

.difficultybutton:hover {
    background-color: hsl(35, 40%, 80%);
}

.difficultybutton .big {
    font-size: x-large;

}
.difficultybutton .small {
    font-size: large;
}

#button15 {
    border: 5px solid red;
    background-color: hsl(35, 40%, 70%);
}

button:hover {
    cursor: pointer;
}

/* found card area */

#foundcardarea {
    /*background-color:darkkhaki;*/
    display:grid;
    justify-content: center;
    align-items: flex-end;
    
}
#foundcardbox {
    /*background-color:cadetblue;*/
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    height: fit-content;
    width: fit-content;
  }

.foundcard {
    margin: 4px;
    object-fit: contain;
}

a {
    text-decoration: none;
    font-family: "MouldyCheese";
    letter-spacing: 0.2rem;
}

a:link {
    color:black;
}
a:visited {
    color: black;
}


/* how to play box*/

#howtoplay {
    position: absolute;
    height: 70vh;
    width: 80vw;
    background-color: hsl(35, 40%, 90%);
    border: 7px ridge hsl(35, 40%, 45%);
    top: 7rem;
    justify-self: center;
    border-radius: 1%;
    font-family: "MouldyCheese";
    font-size: x-large;
    line-height: 1.4;
    display: none;
    padding: 2rem;
}

.example {
    height:3rem;
    justify-self: center;
}

.closehowtoplaybutton {
    background-color: hsl(35, 40%, 75%);
    border-radius: 10px;
    font-family: "MouldyCheese";
    font-size: x-large;
}
.closehowtoplaybutton:hover {
    background-color: hsl(35, 40%, 65%);
}

#closehowtoplay1 {
    height: 3rem;
    width: 3rem;
    justify-self: right;
}

#closehowtoplay2 {
    height: 3rem;
    width: 20rem;
    justify-self: center;
}

