.el-memory__container {
    height: var(--content-height);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-backface-visibility: hidden !important;
}

.bh-femode .el-memory__container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: 75px;
    height: auto;
}

.el-memory__deck {
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
    grid-template-columns: repeat(4, 1fr);
    -ms-grid-rows: 1fr 20px 1fr 20px 1fr 20px 1fr;
    grid-template-rows: repeat(4, 1fr);
    grid-gap: 20px;
    padding: 10px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.el-memory__deck > *:nth-child(16) {
    -ms-grid-row: 7;
    -ms-grid-column: 7;
}

.el-memory__card {
    -webkit-perspective: 1000px;
    perspective: 1000px;
    cursor: pointer;
}

.el-memory__card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    -webkit-transition: -webkit-transform 0.75s;
    transition: -webkit-transform 0.75s;
    -o-transition: transform 0.75s;
    transition: transform 0.75s;
    transition: transform 0.75s, -webkit-transform 0.75s;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-shadow: 0px 4px 1px rgba(0, 0, 0, 0.1),
        0px 0px 15px rgba(0, 0, 0, 0.15);
    box-shadow: 0px 4px 1px rgba(0, 0, 0, 0.1), 0px 0px 15px rgba(0, 0, 0, 0.15);
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border: 5px solid white;
    border-radius: 5px;
}

.el-memory__card.open .el-memory__card-inner,
.el-memory__card.match .el-memory__card-inner {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.el-memory__card.disabled {
    pointer-events: none;
}

.el-memory__card-front,
.el-memory__card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.el-memory__card-back {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.el-memory__card.match {
    cursor: default;

    -webkit-backface-visibility: visible !important;
    backface-visibility: visible !important;
    -webkit-animation-name: rubberBand;
    animation-name: rubberBand;
    -webkit-animation-delay: 0.5s;
    animation-delay: 0.5s;
    -webkit-animation-duration: 0.75s;
    animation-duration: 0.75s;
}

/*
 * Styles for the Score Panel
 */

.el-memory__score-panel {
    text-align: left;
    margin-bottom: 10px;
    position: fixed;
    left: 0px;
    top: 0px;
}

.el-memory__stars {
    margin: 0;
    padding: 0;
    display: inline-block;
    margin: 0 5px 0 0;
}

.el-memory__stars li {
    list-style: none;
    display: inline-block;
}

.el-memory__restart {
    float: right;
    cursor: pointer;
}

.el-memory__timer {
    display: inline-block;
    margin: 0 1rem;
}

/*
 * Styles for congratulations modal
 */

.el-memory__overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0);
    -webkit-transition: opacity 500ms;
    -o-transition: opacity 500ms;
    transition: opacity 500ms;
    visibility: hidden;
    opacity: 0;
    width: 280px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    text-align: center;
}

.el-memory__overlay.show {
    visibility: visible;
    opacity: 1;
}

.el-memory__popup-content {
    padding: 40px 20px;
    background: #ffffff;
    border-radius: 5px;
    width: 100%;
    position: relative;
    -webkit-transition: all 2s ease-in-out;
    -o-transition: all 2s ease-in-out;
    transition: all 2s ease-in-out;
}

.el-memory__popup-title {
    font-size: 26px;
    line-height: 1.34;
    margin-bottom: 10px;
}

.el-memory__popup-content .el-memory__restart {
    position: static;
    float: none;
    margin-bottom: 0;
}

.el-memory__popup-text {
    font-size: 30px;
    line-height: 1.36;
    margin-bottom: 10px;
}

.el-memory__popup-text p {
    margin-bottom: 0;
}

#totalTime {
    font-size: 20px;
}

.el-memory__restart {
    background: #909090;
    color: white;
    padding: 10px;
    font-size: 16px;
    text-transform: uppercase;
    border-radius: 5px;
    margin-left: 10px;
    display: inline-block;
    position: absolute;
    right: 40px;
    bottom: 20px;
    margin-bottom: 20px;
    position: absolute;
    line-height: 20px;
    font-family: sans-serif;
    text-transform: none;
    font-style: normal;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-shadow: 0px 4px 1px rgba(0, 0, 0, 0.1);
    box-shadow: 0px 4px 1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.el-memory__restart:active {
    opacity: 1;
}

.el-memory__restart i {
    margin-right: 8px;
    font-size: 20px;
}

@-webkit-keyframes rubberBand {
    from {
        -webkit-transform: scale3d(1, 1, 1);
        transform: scale3d(1, 1, 1);
    }

    30% {
        -webkit-transform: scale3d(1.25, 0.75, 1);
        transform: scale3d(1.25, 0.75, 1);
    }

    40% {
        -webkit-transform: scale3d(0.75, 1.25, 1);
        transform: scale3d(0.75, 1.25, 1);
    }

    50% {
        -webkit-transform: scale3d(1.15, 0.85, 1);
        transform: scale3d(1.15, 0.85, 1);
    }

    65% {
        -webkit-transform: scale3d(0.95, 1.05, 1);
        transform: scale3d(0.95, 1.05, 1);
    }

    75% {
        -webkit-transform: scale3d(1.05, 0.95, 1);
        transform: scale3d(1.05, 0.95, 1);
    }

    to {
        -webkit-transform: scale3d(1, 1, 1);
        transform: scale3d(1, 1, 1);
    }
}

@keyframes rubberBand {
    from {
        -webkit-transform: scale3d(1, 1, 1);
        transform: scale3d(1, 1, 1);
    }

    30% {
        -webkit-transform: scale3d(1.25, 0.75, 1);
        transform: scale3d(1.25, 0.75, 1);
    }

    40% {
        -webkit-transform: scale3d(0.75, 1.25, 1);
        transform: scale3d(0.75, 1.25, 1);
    }

    50% {
        -webkit-transform: scale3d(1.15, 0.85, 1);
        transform: scale3d(1.15, 0.85, 1);
    }

    65% {
        -webkit-transform: scale3d(0.95, 1.05, 1);
        transform: scale3d(0.95, 1.05, 1);
    }

    75% {
        -webkit-transform: scale3d(1.05, 0.95, 1);
        transform: scale3d(1.05, 0.95, 1);
    }

    to {
        -webkit-transform: scale3d(1, 1, 1);
        transform: scale3d(1, 1, 1);
    }
}

@-webkit-keyframes pulse {
    from {
        -webkit-transform: scale3d(1, 1, 1);
        transform: scale3d(1, 1, 1);
    }

    50% {
        -webkit-transform: scale3d(1.2, 1.2, 1.2);
        transform: scale3d(1.2, 1.2, 1.2);
    }

    to {
        -webkit-transform: scale3d(1, 1, 1);
        transform: scale3d(1, 1, 1);
    }
}

@keyframes pulse {
    from {
        -webkit-transform: scale3d(1, 1, 1);
        transform: scale3d(1, 1, 1);
    }

    50% {
        -webkit-transform: scale3d(1.2, 1.2, 1.2);
        transform: scale3d(1.2, 1.2, 1.2);
    }

    to {
        -webkit-transform: scale3d(1, 1, 1);
        transform: scale3d(1, 1, 1);
    }
}

/*------------------------------------*\
  #Mobilversion
\*------------------------------------*/

@media only screen and (max-width: 767px) {
    .el-memory__deck {
        grid-gap: 10px;
        -ms-grid-columns: 1fr 10px 1fr 10px 1fr;
        grid-template-columns: repeat(3, 1fr);
    }
}
