@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@600;700&display=swap');
:root {
    --Background: radial-gradient(circle at 50% 20%, hsl(214, 47%, 23%), hsl(237, 49%, 15%));
    --scoreTxt: hsl(229, 64%, 46%);
    --darkTxt: hsl(229, 25%, 31%);
    --headerOutline: hsl(217, 16%, 45%);
    --scissor: linear-gradient(hsl(39, 89%, 49%), hsl(40, 84%, 53%));
    --paper: linear-gradient(hsl(230, 89%, 62%), hsl(230, 89%, 65%));
    --rock: linear-gradient( hsl(349, 71%, 52%), hsl(349, 70%, 56%));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 10px;
    font-family: 'Barlow Semi Condensed', sans-serif;
}

body {
    background: var(--Background);
    background-size: cover;
    min-height: 100vh;
    position: relative;
}


/* #TODO: Cabeçalho */

header {
    width: 100%;
    display: flex;
    justify-content: center;
}

nav {
    width: 80%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 3px solid var(--headerOutline);
    border-radius: 10px;
    margin-top: 2rem;
}

.container-score {
    display: flex;
    gap: 3rem;
}

.score {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 10px;
    min-width: 16rem;
}

.score>p {
    font-size: 2rem;
    color: var(--scoreTxt);
}

.score .player,
.score .computer {
    color: var(--darkTxt);
    font-weight: 700;
    font-size: 5.6rem;
}


/* #TODO: seção */

section {
    width: 100%;
    min-height: 30rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5rem;
    flex-direction: column;
    position: relative;
}


/* #TODO: container svg */

.container {
    width: 40rem;
    height: 35rem;
    background-image: url('../images/bg-triangle.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    /* background-color: rebeccapurple; */
    position: relative;
}

.paper,
.scissors,
.rock {
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 13rem;
    width: 13rem;
    box-shadow: inset -2px -10px 2px 2px rgb(0 0 0 / 25%);
}

.paper span,
.scissors span,
.rock span {
    background-color: #ffffff;
    height: 80%;
    width: 80%;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 5px 2px 2px rgb(0 0 0 / 25%);
}

.paper {
    background: var(--paper);
}

.scissors {
    background: var(--scissor);
}

.rock {
    background: var(--rock);
}

#paper {
    position: absolute;
    top: -3rem;
    cursor: pointer;
}

#scissors {
    position: absolute;
    right: 0;
    top: -3rem;
    cursor: pointer;
}

#rock {
    /* align-self: flex-end; */
    position: absolute;
    bottom: 0;
    right: 13.5rem;
    cursor: pointer;
}

#paper:hover,
#scissors:hover,
#rock:hover {
    box-shadow: 1px 1px 10px 5px #fff;
}

#paper:active,
#scissors:active,
#rock:active {
    transform: scale(0.9);
}


/* #TODO: Rules */

.rules {
    border: 1px solid var(--headerOutline);
    border-radius: 5px;
    width: 10rem;
    display: flex;
    justify-content: center;
    margin-right: 5rem;
    cursor: pointer;
    padding: .5rem;
    color: #fff;
    transition: .4s;
    position: absolute;
    right: 0;
    bottom: 0;
}

.rules span {
    font-size: 2rem;
}

.rules:hover {
    background-color: #fff;
    color: var(--darkTxt);
}


/* #TODO:resultados dos vencedores */

.container-results {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 0rem;
    position: relative;
}

.result-player,
.result-computer {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
    gap: 2rem;
}

.result-player,
.result-computer {
    position: relative;
}

.box {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 28rem;
    width: 28rem;
    border-radius: 50%;
    background: radial-gradient(#2C3B5A 38%, #293857 38% 50%, #233455 50% 100%);
    z-index: -1;
}


/* .result-player {
    flex-basis: 30%;
    background-color: blue;
    padding: 1rem;
}

.result-computer {
    flex-basis: 30%;
    padding: 1rem;
}

.again {
    flex-basis: 20%;
    padding: 1rem;
} */

.result-player p,
.result-computer p {
    font-size: 3rem;
    font-weight: 700;
}

.result-player .scissors,
.result-player .rock,
.result-player .paper,
.result-computer .scissors,
.result-computer .rock,
.result-computer .paper {
    height: 15rem;
    width: 15rem;
}

.again {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
    transition: .3s;
}

.match-result {
    font-size: 5rem;
    font-weight: 700;
    color: #ffffff;
}

.btn-play {
    cursor: pointer;
    width: 100%;
    font-size: 2rem;
    border: none;
    outline: none;
    padding: 1rem;
    color: var(--darkTxt);
    border-radius: 5px;
    background-color: #ffffff;
    transition: .2s;
}

.btn-play:hover {
    color: hsl(0, 100%, 67%);
}

.invisible {
    background: #131336;
    border-radius: 50%;
    height: 15rem;
    width: 15rem;
}


/* #TODO: Modal */

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 3rem 5rem rgba(0, 0, 0, 0.3);
    z-index: 10;
    padding: 3rem;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 5;
}

