* {
    font-family: 'Frank Ruhl Libre', serif;
}

/* pyramid author : Selim Khemissi http://www.khemissi.com http://www.khemissi.com/examples/css3/010-3D-pyramid/ */
.stage {
    /* position: relative; */
    /* top: 300px; */
    /* width: 150px; */
    /* height: 320px; */
    margin: auto;
    perspective: 1200px;
    perspective-origin: 50% 50%;
}

.pyramid3d {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    transition: transform 10s cubic-bezier(0,.8,0,1);
    transform-style: preserve-3d;
    transform: rotateX(50deg) rotateY(0deg) rotate(45deg);
}

.triangle,
.square {
    transform-style: preserve-3d;
    transform-origin: left top;
    transition: transform 200ms ease-out;
}

.triangle {
    width: 0;
    height: 0;
    background: none;
}

/* note that border dimension includes border set in '.side' CSS Class */
.triangle:before {
    content: "";
    position: absolute;
    height: 0;
    width: 0;
    border-style: solid;
    /* border-color: rgba(50, 50, 50, 0.7) transparent transparent transparent;
*/
    border-width: 176px 100px 0 100px;
}

.square {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
    font-size: 10em;
    color: #fff;
    text-align: center;
    font-family: 'Frank Ruhl Libre', serif;
    font-weight: bold;
    text-shadow: 2px 10px 20px black;
}

.square.small {
    width: 20px;
    height: 20px;
}

.rect {
    width: 20px;
    height: 100px;
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
}

/* note that translation includes border set in '.side' CSS Class */
.side1 {
    /* square */
    transform: translatez(200px);
    background: rgba(0, 0, 0, 0.7);
}

.side1.small {
    transform: translatez(300px) translatex(90px) translatey(90px);
}

.side2 {
    /* triangle */
    transform: translatex(0) rotatey(-125deg) rotatez(90deg);
}

.side2.square {
    background: rgba(0, 0, 0, 0.5);
    transform: translatex(0) translatez(200px) rotatey(-90deg) rotatez(90deg);
}

.side2.rect {
    background: rgba(20, 20, 20, 0.3);
    transform: translatex(80px) translatey(50px) translatez(250px) rotatey(90deg) rotatez(90deg);
}

.side3 {
    /* triangle */
    transform: translatex(200px) rotatez(90deg) rotatex(-55deg);
}

.side3.square {
    background: rgba(255, 255, 0, 0.5);
    transform: translatex(200px) translatez(200px) translatey(200px) rotatez(-90deg) rotatex(-90deg);
}

.side3.rect {
    background: rgba(20, 20, 20, 0.3);
    transform: translatex(100px) translatez(250px) translatey(50px) rotatez(-90deg) rotatex(-90deg);
}

.side4 {
    /* triangle */
    transform: translatez(0) rotatex(-55deg);
}

.side4.square {
    background: rgba(0, 0, 255, 0.5);
    transform: translatez(200px) rotatex(-90deg) rotatey(-180deg) translatex(-200px);
}

.side4.rect {
    transform: translatez(250px) translatey(40px) rotatex(90deg) translatex(90px);
}

.side5 {
    /* triangle */
    transform: translatey(200px) rotatex(-125deg);
}

.side5.square {
    background: rgba(255, 0, 0, 0.5);
    transform: translatey(200px) translatez(200px) rotatex(-90deg);
}

.side5.rect {
    transform: translatey(60px) translatex(90px) translatez(250px) rotatex(-90deg);
}

.side2:before,
.side3:before {
    border-color: rgba(20, 20, 20, 0.3) transparent transparent transparent;
}

.side4:before,
.side5:before {
    border-color: rgba(40, 40, 40, 0.6) transparent transparent transparent;
}

.instructions {
    position: absolute;
    bottom: 10px;
    left: 30%;
    background: beige;
    padding: 10px;
    border: 1px solid #999;
    border-radius: 3px;
}

.arrows {
    list-style-type: none;
    padding: 0;
    text-align: center;
}

.arrows li {
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 3px;
    border: 1px solid #ddd;
    text-align: center;
    display: inline-block;
    background: #fff;
    box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.arrows li:first-child {
    display: block;
    margin: 0 auto 5px;
}

footer {
    position: absolute;
    bottom: 10px;
}

a {
    color: #048;
}

.dreidel {
    padding: 2rem;
    font-size: 2rem;
}

.center {
    text-align: center;
}