@import url('https://fonts.googleapis.com/css2?family=Creepster&display=swap');

:root {
    --W: calc(70vw / 6);
    --h: calc(70vh / 4);
}

*{
    transition: all 0.8s;
}

h1 {
    font-family: 'Creepster', cursive;
    font-size: 4rem;
}

body {
    -webkit-perspective: 1000;
    padding: 0;
    margin: 0;
    background-color: #9752c7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.areaTarjeta, .tarjeta, .parte {
    width: var(--W);
    height: var(--h);
    min-width: 100px;
    cursor: pointer;
}

.atras {
    background-color: #eb840d;
    transform: rotateY(180deg);
}

.delante {
    background-color: white;
}

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

.parte {
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}


.btnNuevoJuego {
    background-color: #eb840d;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    cursor: pointer;
}

div {
    display: inline-block;
}

@keyframes iniciar {
    20%, 90% {
        transform: rotateY(180deg);
    }
    0%, 100% {
        transform: rotateY(0deg);
    }
}

