@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed: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&display=swap');

body{
    padding-top: 3rem;
    margin:0;
    background-image: linear-gradient(hsl(214, 47%, 23%),hsl(237, 49%, 15%));
    background-attachment: fixed;
    font-family: "Barlow Semi Condensed";
    color: white;
    font-weight: 600;
}
.game{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* score box */
.scoreBoard{
    border: 4px solid hsl(217, 16%, 45%);
    border-radius: 16px;
    display: flex;
    height: 6rem;
    width: 45rem;
    justify-content: space-between;
    padding: 1rem;
}
.scoreBox{
    background-color: white;
    height: 105%;
    width: 20%;
    text-align: center;
    border-radius: 10px;
}
.text{
    color: hsl(229, 64%, 46%);
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 0;
}

.score{
    color: hsl(229, 25%, 31%);
    font-weight: 700;
    font-size: 50px;
    margin-top: 0;
    margin-bottom: 0;
}
@media (max-width: 768px){
    body{
        padding-top: 0;
    }
    .scoreBoard{
        margin-top: 1rem;
        height: 4rem;
        width: 18rem;
    }
    .text{
        margin-top: 5px;
    }
    .scoreBox{
        width: 6rem;
    }
    .score{
        font-size: 30px;
    }
}

/* win or lose */
.result{
    display: none;
    justify-content: center;
    align-items: center;
    margin-top: 5rem;
}
.userButton{
    margin-right: 4rem;
    text-align: center;
}

.houseButton{
    margin-left: 4rem;
    text-align: center;
}

.userButton,.houseButton p{
    font-size: 2rem;
}

.bg_user,.bg_house{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 11rem;
    width: 11rem;
    border-radius: 11rem;
}

.winLose {
    margin: 5rem 2rem 0rem 2rem;
    text-align: center;
    p{
    font-weight: 700;
    font-size: 3rem;
    margin: 0 0 2rem 0;
}

}
.playAgain{
    color: hsl(237, 49%, 15%);
    cursor: pointer;
    border: 1px solid white;
    padding: 0.5rem 0 0.5rem 0;
    border-radius: 10px;
    background-color: white;
}
@media (max-width: 768px){
    .result{
        margin-bottom: 13rem;
        margin-left: 0px;
    }
    .winLose {
        position: absolute;
        top: 65%;
        margin:0rem;
        text-align: center;
        p{
        font-size:3rem;
        margin-bottom: 1.5rem;
    }
    }
    .playAgain{
        padding: 0.5rem 1rem 0.5rem 1rem;
        font-size: 1.2rem;
    }
    .userButton{
        margin-right: 1rem;
        text-align: center;
    }
    
    .houseButton{
        margin-left: 1rem;
        text-align: center;
    }
    .userButton,.houseButton p{
        font-size: 1.3rem;
    }
}
/* play area */
.play{
    display: flex;
    margin-top: 12rem;
    width: 18.5rem;
    min-height: 26.25rem;
    position: relative;
}
.bg_triangle{
    position: absolute;
}

.button{
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
    height: 9.5rem;
    width: 9.5rem;
    border-radius: 9.5rem;
    box-shadow: 0px 8px 0px hsl(217, 16%, 65%);
}
.button:active {
    box-shadow: 0 3px hsl(217, 16%, 50%);
    transform: translateY(2px) scale(1.01);
}

.button img{
    height: auto;
    width: 60px;
} 
.blue_position{
    position:absolute;
    right: 12rem;
    bottom: 20.1rem;
    box-shadow: 0px 7px 0px hsl(230, 89%, 60%);
    background-color: hsl(230, 89%, 65%);
}
.yellow_position{
    position:absolute;
    left: 13rem;
    bottom: 20.1rem;
    box-shadow: 0px 7px 0px hsl(39, 89%, 47%);
    background-color:hsl(40, 84%, 53%);
}
.red_position{
    position:absolute;
    left: 3.5rem;
    bottom: 5rem;
    box-shadow: 0px 7px 0px hsl(349, 71%, 50%);
    background-color: hsl(349, 70%, 56%);
}
.bg_button{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 13rem;
    width: 13rem;
    border-radius: 13rem;
    transition: transform .3s;
}
.bg_button:hover{
    transform: scale(1.2)
}

@media (max-width: 768px){
    .play{
        margin-top: 6rem;
        margin-bottom: -2rem;
    }
    .bg_triangle{
        width: auto;
        height: 13rem;
        left: 2.5rem;
    }
    .bg_button{
        height: 8rem;
        width: 8rem;
        border-radius: 8rem;
    }
    .button{
        height: 6rem;
        width: 6rem;
        border-radius: 6rem;
        box-shadow: 0px 4.5px 0px hsl(217, 16%, 65%);
        img{
            height: 3rem;
            width: auto;
        }
    }
    .button:active {
        box-shadow: 0 3px hsl(217, 16%, 50%);
        transform: translateY(2px) scale(1.01);
    }
    .blue_position{
        right: 11rem;
        bottom: 21rem;
    }
    .yellow_position{
        left: 11.5rem;
        bottom: 21rem;
    }
    .red_position{
        left: 5.7rem;
        bottom: 11rem;
    }
}



/* rules area */
#rule{
    display: flex;
    position: fixed;
    justify-content: end;
    align-items: end;   
    border-radius: 10px;
    margin-right: 3%;
    margin-bottom: 2rem;
    bottom: 0px;
    right: 0px;
    padding: 10px 40px 10px 40px;
    border: 2px solid white;
    cursor: pointer;
}
#rule:hover{
    background-color: hsl(237, 49%, 20%);
}

#rulesImage{
    display: none;
    flex-direction: column;
    position: absolute;
    background-color: white;
    border-radius: 10px;
    padding: 3rem;
}

.rules p{
    color: hsl(217, 16%, 45%);
    font-weight: 700;
    font-size: 2rem;
    margin: 0;
}

.rules{
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.cross{
    cursor: pointer;
    width: 30px;
    box-shadow: 2px 2px 0px hsl(217, 16%, 45%);
}

.cross:active{
    box-shadow: 1px 1px 0px hsl(217, 16%, 45%);;
}

@media (max-width: 768px){
    #rule{
        position: relative;
        justify-content: end;
        align-content: center;   
        border-radius: 10px;
        margin: 0;
        
    }
    #rulesImage{
        border-radius: 0px;
        padding-top: 10rem;
        display: none;
        inset: 0px;
    }
}