*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body{
    text-align: center;
    padding: 10px;
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    background: url(img/bg.jpg) no-repeat;  
    background-size: cover;
    background-position:center;
    font-family: "Barriecito", system-ui;
}

main{
    width: 60%;
    margin: 0 auto;
    padding: 10px;
    border-radius: 8px;
}

#choice{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 5px;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
}

h1{
    box-shadow: 0 0 10px black;
    border-radius: 8px;
    white-space: nowrap;
    padding: 5px 0;
    margin-bottom: 10px;
}

p{
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.img-container{
    width: 8rem;
    height: 8rem;
    display: flex;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 10px black;
}

img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all .1s linear;
}

.img-container:active{
    transform: translateY(5px);
}

#gameDisplay{
    margin: 10px 0;
    padding: 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 0 10px black;
    border-radius: 10px;
}

#gameDisplay span:nth-child(2) img{
    height: 50px;
    width: 50px;
}

.all-result{
    border-radius: 8px;
    box-shadow: 0 0 10px black;
    backdrop-filter: blur(10px);
    padding: 10px;
}

.resultDisplay{
    color: white;
    font-weight: bold;
    font-size: 30px;
    padding: 10px;
    font-family: "Rowdies", sans-serif;
}

.resultD{
    font-size: 2.6rem;
    animation: drop .8s linear;
}

@keyframes drop {
    0%{
        transform: translateY(-100px);
        
    }
    70%{
        transform: translateY(50px);
        transform: rotate(180deg);
    }
    100%{
        transform: translateY(0);
        transform: rotate(360deg);
    }
}

.player-area, .computer-area{
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    overflow: hidden;
}

.scoreDisplay{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    color: white;
}

#score{
    border-left: 2px solid white;
    border-right: 2px solid white;
    border-left: 2px solid white;
    display: flex;
    gap: 20px;
    padding: 5px 15px;
    font-size: 25px;
}

#name{
    white-space: nowrap;
    background-color: black;
    padding: 4px;
    border-radius: 8px;
    text-align: center;
}

.player-area img,
.computer-area img{
    display: none;
}

.shake{
    animation: shake .8s linear;
}

.shakeReverse{
    animation: shakeReverse .8s linear; 
}


@keyframes shake {
    0%{
        transform: translateX(-1000px);
    }
    80%{
        transform: translateX(50px);
    }
    100%{
        transform: translateX(0);
    }
}

@keyframes shakeReverse {
    0%{
        transform: translateX(1000px);
    }
    80%{
        transform: translateX(-50px);
    }
    100%{
        transform: translateX(0);
    }
}


#count{
    color: #000;
    font-size: 30px;
    font-weight: bold;
    padding: 10px;
}

#reset{
    display: none;
    overflow: hidden;
    margin: 0 auto;
    border-radius: 50%;
    border: none;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color:#568f85;
    color: white;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from{
        transform: rotate(0deg);
    }
    to{
        transform: rotate(360deg);
    }
}

#reset:hover{
    transform: scale(1.2);
}


@media (max-width: 768px) {
    main{
        width: 100%;
    }
    .img-container{
        width: 6.1rem;
        height: 6.1rem;
    }
    #count{
        color: white;
    }
    h1{
        font-size: 1.7rem;
    }
    #gameDisplay span:nth-child(2) img{
        height: 35px;
        width: 35px;
    }
    .player-area, .computer-area{
        height: 8rem;
        width: 8rem;
    }
}