* {
    margin: 0;
    padding: 0;
}

body {
    width: 100vw;
    height: 100vh;
    -webkit-perspective: 1200px;
    perspective: 1200px;
    background-color: #000;
    overscroll-behavior-y: contain;
}

.dice {
    position: fixed;
    top: calc(50vh - 100px);
    left: calc(50vw - 100px);
    -ms-scroll-chaining: none;
    overscroll-behavior: contain;
}

.dice,
.horizontal,
.vertical,
.cube,
.face {
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    width: 200px;
    height: 200px;
}

.face {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 30px;
    background-color: #fff;
    border-radius: 40%;
    -webkit-box-shadow: 0 0 40px #ccc inset;
    box-shadow: 0 0 40px #ccc inset;
}

.face::after {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 20%;
    background-color: #e0e0e0;
    -webkit-transform: translateZ(-0.1px);
    transform: translateZ(-0.1px);
}

.dot-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.dot {
    width: 40px;
    height: 40px;
    background-color: #444;
    border-radius: 50%;
    -webkit-box-shadow: 10px 10px 20px #000 inset;
    box-shadow: 10px 10px 20px #000 inset;
}

.one {
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.two {
    -ms-flex-pack: distribute;
    justify-content: space-around;
}

.two > .dot:nth-child(2) {
    -ms-flex-item-align: end;
    align-self: flex-end;
}

.three {
    -ms-flex-pack: distribute;
    justify-content: space-around;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.three > .dot:nth-child(1) {
    -ms-flex-item-align: start;
    align-self: flex-start;
}

.three > .dot:nth-child(3) {
    -ms-flex-item-align: end;
    align-self: flex-end;
}

.four {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.four > .dot-row {
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.five {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.five > .dot-row {
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.five > .dot-row:nth-child(2) {
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.six {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-pack: distribute;
    justify-content: space-around;
}

.six > .dot-row {
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.front {
    -webkit-transform: translateZ(100px);
    transform: translateZ(100px);
}

.back {
    -webkit-transform: rotateY(180deg) translateZ(100px);
    transform: rotateY(180deg) translateZ(100px);
}

.up {
    -webkit-transform: rotateX(90deg) translateZ(100px);
    transform: rotateX(90deg) translateZ(100px);
}

.down {
    -webkit-transform: rotateX(-90deg) translateZ(100px);
    transform: rotateX(-90deg) translateZ(100px);
}

.left {
    -webkit-transform: rotateY(-90deg) translateZ(100px);
    transform: rotateY(-90deg) translateZ(100px);
}

.right {
    -webkit-transform: rotateY(90deg) translateZ(100px);
    transform: rotateY(90deg) translateZ(100px);
}

.axis-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
}

.x {
    -webkit-transform: rotateY(90deg);
    transform: rotateY(90deg);
}

.y {
    -webkit-transform: rotateX(90deg);
    transform: rotateX(90deg);
}

.tips {
    color: #fff;
}
