@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&display=swap');

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Ubuntu', sans-serif;
}

body{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #673AB7;
}

.wrapper{
    padding: 25px;
    background: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cards{
    height: 350px;
    width: 350px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cards .card{
    cursor: pointer;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    height: calc(100% / 4 - 10px);
    width: calc(100% / 3 - 10px); /* Ajustado para 3 columnas x 4 filas */
    list-style: none;
}

.card.shake{
    animation: shake 0.35s ease-in-out;
}

@keyframes shake{
    0%, 100%{ transform: translateX(0); }
    20%{ transform: translateX(-13px); }
    40%{ transform: translateX(13px); }
    60%{ transform: translateX(-8px); }
    80%{ transform: translateX(9px); }
}

.cards .card .view{
    width: 100%;
    height: 100%;
    user-select: none;
    pointer-events: none;
    position: absolute;
    background: #fff;
    border-radius: 7px;
    backface-visibility: hidden;
    transition: transform 0.25s linear;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card .front-view i{
    font-size: 40px;
    color: #673AB7;
}

.card .back-view i{
    font-size: 40px;
}

.card .back-view{
    transform: rotateY(-180deg);
}

.card.flip .front-view{
    transform: rotateY(180deg);
}

.card.flip .back-view{
    transform: rotateY(0);
}

.details{
    width: 100%;
    margin-top: 15px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.details p{
    font-size: 18px;
    border-right: 1px solid #ccc;
    padding-right: 15px;
}

.details p:last-child { border-right: none; }

.details button{
    cursor: pointer;
    font-size: 14px;
    color: #673AB7;
    border-radius: 4px;
    padding: 5px 12px;
    background: #fff;
    border: 2px solid #673AB7;
    transition: 0.3s ease;
    font-weight: 500;
}

.details button:hover{
    color: #fff;
    background: #673AB7;
}