@import url('https://fonts.googleapis.com/css2?family=Mandali&family=Raleway:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

body {
    background-color: coral;
    text-align: center;
    position: relative;
    font-family: raleway, Arial, Helvetica, sans-serif;
}

/* Heading */
h1 {
    margin: auto;
    padding: 20px;
    font-size: 40px;
}

/* Game area */
#game-area {
    margin: 0;
    height: auto;
    border-color: black;
    background-color: aqua;
    border-radius: 5px;
}

#win-lose-message {
    display: inline-block;
}

/* Score tally */
.scores {
    display: inline-block;
    box-sizing: border-box;
}

.won {
    margin-right: 20px;
    text-align: left;
}

.drawn {
    margin: 0 20px;
    text-align: center;
}

.lost {
    margin-left: 20px;
    text-align: right;
}

/* User pick and random generated pick */
#game-picks {
    height: auto;
    width: auto;
    display: inline-block;
    text-align: center;
}

.pick-display {
    background-color: beige;
    width: 175px;
    height: 175px;
    display: inline-block;
    border-radius: 175px;
    margin: 20px;
    border: 5px solid beige;
    align-items: center;
}

#users-pick {
    display: inline-block;
    align-items: center;
    margin: 0;
    padding: 20px;
}

#users-pick img {
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
}

#random-pick {
    display: inline-block;
    align-items: center;
    margin: 0;
    padding: 20px;
}

#random-pick img {
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
}

/* User selections */
.hands {
    background-color: lightgrey;
    width: 125px;
    height: 125px;
    display: inline-block;
    border-radius: 125px;
    margin: 10px;
    border: 5px solid lightgrey;
}

.hands-img {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 110px;
}

.hands p {
    padding: 10px;
}

img {
    width: 90px;
    height: 90px;
}

/* Buttons */
#play-game-btn {
    display: block;
    margin: 20px;
    height: 50px;
}

#play-game-btn button {
    height: 50px;
    width: 100px;
    border-radius: 10px;
    font-size: 20px;
}

#rules-button {
    text-align: left;
    position: relative;
    right: 30%;
    top: 50px;
    display: inline-flex;
}

#reset-button {
    text-align: right;
    position: relative;
    left: 30%;
    top: 50px;
    display: inline-flex;
}

#rules img {
    width: 350px;
    height: 300px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-info {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close-modal {
    color: red;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Media queries */

/* To prevent how to play and reset buttons overlapping results message */
@media screen and (max-width: 900px) {

    #rules-button,
    #reset-button {
        top: 15px
    }
}

/* For large to medium screens sizes from 768px wide and down */
@media screen and (max-width: 768px) {

    /* User pick */
    .pick-display {
        width: 125px;
        height: 125px;
        display: inline-block;
    }

    /* User selections */
    .hands {
        width: 75px;
        height: 75px;
        display: inline-block;
        border-radius: 75px;
        margin: 20px;
    }

    .hands-img {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 90%;
    }

    .hands p {
        padding: 0px;
    }

    img {
        width: 80%;
        height: 80%;
    }
}

/* For medium screens sizes from 428px wide and down */
@media screen and (max-width: 428px) {
    h1 {
        font-size: 22px;
    }

    #result-message {
        height: 100px;
    }

    #win-lose-message {
        display: block;
        position: relative;
        top: 50px;
    }

    #game-picks {
        padding: 10px
    }

    .hands {
        margin: 10px;
    }

    .score-area p {
        margin: 5px;
        font-size: 15px;
    }

    #rules-button {
        right: 20%;
        top: 40px;
    }

    #reset-button {
        left: 20%;
        top: 40px;
    }
}

/* For medium screens sizes from 375px wide and down */
@media screen and (max-width: 375px) {
    h1 {
        font-size: 18px;
    }

    h2 {
        font-size: 20px;
    }

    #rules img {
        width: 100%;
        height: 100%;

    }

    #rules p {
        font-size: 14px;
    }

    .pick-display {
        width: 75px;
        height: 75px;
    }
}

/* For medium screens sizes from 320px wide and down */
@media screen and (max-width: 320px) {
    h1 {
        font-size: 14px
    }

    .hands {
        margin: 5px;
    }

    #rules p {
        font-size: 12px;
    }
}