* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: rgb(12, 12, 88);
}

.container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 30px;
    background: rgb(39, 39, 147);
    padding: 40px 60px;
}
h2 {
    font-size: 3em;
    color:white;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.reset
{
    padding: 15px 20px;
    color: blue;
    background: #fff;
    border: none;
    font-size: 1.5em;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 600;

}
.reset:focus
{
color: #fff;
background: rgb(128, 128, 218);
}
.game
{
    width: 430px;
    height: 430px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    transform-style: preserve-3d;
    perspective: 500px;

}
.item {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    background: #fff;
    transition: transform 0.5s ease; /* Adjusted transition */
}

.item.boxOpen {
    transform: rotateY(180deg); /* Adjusted transform */
}

.item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgb(87, 87, 192);
    /*opacity:0.85 ; */
    transition: transform 0.5s ease; 
    transform: rotateY(0deg); 
    backface-visibility: hidden;
}

.boxOpen::after,
.boxMatch::after {
    transform: rotateY(180deg); 
}
