@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-image: url('energy.jpg'); /* Add your desired background image */
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
}

.container {
    text-align: center;
    background-color: #FFF1E1; /* Add slight transparency */
    opacity : 90%;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    width: 800px;
    height: 900px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* margin-top: 50px; */
}

h1 {
    margin-bottom: 10px;
    color: rgba(71, 1, 184);
}

.score-container {
    margin-bottom: 5px;
    font-size: 20px;
}

.feedback {
    font-size: 26px;
    font-weight: bold;
    margin-top: 10px;
}

.feedback.incorrect {
    color: red;
}

.feedback.correct {
    color: green;
}


canvas {
    background-color: #ffe9ef;
    border: 2px solid #333;
    width: 100%; /* Make canvas responsive */
    height: auto;
    max-width: 600px; /* Ensure canvas doesn't exceed a reasonable width */
    max-height: 600px; /* Ensure canvas height is reasonable */
}

.controls {
    display: none;
    margin-top: 20px;
}

.horizontal-controls {
    display: flex;
    justify-content: center;
}

.horizontal-controls button {
    margin: 5px;
    font-size: 16px;
    background-color: #f5f5f5;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.controls button {
    margin: 5px;
    font-size: 16px;
    background-color: transparent;
    color: #ffffff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.buttons {
    margin-top: 20px;
    position: relative;
}

.buttons button {
    padding: 15px 30px;
    margin: 10px;
    font-size: 18px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    position: absolute;
    top: 0;
    /* left: 80%; */
    transform: translateX(-50%);
}

.buttons button:hover {
    background-color: transparent;
}

button img{
    width: 55px;
    height: auto;
    cursor: pointer;
}



#restartBtn {
    display: none;
    top: 70px; /* Adjust based on your preference */
    margin-top: -21%;
    left: 75%;
}

/* Modal Style */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #ffffff;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 600px;
    text-align: center;
    border-radius: 10px;
}

#questionText {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: left;
}

#optionA, #optionB, #optionC {
    background-color: #FFF1E1;
    color: rgb(0, 0, 0);
    font-size: 15px;
    /* font-weight: bold; */
    padding: 15px 25px;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    text-align: left;
}

#optionA:hover, #optionB:hover, #optionC:hover{
    background-color: #f8c080;
}

.howToPlayBtn, .homeBtn {
    position: absolute;
    z-index: 10;
 }
  
.howToPlayBtn {
    top: 50px;
    left: 10px;
    background-color: transparent; 
    border: none;
  
  }
  
.homeBtn {
    top: 110px;
    left: 15px;
    margin-top: 50px;
  }
  
.howToPlayBtn button, .homeBtn button {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  
.howToPlayBtn img, .homeBtn img {
    width: 100%;
    height: auto;
  }
  
  .close {
    font-family: "Poppins", sans-serif;
    color: #000000;
    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 */
  }

.rules{
    font-weight: bold;
    text-align: center;
}
 
.modal2 {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s;
  }
  
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
  }

/* Media query for small devices (phones) */
@media (max-width: 600px) {
    .modal-content {
        width: 85%; /* Increase the width on smaller screens */
        margin: 10% auto; /* Adjust the margin */
        padding: 15px; /* Reduce padding */
        font-size: 14px; /* Adjust font size */
        margin-top: 300px;
    }
    #restartBtn {
        display: none;
        top: -550px; /* Adjust based on your preference */
        margin-top: 124.3%;
        left: 87%;
    }


    .howToPlayBtn img  {
        width: 60%;
        height: auto;
        /* margin-bottom: -90px; */
        margin-top: 20px;
        margin-left: -20px;
    }

    .homeBtn img{
        width: 60%;
        height: auto;
        /* margin-bottom: -90px; */
        margin-top: -60px;
        margin-left: -20px;
    }

    .container {
        text-align: center;
        background-color: #FFF1E1;
        opacity: 90%;
        padding: 20px;
        border-radius: 10px;
        max-width: 90%;
        width: 350px;
        height: 600px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        margin-top: 90px;
        margin-left: -6px;
    }
    button img{
        width: 45px;
        height: auto;
        cursor: pointer;
    }
}

/* Media query for larger devices (desktops) */
@media (min-width: 768px) {
    .modal-content {
        width: 70%; /* Adjust width for larger screens */
        margin: 15% auto;
        padding: 25px;
    }}