:root{
    --w: 125px;
    --h: 125px;
    --colorTt: rgb(255, 0, 255);
    --colorTd: rgb(0, 255, 255);
    --colorBg: #1b1b1b;
}

*{
    margin: 0;
    padding: 0;
    transition: all 500ms;
    box-sizing: border-box;
}

body{
    /* -webkit-perspective: 1000; */
    background-color: var(--colorBg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    padding: 50px 0;
}

.container{
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#tablero{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

div{
    display: inline-block;
}

.area-tarjeta,
.tarjeta,
.cara{
    width: var(--w);
    height: var(--h);
    cursor: pointer;
}

.tarjeta{
    position: relative;
    transform-style: preserve-3d;
    animation: iniciar 5s;
}

/* .area-tarjeta:hover .tarjeta{
    transform: rotateY(180deg);
} */

.cara{
    position: absolute;
    backface-visibility: hidden;
    font-size: 500%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.trasera{
    background-color: var(--colorTt);
    transform: rotateY(180deg);
}

.delantera{
    background: var(--colorTd);
}

/************ NUEVO JUEGO **************/
.nuevo-juego{
    margin-top: 50px;
    background: var(--colorTd);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
}

.nuevo-juego:active{
    background: transparent;
}

/******** ANIMACIONES *********/
@keyframes iniciar{
    20%, 90%{
        transform: rotateY(180deg);
    }

    0%, 100%{
        transform: rotateY(0deg);
    }
}