body {
    padding: 0 25% 0 25%;
    font-family: "Poppins", sans-serif;
    /* background-position: center; */
    background-image: url("purple-bg.jpg");
    background-size: cover;
    /* background-repeat: no-repeat; */
  }
  
  h1 {
    margin: 0;
    font-family: "Poppins", sans-serif;
    text-align: center;
    padding-top: 40px;
    padding-bottom: 20px;
    color: white;
    margin-top: 100px;
    font-size: 40px;
    font-weight: bolder;
  }
  
  header {
    text-align: center;
    align-content: center;
    padding-top: 20px;
    margin-top: 50px;
  }
  
  img {
    width: 75%;
    padding: 0 12.5% 0 12.5%;
  }
  
  h2 {
    text-align: center;
    font-size: 125%;
  }
  
  p {
    padding: 0 2.5% 1% 2.5%;
    text-align: center;
  }
  
  /* Game Container Styles*/
  .game {
    background-color: white;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
    width: 500px;
    height: 200px;
  }
  
  .rules {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 10px 0;
  }
  
  .rules-container {
    width: 95%;
    background-color: rgb(200, 200, 201);
    border-radius: 10px;
    padding: 10px;
  }
  
  /* Start/Reset Buttons, Difficulty Buttons, Clock Styles */
  #run-container, #level-container {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 10px 0;
  }
  
  #level {
    font-weight: 550;
    font-size: larger;
    padding: 0 2% 0 2%;
  }
  
  #start-button {
    background-color: #8460DE;
    color: white;
    width: 100px;
  }
  
  #reset-button {
    background-color: #8460DE;
    color: white;
    width: 100px;
  }
  
  #clock {
    width: 75px;
    text-align: center;
    font-weight: 550;
  }
  
  .run, .difficulty {
    min-width: 75px;
    text-align: center;
    background-color: white;
    border-radius: 5px;
  }
  
  button {
    background-color: #8460DE;
    font-size: 90%;
    font-weight: 90;
    color: white;
    width: 100px;
    border-radius: 2px;
  }
  
  button:hover {
    background-color: rgb(70, 70, 70);
  }
  
  button:disabled {
    cursor: not-allowed;
  }
  
  /* Equation Styles */
  .equation {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    font-size: 200%;
  }
  
  .equation-pieces {
    padding: 1.5px;
  }
  
  /* Answer Section Styles */
  .answer {
    display: flex;
    justify-content: center;
    padding-bottom: 10px;
  }
  
  .answer-pieces {
    padding: 0 5px 0 5px;
    height: 30px;
  }
  
  #user-answer {
    width: 75px;
    height: 30px;
  }
  
  #user-number {
    width: 90%;
    height: 82.5%;
    border-radius: 5px;
    font-weight: 400;
    font-size: 115%;
  }
  
  #n-answer {
    font-size: larger;
    font-weight: 550;
    background-color: #8460DE;
    border-radius: 5px;
    color: white;
  }
  
  #current-score {
    padding: 0 2% 0 2%;
    font-weight: 550;
  }
  
  #answer-indicator {
    justify-content: flex-end;
  }
  
  /* Score Section Styles */
  .score {
    display: flex;
    justify-content: center;
    font-size: 135%;
    font-weight: 550;
    background-color: rgb(220, 200, 200);
    border-radius: 5px;
    padding: 10px;
    /* margin-bottom: 20px; */
    width: 520px;
  }
  
  /* Media Screen Responsive Design Styles */
  @media screen and (max-width: 900px) {
    body {
      padding: 0 20% 0 20%;
  
    }
  }
  
  @media screen and (max-width: 800px) {
    body {
      padding: 0 15% 0 15%;
    }
  }
  
  @media screen and (max-width: 550px) {
    body {
      padding: 0 10% 0 10%;
    }
  }
  
  @media screen and (max-width: 400px) {
    body {
      padding: 0 5% 0 5%;
    }
  }
  
  #main-image {
    width: 30%;
    padding-left: 35%;
    border-radius: 5px;
  }
  .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: 15% auto;
    padding: 20px;
    border: none;
    width: 30%;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
  }
  .modal-content p {
    font-size: 24px;
    color: #8460de;
    margin-bottom: 20px;
  }
  .modal-content .popButton {
    padding: 10px 20px;
    font-size: 24px;
    background-color: #8460de;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .modal-content .popButton:hover {
    background-color: #8460de;
  }
  /* 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: #793DAE;  
    /* 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: #c2b7b7; /* Slightly darker purple on hover */
  }
  .modal {
    display: none;
    position: fixed;
    z-index: 2; /* Ensure the modal is above other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
  }
  
  /* Style the modal content */
  .modal-content {
    background-color: #ffffff; /* Use a white background for the modal content */
    font-family: "Poppins", sans-serif; /* Use the same font as the game */
    color: #000000; /* Set the text color to black */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); /* Add a subtle shadow */
    border-radius: 10px; /* Rounded corners */
  }
  
  
  .close {
    color: #8460de;
    float: right;
    font-size: 24px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }
  .mc {
    background-color: #ffffff;
    width: 540px;
    margin: 0 auto; /* Center horizontally */
    margin-top: 100px; /* Adjust as needed for vertical positioning */
    border: 2px dashed;
    height: 307px;
  }
  .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: #793DAE;  
  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;
}
  /* Styles for mobile screens */
@media screen and (max-width: 480px) {
  body {
    padding: 0 5%;
    background-size: cover;
  }

  h1 {
    font-size: 28px;
    margin-top: 230px;
  }

  .game {
    width: 86%;
    /* height: auto; */
  }

  .equation {
    font-size: 150%;
  }

  .score {
    width: 94.5%;
  }

  #main-image {
    width: 60%;
    padding-left: 20%;
  }

  .modal-content {
    width: 80%;
    margin: 30% auto;
  }

  .modal-content iframe {
    width: 100%;
    height: 200px;
  }

  .mc {
    width: 100%;
    height: auto;
    margin-top: 0px;
  }

  .howToPlayBtn {
    background-color: #793DAE;  
    border: none;
    font-weight: bolder;
    background-color: none;
    border-radius: 5px;
    padding: 0px 15px;
    cursor: pointer;
    width: 70;
   }

   .homeBtn button{
    width: 80%;
   }
   .homeBtn {
    position: absolute;
    top: 80px; /* Adjust the top position as needed */
    left: 02px;
    z-index: 1;
  
  }
}

/* Styles for laptop screens */
@media screen and (min-width: 481px) and (max-width: 1024px) {
  body {
    padding: 0 15%;
    background-size: cover;
    background-repeat: repeat;
  }

  .game {
    width: 600px;
    height: 250px;
  }

  .score {
    width: 620px;
  }

  #main-image {
    width: 40%;
    padding-left: 30%;
  }

  .modal-content {
    width: 50%;
  }

  .mc {
    width: 620px;
    height: 350px;
  }
}