.head-modal {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.head-modal h1 {
    font-size: 3.5rem;
    color: var(--darkTxt);
}

.head-modal img {
    cursor: pointer;
    height: 2.5rem;
    width: 2.5rem;
}

.rules-img {
    height: 35rem;
}

footer {
    text-align: center;
    font-size: 1.6rem;
    color: whitesmoke;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}


/*  #TODO: responsvidade */

@media(max-width:920px) {
    .container-results {
        gap: 0;
        justify-content: space-around;
    }
}

@media(max-width:720px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    .score {
        padding: 1.5rem;
    }
    .score>p {
        font-size: 1.8rem;
        color: var(--scoreTxt);
    }
    .score .player,
    .score .computer {
        color: var(--darkTxt);
        font-weight: 700;
        font-size: 3rem;
    }
    .container {
        margin-bottom: 3rem;
    }
    .result-player,
    .result-computer {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #ffffff;
        gap: 2rem;
    }
    .result-player p,
    .result-computer p {
        font-size: 2.5rem;
        font-weight: 700;
    }
    .result-player .scissors,
    .result-player .rock,
    .result-player .paper,
    .result-computer .scissors,
    .result-computer .rock,
    .result-computer .paper,
    .invisible {
        height: 13rem;
        width: 13rem;
    }
    .match-result {
        font-size: 3rem;
        font-weight: 700;
        color: #ffffff;
    }
    .btn-play {
        cursor: pointer;
        width: 100%;
        font-size: 1.8rem;
        border: none;
        outline: none;
        padding: 1rem;
        color: var(--darkTxt);
        border-radius: 5px;
        background-color: #ffffff;
        transition: .2s;
    }
}

@media(max-width:520px) {
    .rules {
        left: 0;
        right: 0;
        bottom: -3rem;
        margin: 0 auto;
    }
    footer {
        position: static;
        text-align: center;
        margin: 0;
        margin-top: 5rem;
    }
    .container-results {
        
        height: 320px;
        width: 95%;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0;
        align-items: center;
              
        
    }
    .result-player,
    .result-computer {
       align-self: start;
    }
    .again {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0 auto;
        margin-bottom: 3rem;
        align-self: flex-end;
    }
    .btn-play {
        width: 50%;
    }
    .box {
        height: 23rem;
        width: 23rem;
    }
}

@media(max-width:450px) {
    .container-results {
        position: relative;
        min-height: 4vh;
    }
    .container-score {
        flex-direction: column;
    }
    .container {
        width: 90%;
        background-size: contain;
    }
    .paper,
    .scissors,
    .rock {
        height: 10rem;
        width: 10rem;
    }
    #paper {
        position: absolute;
        left: -1rem;
        top: -1rem;
    }
    #scissors {
        position: absolute;
        right: -1rem;
        top: -1em;
    }
    #rock {
        position: absolute;
        align-self: flex-end;
        bottom: 0;
        right: 0;
        left: 0;
        margin: 0 auto;
    }
    .result-player .scissors,
    .result-player .rock,
    .result-player .paper,
    .result-computer .scissors,
    .result-computer .rock,
    .result-computer .paper,
    .invisible {
        height: 11rem;
        width: 11rem;
    }
    .result-player p,
    .result-computer p {
        font-size: 2rem;
        font-weight: 700;
    }
    .again {
        /* background-color: red; */
        padding: 0;
    }
    .modal {
        width: 90%;
        justify-content: center;
        align-items: center;
    }
    .rules-img {
        height: 100%;
        width: 100%;
    }
    .box {
        height: 20rem;
        width: 20rem;
    }
}
@media(max-width:365px){
    .container-results {
        /* position: relative; */
        height: 60vh;
    }
}

@media(max-width:330px) {
    #paper {
        position: absolute;
        left: 0rem;
        top: 1rem;
    }
    #scissors {
        position: absolute;
        right: 0rem;
        top: 1rem;
    }

}

@media(max-width:290px) {
    .paper,
    .scissors,
    .rock {
        height: 8rem;
        width: 8rem;
    }
    #paper {
        position: absolute;
        left: 0rem;
        top: 3rem;
    }
    #scissors {
        position: absolute;
        right: 0rem;
        top: 3rem;
    }
    #rock {
        bottom: 3rem;
    }
    .result-player .scissors,
    .result-player .rock,
    .result-player .paper,
    .result-computer .scissors,
    .result-computer .rock,
    .result-computer .paper,
    .invisible {
        height: 9rem;
        width: 9rem;
    }
    .result-player p,
    .result-computer p {
        font-size: 1.8rem;
        font-weight: 700;
    }
}

.hidden {
    display: none;
}

.flip-horizontal-bottom {
    animation: flip-horizontal-bottom 0.4s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
}

.flip-horizontal-bottom-invisible {
    animation: flip-horizontal-bottom 0.4s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
}

@keyframes flip-horizontal-bottom-invisible {
    0% {
        transform: rotateX(0);
    }
    100% {
        transform: rotateX(180deg);
    }
}

@keyframes flip-horizontal-bottom {
    0% {
        transform: rotateX(0);
    }
    100% {
        transform: rotateX(360deg);
    }
}

.scale-up-center {
    animation: scale-up-center 0.4s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

@keyframes scale-up-center {
    0% {
        transform: scale(0.5);
    }
    100% {
        transform: scale(1);
    }
}