@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Poppins:wght@400;500;700&display=swap');


* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(320deg, #ff69b4, #669ee7, #ffef78);
}

header {
  width: 100%;
  padding: 10px 0;
  margin-bottom: 20px;
  box-shadow: 0px 1px 4px;
  
}

.navbar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: "Poppins", serif;
  font-weight: 700;
  font-style: normal;
}

.navbar-brand img {
  width: 50px;
  height: 50px;
  margin-right: 20px;
}

.memory-game {
  width: 900px;
  height: 640px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(0, 0, 0, 0.56);
  perspective: 1000px;
  border-radius: 10px;
  padding: 10px;
}

.memory-card {
  width: calc(20% - 10px);
  margin: 5px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.memory-card.flip {
  transform: rotateY(180deg);
}

.front-face, .back-face {
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 5px;
  backface-visibility: hidden;
  background: lightcoral;
  padding: 10px;
}

.front-face {
  transform: rotateY(180deg);
}

button {
  background: #eb92be;
  color: black;
  font-family: "Poppins", serif;
  font-weight: 700;
  font-style: normal;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  padding: 10px 20px;
}

button:hover {
  background: blueviolet;
}


@media (max-width: 768px) {
  .memory-game {
    width: 400px;
    height: 600px;
  }

  .memory-card {
      width: calc(20% - 10px);
  }
  .navbar-brand {
      font-size: 1.5rem;
  }
  .navbar-brand img {
      width: auto;
      height: 30px;
  }
}

@media (max-width: 480px) {
  .memory-game {
    width: initial;
    height: 600px;
  }

  .memory-card {
      width: calc(30% - 5px);
  }
  button {
      font-size: 1em;
      padding: 8px 16px;
  }
}