*{
    border: 0;
    margin: 0;
    padding: 0;
    outline: 0;
    box-sizing: border-box;
}
body{
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #b33951;
}
.container{
    display: grid;
    place-items: center;
    width: 350px;
    height: 370px;
    padding: 60px 0 40px;
    border-radius: 30px;
    background: #eeeeee;
    box-shadow: 0 0 20px rgba(0, 0, 0, .1);

}

.dice{
    position: relative;
    height: 100px;
    width: 100px;
    transform-style: preserve-3d;    
    transform: rotateX(45deg) rotateY(45deg);
    animation: rolling 4s;
}

@keyframes rolling {
    50%{
        transform: rotateX(455deg) rotateY(455deg);
    }
}

.face{
    position: absolute;
    height: 100%;
    width: 100%;
    border: 5px solid #f6f3f0;
    transform-style: preserve-3d;    
    background:linear-gradient(145deg,#dddbd8,#fff) ;
    border-radius: 20px;

}
.face::before{
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 20px;
    transform: translateZ(-1px);
    /* background: red; */
    background: #f6f3f0;
}
.face::after{
    position: absolute;
    content: "";
    top: 50%;
    left: 50%;
    border-radius: 50%;
    height: 18px;
    width: 18px;
    background: #131210;
}
.font{
    transform: translateZ(50px);
}
.back{
    transform: rotateX(180deg) translateZ(50px);
}
.top{
    transform: rotateX(90deg) translateZ(50px);

}
.bottom{
    transform: rotateX(-90deg) translateZ(50px);

}
.right{
    transform: rotateY(90deg) translateZ(50px);

}
.left{
    transform: rotateY(-90deg) translateZ(50px);

}


.font::after{
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    background-color: #f63330;
}
.back::after{
margin: -35px 0 0 -30px;
box-shadow: 40px 0,
            0 25px,
            40px 25px,
            0 50px,
            40px 50px;
}
.top::after{
    margin: -32px 0 0 -28px;
    box-shadow: 37px 43px;
}
.bottom::after{
    margin: -36px 0 0 -36px;
    box-shadow: 26px 26px,
                52px 52px,
                52px 0,
                1px 53px;
}
.right::after{
    margin: -35px 0 0 -35px;
    box-shadow: 47px 1px, 
                1px 52px, 
                47px 52px;
                
}
.left::after{
    margin: -35px 0 0 -35px;
    box-shadow: 26px 26px, 
                49px 52px;
}
.roll{
    color: #b33951;
    border: 4px solid #b33951;
    cursor: pointer;
    border-radius: 3px;
    margin-top: 50px;
    padding: 6px 12px;
    font-size: 18px;
    font-weight: bold;
    font-family:Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    transition: .4s;
}
.roll:hover{
    color: #fff;
    background: #b33951;
}