* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #2b2b30;
  background-image: url("back2.png");
  background-size: contain;
  background-repeat: no-repeat;
  font-family: "Poppins", sans-serif;
  background-size: 100% 100%;
  position: relative; /* Added for positioning the restart button */
}

.card-game {
  width: 500px;
  height: 500px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  perspective: 1000px;
}
.memory-card {
  width: 150px ;
  height: 150px;
  margin: 5px;
  position: relative;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform 0.5s;
  box-shadow: 5px 5px 4px rgba(223, 123, 69, 0.4);
}

.memory-card:active {
  transform: scale(0.97);
  transition: transform 0.2s;
}

.memory-card.flip {
  transform: rotateY(180deg);
}

.back-face {
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 5px;
  background: #ff7300;
  backface-visibility: hidden;

}

.front-face {
  transform: rotateY(180deg);
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 5px;
  background: #ffffff;
  backface-visibility: hidden;
  object-fit: cover;
}

button {
  color: rgb(82, 82, 82);
  background-color: #d1ae45;
  padding: 8px;
  border-radius: 7px;
  font-size: 15px;
  font-family: "Poppins",sans-serif;
  width: 120px;
  border: none;
  
}

button:hover {
  color: #d1ae45;
  background: #828282;
}


header {
  text-align: center;
  color: rgb(255, 255, 255);
  padding: 20px;
  font-family: "POPPINS", sans-serif;
  align-items: center;
  font-size: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: -100px;
  padding: 10px;
  font-weight: bolder;
  text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black,
    1px 1px 0 black;
}

.button {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}


/* Pop-up Modal Styles */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow: auto;
}

.modal-content {
  width: 300px;
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}

#close-btn {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #d1ae45  ;
  color: black;
  border-radius: 7%;
  cursor: pointer;
}

#close-btn:hover {
  background-color: #828282;
}

header {
  text-align: center;
  color: rgb(255, 255, 255);
  padding: 20px;
  font-family: 'POPPINS', sans-serif;
  align-items: center;
  font-size: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 180px;
  padding: 10px;
  font-weight: bolder;
  text-shadow: 
    -1px -1px 0 black,  
    1px -1px 0 black,
    -1px 1px 0 black,
    1px 1px 0 black;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: -2%;
  width: 100%;
  height: 102%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}
.modal-content {
  background-color: #fefefe;
  margin: auto; /* Center horizontally */
  padding: 20px;
  border: none;
  width: 40%;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Center vertically and horizontally */
}
.modal-content p {
  font-size: 24px;
  color: #3FBAD9   ;
  margin-bottom: 20px;

}
.modal-content .popButton {
  padding: 10px 20px;
  font-size: 24px;
  background-color: #3FBAD9   ;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal-content .popButton:hover {
  background-color: #828282  ;
}
/* Position the button at the top-left corner */
.howToPlayBtn {
  position: absolute;
  top: 25px;
  left: 10px;
  z-index: 1;
}

/* Style the button to match the game theme */
.howToPlayBtn {
  font-family: "Poppins", sans-serif; /* Use the same font as the game */
  font-size: 16px; /* Adjust the font size as needed */
  background-color: #00BAD3;  
  /* color: #8460de;  */
  border: none;
  font-weight: bolder;
  background-color: none;
  border-radius: 5px;
  padding: 10px 20px;
  cursor: pointer;
 }


/* Add a hover effect */
.howToPlayBtn:hover {
  background-color: #828282; /* Slightly darker purple on hover */
}


.close {
  color: #3FBAD9;
  float: right;
  font-size: 24px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: rgb(0, 0, 0);
  text-decoration: none;
  cursor: pointer;
}
css
 .modal-header {
    text-align: center;
    margin-bottom: 10px;
}

.modal-header img {
    max-width: 50%; /* Set the maximum width to 50% of the parent container */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Make the image a block-level element */
    margin: 0 auto; /* Center the image horizontally */
}
.modal-content iframe {
    margin-top: 20px; /* Added margin-top for the iframe */
}
.homeBtn {
  position: absolute;
  top: 145px; /* Adjust the top position as needed */
  left: 10px;
  z-index: 1;

}

/* Style the home button */
.homeBtn button {
  font-family: "Poppins", sans-serif;
  background-color: #00BAD3;  
  font-size: 16px; 
  border: none;
  font-weight: bolder;
  border-radius: 5px;
  padding: 15px 20px;
  cursor: pointer;
  /* box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.2); */
  transition: background-color 0.3s ease;
}
@media (max-width: 480px) {
  /* Styles for screens with a maximum width of 480px (smartphones) */
  .container {
    max-width: 95%;
    padding: 0.5rem;
  }

  .modal-content {
    width: 90%;
    margin: 40% auto;
  }

  .modal-content p {
    font-size: 16px;
  }

  .modal-header img {
    max-width: 50%;
  }

  .modal-content iframe {
    height: 150px;
    width: 350px;
  }
}
