@font-face {
    src: url(fonts/PressStart2P-Regular.ttf);
    font-family: pressstart;
}
body {
    display: flex;
    flex-direction: column;
    background-image: url(images/purble.gif);
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    background-size: 300px 300px;
    background-color: black;
    height: 100dvh;
    margin: 0;
}
.level {
    color: #DD1FDD;
    font-family: pressstart, sans-serif;
    font-size: 55px;
    flex-direction: column;
    padding-left: 50px;
    padding-top: 15px;
    padding-bottom: 10px;
    text-shadow:
    -1px -1px 0 white,
     1px -1px 0 white,
    -1px  1px 0 white,
     1px  1px 0 white;
    text-decoration: underline;
}
.main-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  position: relative;
  top: 50px;
  padding-right: 450px;
}
.game-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 400px;
  margin: auto;
}

.card {
  position: relative;
  width: 200px;
  height: 200px;
  perspective: 1000px;
  cursor: pointer;
  
}

.card img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.5s ease;
}

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

.card.flipped .front {
  transform: rotateY(0);
}

.card.flipped .back {
  transform: rotateY(180deg);
}
.congrats-msg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  color: #DD1FDD;
  padding: 20px 40px;
  border-radius: 12px;
  font-family: pressstart, sans-serif;
  font-size: 24px;
  box-shadow: 0 0 20px #DD1FDD;
  z-index: 1000;
  animation: pop 0.5s ease;
}

@keyframes pop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@media (max-width: 1050px) {
  .game-board {
    grid-template-columns: repeat(2, 1fr); 
  }
  .main-wrapper {
    padding: 0;
  }
}