*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Colors */
:root {
    --clr-darkorange: #E65738;
    --clr-paleorange: #FEE4D6;
    --clr-lightblue: #EBEFF2;
    --clr-lightbluealt: #839FB4;
    --clr-paleblue: #5A7E99;
    --clr-midblue: #34536A;
    --clr-darkblue: #293441;
    --clr-white: white;

    /* Fonts */
    --clr-fwhite: white;
    --clr-forange: #E65738;
    --clr-fblue: #293441;
    --clr-fblack: black;

}

/*
2. Remove default margin
    */
* {
    margin: 0;

}

/* Fonts used Anton, Rubik , Silkscreen, Caveat  */

/*
    Typographic tweaks!
    3. Add accessible line-height
    4. Improve text rendering
    */
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* font-family: Rubik Bubbles; */
    font-family: Caveat;
    background-color: var(--clr-darkblue);

}

h1 {
    text-align: center;
    color: var(--clr-darkorange);
    margin-top: 1rem;
}

.subhead {
    text-align: center;
    color: var(--clr-fwhite);

}

.mainContainer {
    width: 90%;
    max-width: 1100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;

}

#infoContainter {
    border-radius: 30px;
    padding: 0.5rem;
    margin: 2rem 1rem 2rem 2rem;
    max-width: 35%;
    background-color: var(--clr-paleblue);
}

.spacer {
    margin: 0.5rem 0;
    border: 1px solid var(--clr-paleblue);
    box-shadow: 1px 2px 4px var(--clr-midblue);
}

.rules {
    background-color: var(--clr-lightblue);
    border-radius: 30px;
    margin-top: 0.25rem;
}

ul {
    padding: 0.5rem 0.5rem 0.5rem 2rem;
}

.contain {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    color: var(--clr-fwhite);
}

#controls {
    display: flex;
    justify-content: space-evenly;
    margin: 1rem 0 0.5rem 0;
}

#controls button,
#difficulty button {
    width: 30%;
    margin: 1 0.25rem;
    border-radius: 20px;
    font-family: Caveat;
    font-size: 1rem;
    font-weight: bolder;
    border: 0;
    background-color: var(--clr-white);
}

#controls button:hover,
#difficulty button:hover {
    background-color: var(--clr-darkorange);
    color: var(--clr-fwhite);
    border: 0;
}
#difficulty button:visited {
    background-color: var(--clr-darkorange);
    color: var(--clr-fwhite);
    border: 0;
}

#difficulty,
#myScore {
    background-color: var(--clr-midblue);
    border-radius: 15px;
    padding: 0.25rem;
}

#difficulty {
    display: flex;
    justify-content: space-between;
}

#difficulty button {
    margin: 0.25rem;
    box-shadow: 1px 1px 2px var(--clr-paleblue);
}

.grid {
    display: flex;
    flex-wrap: wrap;
    width: 452px;
    height: 452px;
    padding: 0 0;
    margin: 2rem 1.5rem;
}

.square {
    width: 150px;
    height: 150px;
    border: 1px solid var(--clr-fblue);
    border-radius: 30px;
    background-color: var(--clr-white);
}

.lose {
    background-color: var(--clr-darkorange);
}


.mole {
    background-image: url(images/mole-icon.jpg);
    background-size:contain;
    background-repeat: no-repeat;
}

.rise-shake:active {
    animation: jump-shaking 0.1s infinite;
}

@keyframes jump-shaking {
    0% {
        transform: translateX(0)
    }

    25% {
        transform: translateY(-4px)
    }

    35% {
        transform: translateY(-4px) rotate(6deg)
    }

    55% {
        transform: translateY(-4px) rotate(-6deg)
    }

    65% {
        transform: translateY(-4px) rotate(6deg)
    }

    75% {
        transform: translateY(-4px) rotate(-6deg)
    }

    100% {
        transform: translateY(0) rotate(0)
    }
}

/* media queries */
/* 
@media all and (min-width: 768px) and (max-width: 1024px) { 

}
@media all and (min-width: 480px) and (max-width: 768px) {

 }
@media all and (max-width: 480px) { 

} */

/* media queries min-width 320px, */

@media all and (min-width: 768px) and (max-width: 1024px) {
    /* .mainContainer {
        flex-direction: row;

    } */

    #infoContainter {
        max-width: 45%;
        margin: 2rem 0;
    }

    .grid {
        width: 55%;
        margin: 1rem 1rem 1rem 1rem;
    }

    .square {
        width: 33%;
        height: 33%;
    }

    #difficulty button {
        width: 45%;
        margin: 0 0.25rem;
    }

    #controls button {
        width: 45%;
        margin: 1rem 0.25rem;
        
    }
}

@media all and (min-width: 480px) and (max-width: 768px) {
    .mainContainer {
        flex-direction: column;
    }

    #infoContainter {
        max-width: 60%;
        margin: 2rem 1rem 2rem 0.5rem;
    }

    .grid {
        width: 100%;
        margin: 2rem auto;
    }

    .square {
        width: 33%;
        height: 33%;
    }

    #difficulty button {
        width: 45%;
        margin: 0 0.25rem;
    }

    #controls button {
        width: 45%;
        margin: 1rem 0.25rem;
    }
}

@media all and (min-width: 320px) and (max-width: 480px) {
    h1 {
        margin-top: 2rem;
    }

    .mainContainer {
        flex-direction: column;
        width: 90%;
    }

    #infoContainter {
        max-width: 90%;
        margin: 2rem auto;
    }

    .subhead {
        margin: 0.25rem 0;
    }

    h2 {
        font-size: 20px;
    }

    .rules {
        font-size: 15px;
        margin-bottom: 0;
    }

    ul {
        padding-left: 1.75rem;
    }

    #difficulty {
        padding: 0.156rem;
        margin: 0;
    }

    .spacer {
        margin-bottom: 0.25rem;
        margin-top: 0;
    }

    /* #myscore {
        margin: 0;
    } */

    .grid {
        width: 101%;
        height: 0%;
        margin: 10rem auto;
    }

    .square {
        width: 33%;
        height: 30vw;
        /* height: 30vw; */
    }

    #controls button,
    #difficulty button {
        width: 80%;
        margin: 0.25rem 0.25rem;
    }

    #controls {
        margin-top: 0.75rem;
    }
}

@media all and (max-width: 319px) {
    h1 {
        margin-top: 2rem;
    }

    .mainContainer {
        flex-direction: column;
        min-width: 90%;
    }

    #infoContainter {
        max-width: 90%;
        margin: 2rem auto;
    }

    .subhead {
        margin: 0.25rem 0;
    }

    h2 {
        font-size: 20px;
    }

    .rules {
        font-size: 15px;
        margin-bottom: 0;
    }

    ul {
        padding-left: 1.75rem;
    }

    #difficulty {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0.156rem;
        margin: 0;
    }

    .spacer {
        margin-bottom: 0.25rem;
        margin-top: 0;
    }

    /* #myscore {
        margin: 0;
    } */

    .grid {
        width: 101%;
        height: 0%;
        margin: 10rem auto;
    }

    .square {
        width: 33%;
        height: 30vw;
        /* height: 30vw; */
    }

    #difficulty button {
        width: 95%;
        margin: 0.25rem 0.25rem;

    }

    #controls button {
        width: 80%;
        margin: 0.25rem 0.25rem;
    }

    #controls {
        margin-top: 0.75rem;
    }
}