:root {
    --w: 10px;
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    width: 100vw;
    height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    font-family: 'Bahnschrift Condensed','Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-flip-container {
    width: 100%;
    height: 100%;

    display: flex;
    flex-wrap: wrap;

    align-content: center;
    justify-content: center;
    padding: 10px;
}

.pair {
    position: relative;
    width: var(--w);
    height: var(--w);
    margin: 8px;
    cursor: pointer;
}

.pair .card,
.pair .info {
    position: absolute;
    width: 100%;
    height: 100%;

    background-repeat: no-repeat;
    background-size: cover;

    -webkit-border-radius: 0.6vw;
    -moz-border-radius: 0.6vw;
    border-radius: 0.6vw;

    border: 0.3vw solid white;
    box-shadow: 0px 0px 0.3vw rgba(0,0,0,0.4);

    color: white;
    background-color: #b0b0b0;


    z-index: 1;

    overflow: hidden;

}


.pair .info span {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;

    background-color: #37376080;
    text-align: center;
    padding: 0.2vw;

    text-shadow: 1px 1px 2px black;
    font-size: calc(1px + 0.7vw);
    font-weight: bold;

    padding: 0.3vw 0 0.2vw;

    pointer-events: none;
  
}


.pair .flipped {
    transform: rotateY(180deg);
    z-index: 0;
}

.pair .ani_flip {
    animation: ani_flip 1s ease;
}

.pair .ani_reverse {
    animation: ani_reverse 1s ease;
}

@keyframes ani_flip {
    0% {
        transform: rotateY(0);
        z-index: 1;
    }
    100% {
        transform: rotateY(180deg);
        z-index: 0;
    }
}

@keyframes ani_reverse {
    0% {
        transform: rotateY(180deg);
        z-index: 0;
    }
    100% {
        transform: rotateY(0);
        z-index: 1;
    }
}

