*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
    border: 0;
    outline: 0;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url(https://wallpapers.com/images/featured/dice-k8od3w1k03k9u9sl.jpg);
    background-repeat: no-repeat;
}
.container{
    display: grid;
    place-items: center;
    width: 250px;
    padding: 60px 0 40px;
    border-radius: 30px;
    box-shadow: rgba(0,0,0,0.1);
}
.dice{
    position: relative;
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    transition: 1s ease;
    
}
@keyframes rolling{
    50%{
        transform: rotateX(455deg) rotateY(455deg);
    }
}
.face{
    position: absolute;
    width: 100%;
    height: 100%;
    border: 5px solid #f6f3f0;
    border-radius: 20px;
    background: linear-gradient(145deg, 
    #dddbd8,#fff);
    transform-style: preserve-3d;
}
.face::before{
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: #f6f3f0;
    transform: translateZ(-1px);
}
.face::after{
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    background: #000;
    border-radius: 50%;
}
.front{
    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);
}
.front::after{
    width: 30px;
    height: 30px;
    background: #000;
    margin: -15px 0 0 -15px;
}
.back::after{
    margin: -35px 0 0 -30px;
    box-shadow: 40px 0,
    0 25px,
    40px 25px,
    0 50px,
    40px 50px;
}
.top::after{
    margin: -30px 0 0 -30px;
    box-shadow: 40px 40px;
}
.bottom::after{
    margin: -36px 0 0 -36px;
    box-shadow: 26px 26px,
    52px 52px,
    52px 0,
    0 52px;
}
.right::after{
    margin: -30px 0 0 -30px;
    box-shadow: 40px 0,
    0 40px,
    40px 40px;
}
.left::after{
    margin: -35px 0 0 -35px;
    box-shadow: 25px 25px,
    50px 50px;
}
.roll{
    /* color: rgba(221,50,125); */
    margin-top: 60px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid rgb(92, 21, 52);
    cursor: pointer;
}
.roll:hover{
    color: #fff;
    background: rgb(220, 114, 160);
}