@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    background-color: #2B2B2D;
    margin: 0;
    padding: 0;
    font-family: 'Press Start 2P', cursive;
    overflow: hidden;
}

main {
    display: none;
    color: white;
    width: 95%;
    margin: 50px auto;
    margin-top: 0px;
    display: grid;
    grid-template-rows: 5rem 20rem 20rem;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 1rem;
    font-size: 1.5rem;
}

/* title bar */
main div:not(.div1) {
    scale: .8
}

/* title bar  */
.div1 {
    grid-row: 1/2;
    grid-column: 1/-1;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
}

/* computer icon*/
.div2 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* computer choice */
.div3 {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

}

/* result */
.div4 {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    grid-row: 2/3;
    grid-column: 3/-1;
}



/* user choice */
.div5 {
    grid-column: 2/3;
}

/* user choices buttons container  */
.button-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    align-content: center;
}

/* user icon */
.div6 {
    grid-row: 3/4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}


img,
button {
    border-radius: 50%;

}

button {
    margin: 2rem;
}

/* choices background color  */
#rock-button {
    background-color: #C94E98;
}

#paper-button {
    background-color: #51ACE8;
}

#scissors-button {
    background-color: #FAED4C;
}

/* choices background color on hover  */
#rock-button:hover,
#paper-button:hover,
#scissors-button:hover {
    opacity: 0.5;
}


img {

    object-fit: cover;
}

/* user choice image properties  */
.choice {
    height: 12rem;
    width: 10rem;
    min-width: 1rem;
    min-height: 1rem;

}

/* computer choice image properties  */
.computer-choice {
    height: 12rem;
    width: 10rem;
    min-width: 1rem;
    min-height: 1rem;
    position: relative;
    animation: topToBottom .1s;
    animation-timing-function: ease-in;
}

/* setting size of computer icon and user icon  */
.participant {
    height: 5rem;
    width: 5rem;
}

/* caption below computer icon and user icon  */
.caption {
    font-size: 1rem;
}

/* result box  */
#result {
    position: relative;
    animation: myResult .1s;
    animation-timing-function: ease-in;
    font-size: 1rem;
}

/* computer icon animation  */
.robot {
    position: relative;
    animation: jump 1s infinite;
    animation-timing-function: ease-in;
}

/* this class will be toggled on choice images by selecting a choice by user  */
.animate-up {
    position: relative;
    top: -3rem;
}

/* modal container  */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4);
    /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    /* Could be more or less, depending on screen size */
}

/* The modal-modal-close Button */
.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

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

#modal-button {
    cursor: pointer;
}

/* start screen container  */
.play-container {
    z-index: 2;
    height: 100vh;
    width: 100vw;
    background-color: #2B2B2D;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    gap: 2rem;
}

/* start button container  */

.play-button-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 8rem;
    height: 8rem;
}

/* start button  */
.start-button {
    outline: none;
    border: none;
    height: 8rem;
    width: 8rem;
    animation: growup 1s infinite;
    animation-timing-function: ease-in;
}

/* plat text below start image  */
.play-text {
    display: block;
    color: green;
    font-size: 2rem;
    margin: 2rem;
    position: relative;
    animation: bottomToUp 1s 1;
    animation-timing-function: ease-in;
}

/* rock, paper and scissors icon container on start screen  */
.icons-container {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: rightToLeft .4s 1;
    animation-timing-function: ease-in;
}

/* rock, paper and scissors icon on start screen  */

i {
    font-size: 5rem;
    color: green;
}

/* scissors icon on start screen  */
.scissors-icon {
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);

}

#scissors-icon {
    color: #FAED4C;
    transform: rotate(80deg);
}

/* rock icon on start screen  */
#rock-icon {
    position: relative;
    color: #C94E98;

}

/* paper icon on start screen  */
#paper-icon {
    color: #51ACE8;
}

/* Rock, paper, scissors ttile on start screen  */
.game-title {
    position: relative;
    color: white;
    font-size: 1rem;
    animation: leftToRight 1s 1;
    animation-timing-function: ease-in;
}



/* animations */

/* animation for computer choice image  */
@keyframes topToBottom {
    from {
        top: -3rem;
    }

    to {
        bottom: 1rem;
    }
}

/* animation for computer icon  */
@keyframes jump {
    from {
        top: -1rem;
    }

    to {
        bottom: 0;
    }
}

/* animation for start screen play button icon  */
@keyframes growup {
    0% {
        height: 5.5rem;
        width: 5rem;
    }

    50% {
        height: 5.7rem;
        width: 5.7rem;
    }

    100% {
        height: 6rem;
        width: 6rem;
    }

}

/* animation for  */
@keyframes rightToLeft {
    from {
        left: calc(100% - 50%);
    }

    to {
        left: 0;
    }

}

@keyframes leftToRight {
    from {
        right: calc(100% + 50%);
    }

    to {
        right: 0;
    }

}

@keyframes bottomToUp {
    from {
        bottom: -20rem;
    }

    to {
        bottom: 0;
    }

}

/* media queries */

@media screen and (height <601px) {
    main {
        scale: .8;
        margin-top: -4rem;
    }

}

@media screen and (width < 310px) {
    .game-title {
        font-size: .7rem;
    }
}


@media screen and (width <601px) {
    main {
        display: flex;
        flex-direction: column;
        justify-content: center;
        font-size: .5rem;
    }

    .choice {
        width: 5.5rem;
        height: 6.5rem;
        margin: 0;
    }

    /* comp choice */
    .div3 {
        margin: 1rem;
    }

    /* result   */
    .div4 {
        margin-bottom: 2rem;
    }

    /* user choice  */
    .div5 {
        width: 98vw;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    .button-container {
        width: 95%;
        scale: 1;
    }

    button {
        margin: .2rem;
    }

    .participant {
        height: 3rem;
        width: 3rem;
    }

    .computer-choice {
        height: 4rem;
        width: 3.5rem;
        scale: 1.5;
    }

    .animate-up {
        top: -1.5rem;
    }

}