
/* General */
*{
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    -webkit-perspective: 1200px;
    perspective: 1200px;
    font-family: Arial, Helvetica, sans-serif;
}

h1 {
    font-size: 1.3em;
    text-align: center;
    margin-top: 1em;
}

.info-bar {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: 100%;
    margin: auto;
    -ms-flex-pack: distribute;
    justify-content: space-around;
}

.info-bar p {
    margin: 0;
}

.container {
    width: 100%;
}

.bold {
    font-weight: bold;
}

.main-container {
    width: 100%;
    margin: 10px auto 30px;
    background: -webkit-gradient(linear, left top, left bottom, from(#6ba8b9), color-stop(#aaa), to(#cc3e5b));
    background: -webkit-linear-gradient(#6ba8b9, #aaa, #cc3e5b);
    background: -o-linear-gradient(#6ba8b9, #aaa, #cc3e5b);
    background: linear-gradient(#6ba8b9, #aaa, #cc3e5b);
    border-radius: 7px;
    -webkit-box-shadow: 0px 6px 10px #dcdada;
    box-shadow: 0px 6px 10px #dcdada;
    position: relative;
}

.hidden {
    display: none !important;
}

.open {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.match {
    cursor: default !important;
}

.match > .back {
    background: -webkit-gradient(linear, left top, left bottom, from(#c55374), to(#656a7d)) !important;
    background: -webkit-linear-gradient(#c55374, #656a7d) !important;
    background: -o-linear-gradient(#c55374, #656a7d) !important;
    background: linear-gradient(#c55374, #656a7d) !important;
}

/* Start Screen */

.start-screen, .end-screen {
    position: absolute;
    background-color: rgba(255, 255, 255, .7);
    top: 0;
    left: 0;
    z-index: 3;
    height: 100%;
    width: 100%;
    text-align: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    /* -webkit-box-orient: vertical;
    -webkit-box-direction: normal; */
    -ms-flex-direction: column;
    flex-direction: column;
    /* -webkit-box-pack: center; */
    -ms-flex-pack: center;
    justify-content: center;
}

.start-screen h2, .end-screen h2{
    color: #e91e63;
    font-size: 1.6em;
}

.start-screen button, .end-screen button {
    display: inline-block;
    background-color: #164063;
    color: #fff;
    width: 15%;
    margin-left: 43%;
    font-size: 1em;
    padding: 10px 0;
    border: transparent;
    border-radius: 7px;
    font-weight: bold;
    cursor: pointer;
}

.end-screen button {
    width: 30%;
    margin-left: 35%;
}

.end-screen p {
    font-weight: bold;
    margin-top: 0;
}

/* Timer */

.timerDiv {
    text-align: center;
}

.timerDiv p .reload {
    display: inline-block;
    margin-left: 7%;
    cursor: pointer;
}

/* Card Containers */

.cards-container {
    width: 95%;
    margin: auto;
    padding: 6% 1% 6%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* Card */

.card{
    height: 80px;
    width: 24%;
    margin: .5%;
    position: relative;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transition: -webkit-transform .3s ease-in;
    transition: -webkit-transform .3s ease-in;
    -o-transition: transform .3s ease-in;
    transition: transform .3s ease-in;
    transition: transform .3s ease-in, -webkit-transform .3s ease-in;
    text-align: center;
    cursor: pointer;
}

/* Front and Back sides of Card */

 .card > div {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
 }

.card .front {
    z-index: 2;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    content: '';
    height: 80px;
    background-color: #164063;
    border-radius: 7px;
}

.card .back {
    z-index: 1;
    height: 80px;
    border-radius: 7px;
    background-color: #c71a3c;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    position: relative;
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.card .back i {
    font-size: 1.5em;
    display: block;
    position: absolute;
    top: 31%;
    left: 30%;
    color: #fff;
}

/* Media Queries */

@media screen and (min-width: 430px) {
    .card .back i {
        left: 35%;
        top: 35%;
    }
    .card, .card .front, .card .back {
        height: 90px;
    }
}

@media screen and (min-width: 510px) {
    .card .back i {
        left: 32%;
        top: 30%;
        font-size: 2em;
    }
    .card, .card .front, .card .back {
        height: 95px;
    }
}

@media screen and (min-width: 600px) {
    .info-bar {
        margin-bottom: 1em;
    }
    .container {
        width: 85%;
        margin: auto;
    }
    .card {
        width: 22%;
        margin: 1.5%;
    }
    .card .back i {
        left: 32%;
        top: 30%;
        font-size: 2em;
    }
    .card, .card .front, .card .back {
        height: 95px;
    }
}

@media screen and (min-width: 730px) {
    .container {
        width: 75%;
    }
}

@media screen and (min-width: 850px) {
    .container {
        width: 60%;
    }
}

@media screen and (min-width: 1000px) {
    .container {
        width: 50%;
    }
}

@media screen and (min-width: 1300px) {
    .card .back i {
        left: 35%;
    }
}