/*
    General Styles
*/

* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #9a64aa;
}

.container {
    display: grid;
    place-items: center;
    width: 250px;
    padding: 60px 0 40px;
    border-radius: 30px;
    background: #eeeeee;
    box-shadow: 0 0 20px rgba(0, 0, 0, .1);
}

.logo {
    margin-top: 30px;
}

.logo a:link, .logo a:visited, .logo a:active {
    font: 700 14px 'Montserrat';
    color: #9a64aa;
    text-decoration: none;
}

/*
    Dice Styles
*/

.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-radius: 20px;
    border: 5px solid #f6f3f0;
    transform-style: preserve-3d;
    background: linear-gradient(
        145deg, #dddbd8, #fff
    );
}

.face::before {
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: #f6f3f0;
    transform: translateZ(-1px);
}

.face::after {
    position: absolute;
    content: '';
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #131210;
}

.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: #f63330;
    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 Button styles
*/

.roll {
    cursor: pointer;
    color: #9a64aa;
    margin-top: 60px;
    padding: 6px 12px;
    border-radius: 3px;
    font: 700 16px 'Montserrat';
    border: 2px solid #9a64aa;
    background: #fff;
    transition: .4s;
}

.roll:hover {
    color: #fff;
    background: #9a64aa;
}

.roll:visited, .roll:active {
    color: #9a64aa;
    background: #fff;
}

/* 
    The ribbon
*/

.ribbon {
    display: none;
    width: 100px;
    height: 150px;
    background-color: #fff;
    position: absolute;
    right: 100px;
    top: -350px;
    animation:drop forwards .8s 1s cubic-bezier(0.165, 0.84, 0.44, 1);
    &:before{
        content: '';
        position: absolute;
        z-index: 2;
        left: 0;
        bottom: -50px;
        border-left: 50px solid #fff;
        border-right: 50px solid #fff;
        border-bottom: 50px solid transparent;
    }

    &:after {
        content:'';
        width: 200px;
        height: 270px;
        position: absolute;
        z-index: -1;
        left: 0;
        bottom: -120px;
        background-color: #81548e;
        transform:skewY(35deg) skewX(0);
    }

}

.ribbon .shop-link {
    text-align: center;
    margin-top: 30px;
}

.ribbon a:link, .ribbon a:visited {
    font: 900 18px 'Montserrat';
    color: #9a64aa;
    text-decoration: none;
}

.ribbon a:link:active, .ribbon a:visited:active {
    color: #9a64aa;
}

@keyframes drop {
    0%		{ top:-350px; }
    100%	{ top:0; }
}

@media only screen and (min-width: 768px) {
    .ribbon {
        display: block;
    }
}