body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #fc1e8a;
    user-select: none;
}

.conteiner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    background: linear-gradient(
        325deg,
        #03001e 0%,
        #7303c0 30%,
        #ec38bc 70%,
        #fdeff9 100%
    );
    padding: 40px 60px;
}

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

.reset {
    padding: 15px 20px;
    width: 100%;
    color: #000;
    background-color: #fff;
    border: none;
    font-size: 1.5em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 600;
}

.reset:focus {
    color: #ec38bc;
    background-color: #262809;
}

.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;
    align-items: center;
    justify-content: center;
    background-color: #fff;

    font-size: 3em;
    transform: rotateY(180deg);
    transition: 0.25s;
}

.item::after {
    opacity: 1;
    content: "";
    position: absolute;
    inset: 0;
    background: #404040;
    transition: 0.25;
    transform: rotateY(0deg);
    backface-visibility: hidden;
}

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

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

.attempt-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #fff;
    color: #000;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
