@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');


body {
    font-family: 'Press Start';
    text-align: center;
    background-color: #e0f7fa;
    background:url(Renewvable\ energy\ bg.jpg);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    flex-direction: column;
    /* overflow: hidden; Prevent scrolling */
    padding-top: 15px; /* Move the content up */
    margin-top: -5%;
}
h1{
  margin-top:  130px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: rgb(71, 1, 184);
}

#game-container {
    position: relative;
    width: 80%;
    max-width: 322px;
    height: 80%;
    max-height: 629px;
    border: 2px solid #00796b;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -10px; /* Remove top margin */
    box-sizing: border-box; /* Ensure padding and border are included in width/height */
}

#score-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px;
    background-color: #ffffff;
    border-bottom: 2px solid #6088f5;
    box-sizing: border-box;
    margin-bottom: 10px; /* Space below the score container */
    margin-top: 10.0%;
}
/* Question container */

.background-container {
  position: relative; /* This is important for absolute positioning inside it */
  padding: 20px; /* Adjust padding as needed */
  background-color: #ffffff; /* Set the background color */
  border-radius: 10px; /* Optional: round the corners */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: add a shadow */
  margin: auto; /* Center the container */
  width: fit-content; /* Adjust width according to content or set a specific width */
}

#question-container {
    margin-top: 15px; /* Adjust this value to move it further down */
    text-align: center;
    position: center; /* This is important for absolute positioning inside it */
    padding: 20px; /* Adjust padding as needed */
    background-color: #ffffff; /* Set the background color */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: add a shadow */
    margin: center; /* Center the container */
    width: 450px; /* Adjust width according to content or set a specific width */
  }
  
  #question {
    font-size: 24px; /* Increased font size */
    margin-bottom: 10px;
    text-align: center;
  }
  
  #answer-input {
    padding: 5px;
    margin-bottom: 10px;
    text-align: center;
  }
  #message {
    margin-top: 10px;
    text-align: center;
  }
  
  
  .howToPlayBtn {
    position: absolute;
    top: 25px;
    left: 10px;
    z-index: 1;
  }
  
#score, #level {
  font-family: Arial, Helvetica, sans-serif;
    font-size: 18spx;
    color: black;
    background-color: #ffbb00;
    padding: 5px;
    margin-top: -32.5%;
    border: 2px solid #00796b;
    border-radius: 5px;
    text-align: center;
}

#gameCanvas {
    border: 2px solid #00796b;
    background-color: #ffffff;
    width: 100%;
    height: 100%;
    margin-top: -20.0%; /* Ensure no extra margin */
    box-sizing: border-box;
}

#control-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 1px; /* Space between canvas and buttons */
}

#startButton, #restartButton {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #00796b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#startButton:hover, #restartButton:hover {
    background-color: #004d40;
}

.movement-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 10px;
}

.movement-controls button, #downButton, #rotateButton {
    font-size: 24px;
    padding: 10px;
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
}

/* .movement-controls button:hover, #downButton:hover, #rotateButton:hover {
    background-color: #004d40;
} */

.hidden {
    display: none;
}

.grid-line {
    stroke: rgba(0, 0, 0, 0.2);
    stroke-width: 1;
}

#feedback {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    background-color: #ffffff;
    padding: 10px;
    border: 2px solid #00796b;
    border-radius: 5px;
    margin-top: 10px;
    color: #00796b;
}


.subtn{
  background-color: green;
  color: white;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  padding: 10px 20px;
  margin-left: 10px
  ;
  margin-bottom: 20px;
}
.time rem{
  margin-top: 20px;
  color: red;
}
.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;
    overflow: hidden;
  }
  
  @keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
  }
  .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: none;
    width: 600px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
  }
  .modal-content p {
    font-size: 24px;
    color: #000000;
    margin-bottom: 20px;
  }
  .modal-content .popButton {
    padding: 10px 20px;
    font-size: 24px;
    background-color: #8460de;
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .modal-content .popButton:hover {
    background-color: #000000;
  }
  /* Position the button at the top-left corner */
  /* .howToPlayBtn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
  } */
  
  /* Style the button to match the game theme */
  /* .howToPlayBtn {
    font-family: "Poppins", sans-serif; 
    font-size: 26px;
     background-color: #793DAE;  
    color: #8460de;
    border: none;
    font-weight: bolder;
    
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.2); 
    transition: background-color 0.3s ease; 
  } */
  .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: transparent;  
    /* color: #8460de;  */
    border: none;
    font-weight: bolder;
    background-color: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    /* box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.2);  */
    /* transition: background-color 0.3s ease; */
  }
  
  /* Add a hover effect */
  /* .howToPlayBtn:hover {
    background-color: #c2b7b7; 
  } */
  
  .close {
    font-family: "Poppins", sans-serif;
    color: #8460de;
    float: right;
    font-size: 24px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    font-family: "Poppins", sans-serif;
    color: black;
    text-decoration: none;
    cursor: pointer;
  }
  
  
  .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: transparent;  
    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;
  }

  .rules{
    text-align: left;
    font-weight: bold;
  }
  
  /* Add a hover effect */
  /* .homeBtn button:hover {
    background-color: #c2b7b7;
  } */
/* Responsive Styles */
@media (max-width: 600px) {
    body {
        padding-top: 5px; /* Move the content up a bit more */
        margin-top: -20%; /* Adjust margin to move content up */
    }
    
    #control-buttons {
        flex-direction: column;
        justify-content: space-between;
    }

    .movement-controls {
        flex-direction: row;
    }

    #game-container {
        width: 100%;
        height: 100%;
        margin-top: -30px;
    }

    #question-container{
      width: 90%;
      height: 60%;
    }

    /* img{
      height: 35px;
      width: 35px;
    } */

    .howToPlayBtn img{
      width: 50%;
      height: auto;
      margin-top: 15px;
    }

    .modal-header {
      padding: 10px; /* Reduced padding */
      text-align: left;
      font-size: 14px; /* You might also want to reduce the font size */
      margin-top: 0px; /* Reduced margin */
      width: 50%; /* You can adjust the width as needed */
    }

  
    #score-container {
        flex-direction: column;
        margin-bottom: 9px;
    }

    #score, #level {
        margin: 45px 0;
        margin-top: -40px;
    }

    #startButton, #restartButton {
        padding: 8px 16px;
        font-size: 14px;
    }

  

    .movement-controls button, #downButton, #rotateButton {
        font-size: 18px;
        padding: 10px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        margin: 4px;
        margin-top: -2px;
    }
}
