@import url('https://fonts.googleapis.com/css2?family=Bitcount+Grid+Double:wght@100..900&display=swap');
body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: rosybrown;
}
.instructions {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  font-weight: bold;
}
.instructions-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  width: 400px;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 25px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}
.hidden {
  display: none;
}
header {
  height: 100px;
  color: #212121;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-family: 'Bitcount Grid Double';
  font-style: oblique;
  position: absolute;
  top: 0;
  width: 100%;
}
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 600px;
  padding: 20px;
  justify-content: center;
}
.card {
  width: 180px;
  height: 100px;
  perspective: 1000px;
  cursor: pointer;
}
.front-face,
.back-face {
  width: 100%;
  height: 100%;
  background-color: white;
  font-size: 40px;
  line-height: 140px;
  border-radius: 10px;
  object-fit: cover;
  position: absolute;
  backface-visibility: hidden;
}
.front-face {
  transform: rotateY(180deg);
  background-color: transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  text-align: center;
  overflow: hidden;
}
.reset,
.how-to-play {
  margin: 0 auto 20px;
  display: block;
  background-color: antiquewhite;
  color: red;
  text-align: center;
  cursor: pointer;
  padding: 15px 40px;
  transition: background-color 0.5s, color 0.5s;
  font-size: large;
  font-weight: bold;
  font-family: 'Courier New', Courier, monospace;
}
.reset:hover,
.how-to-play:hover {
  background-color: lightblue;
  color: black;
  font-style: italic;
}
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.6s;
}
.card.flip .card-inner {
  transform: rotateY(180deg);
}
