* {
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

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

.container
{
    position:relative;
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100vh;
    gap: 30px;
    background: #461854;
    padding:40px 60px;
}

h2{
    font-size: 3em;
    color:#fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.reset
{
    padding:15px 20px;
    background: #6a2d7c;
    background: #fff;
    color:#9013b5;
    border:none;
    font-size:1.5em;
    text-transform:uppercase;
    letter-spacing:0.1em;
    cursor:pointer;
    font-weight:600;
}

.reset:focus
{
color:#fff;
background: #3d0e4c;
}

.game
{
    width: 520px;
    height: 440px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    transform-style: preserve-3d;
    perspective: 500px;
    margin-left: 90px;
}

.item
{
    position: relative;
    width:100px;
    height:100px;
    display:flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    background: white;
    transition: 0.25s;
    transform: rotateY(180deg);
}


.item.boxOpen{
transform: rotateY(0deg);

}
.item:after{
    content: '';
    position: absolute;
    inset:0;
    background: #6b377b;
    transition: 0.25s;
    transform: rotateY(0deg);
    backface-visibility: hidden;
}

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

/* Style for the dialog box */
.dialog-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
}

.dialog-box {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.dialog-box p {
    margin-top: 0;
    color: #333;
}

.dialog-box button {
    padding: 10px 20px;
    background-color: #e4a422;
    color: white;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 5px;
}

.dialog-box button:hover {
    background-color: #916905;
}