/* Main */

.body {
    font: normal 11px "Helvetica Neue", Helvetica, sans-serif;
    user-select: none;
    color: #888;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
    background-image: url("../img/bg-countdown-iqamah.png");

    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#969696', endColorstr = '#595959', GradientType=1);
}

/* Skeleton */

ul.flip {
    display: flex;
    align-items: center;
    /* font-size: 31rem; */
    font-weight: bold;
    /* line-height: 600px; */
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

ul.flip li {
    z-index: 1;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

ul.flip li:first-child {
    z-index: 2;
}

ul.flip li .wrap {
    display: block;
    height: 100%;
    perspective: 2500px;
}

ul.flip li .wrap div {
    z-index: 1;
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    overflow: hidden;
}
ul.flip li .wrap .down .shadow {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

ul.flip li .wrap div .shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

ul.flip li .wrap div.up {
    transform-origin: 50% 100%;
    top: 0;
}

ul.flip li .wrap div.up:after {
    content: "";
    position: absolute;
    left: 0;
    z-index: 5;
    width: 100%;
    height: 5px;
    background-color: rgba(0, 0, 0, 0.4);
}

ul.flip li .wrap div.down {
    transform-origin: 50% 0%;
    bottom: 0;
}

ul.flip li .wrap div div.inn {
    position: absolute;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 200%;
    color: #ccc;
    text-shadow: 0 1px 2px #000;
    text-align: center;
    background-color: #333;
    border-radius: 20px;
}

ul.flip li .wrap div.up div.inn {
    top: 0;
}

ul.flip li .wrap div.down div.inn {
    bottom: 0;
}

/* PLAY */

.body.play ul li.before {
    z-index: 3;
}

.body.play ul li.active {
    animation: asd 0.3s 0.3s linear both;
    z-index: 2;
}

@keyframes asd {
    0% {
        z-index: 2;
    }

    5% {
        z-index: 4;
    }

    100% {
        z-index: 4;
    }
}

.body.play ul li.active .down {
    z-index: 2;
    animation: turn 0.3s 0.3s linear both;
}

@keyframes turn {
    0% {
        transform: rotateX(90deg);
    }

    100% {
        transform: rotateX(0deg);
    }
}

.body.play ul li.before .up {
    z-index: 2;
    animation: turn2 0.3s linear both;
}

@keyframes turn2 {
    0% {
        transform: rotateX(0deg);
    }

    100% {
        transform: rotateX(-90deg);
    }
}

/* SHADOW */

.body.play ul li.before .up .shadow {
    background: -moz-linear-gradient(
        top,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    background: -webkit-gradient(
        linear,
        left top,
        left bottom,
        color-stop(0%, rgba(0, 0, 0, 0.1)),
        color-stop(100%, rgba(0, 0, 0, 1))
    );
    background: linear-gradient(
        top,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    background: -o-linear-gradient(
        top,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    background: -ms-linear-gradient(
        top,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    animation: show 0.3s linear both;
}

.body.play ul li.active .up .shadow {
    background: -moz-linear-gradient(
        top,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    background: -webkit-gradient(
        linear,
        left top,
        left bottom,
        color-stop(0%, rgba(0, 0, 0, 0.1)),
        color-stop(100%, rgba(0, 0, 0, 1))
    );
    background: linear-gradient(
        top,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    background: -o-linear-gradient(
        top,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    background: -ms-linear-gradient(
        top,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    animation: hide 0.3s 0.2s linear both;
}

.body.play ul li.before .down .shadow {
    background: -moz-linear-gradient(
        top,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    background: -webkit-gradient(
        linear,
        left top,
        left bottom,
        color-stop(0%, rgba(0, 0, 0, 1)),
        color-stop(100%, rgba(0, 0, 0, 0.1))
    );
    background: linear-gradient(
        top,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    background: -o-linear-gradient(
        top,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    background: -ms-linear-gradient(
        top,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    animation: show 0.3s linear both;
}

.body.play ul li.active .down .shadow {
    background: -moz-linear-gradient(
        top,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    background: -webkit-gradient(
        linear,
        left top,
        left bottom,
        color-stop(0%, rgba(0, 0, 0, 1)),
        color-stop(100%, rgba(0, 0, 0, 0.1))
    );
    background: linear-gradient(
        top,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    background: -o-linear-gradient(
        top,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    background: -ms-linear-gradient(
        top,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    animation: hide 0.3s 0.2s linear both;
}

@keyframes show {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes hide {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}
