@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  font-family: 'Josefin Sans', sans-serif, cursive;
  font-weight: 500;
  box-sizing: border-box;
}

body {
  background-image: url('many-falling-blocks-with-question-marks-3d-illustration_75780-204.jpg');
  background-size: cover;
  background-repeat: no-repeat;
}

.board {
  background: #ecede7;
  width: 90%;
  max-width: 600px;
  margin: 20px auto;
  border-radius: 10px;
  padding: 20px;
  border: 2px solid #a8ce41;
}

.board h1 {
  color: rgb(215, 104, 13);
  font-weight: 800;
  border-bottom: 1px solid orange;
  padding-bottom: 20px;
  text-align: center;
  display: flex; 
  font-size: 1.5rem bold; 
  justify-content: space-around;
  font-family: 'Josefin Sans', sans-serif, cursive;
  
}

h1 {
  color: #ff6f61;
  font-family: 'Josefin Sans', sans-serif, cursive;
  font-weight: 1000;
  font-size: 1.8rem;
}
.quiz {
  padding: 15px 0;
}

.quiz h2 {
  font-size:1.2rem;
  font-family: 'Josefin Sans', sans-serif, cursive;
  color: rgb(215, 104, 13);
  font-weight: 600;
  text-align: center;
}


.btn {
  background: #fff;
  color: #6d3205;
  font-weight: 500;
  font-size: 1rem;
  width: 100%;
  min-width: 44px; 
  min-height: 44px; 
  border: 1px solid #b75d08;
  padding: 10px;
  margin: 8px 0;
  text-align: left;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Josefin Sans', sans-serif;
}

.btn:hover:not([disabled]) {
  background: #f35505;
  color: #fff;
}

.btn:disabled {
  cursor: no-drop;
}

#next-btn {
  background: #d87c04;
  color: #fff;
  font-weight: 500;
  width: 100%;
  max-width: 150px;
  border: 0px;
  padding: 10px;
  margin: 15px auto 0;
  border-radius: 4px;
  cursor: pointer;
  display: none;
}

.correct {
  background: #08853e;
}

.incorrect {
  background: #c54205;
}

.timer-bar {
  width: 100%;
  height: 20px;
  background-color: #edc77f;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 15px;
}

.character {
  border: none;
  width: 20px;
  height: 215px;
  background-color: #d87c04;
  position: absolute;
  top: 0.5px;
  bottom: 0.1;
  left: 0;
  border-radius: 20%;

}

@keyframes moveCharacter {
  0% {
    left: 0;
  }
  100% {
    left: 100%;
  }
}

#character-selection {
  border: none;
  text-align: center;
  margin-top: 20px;
}

.animal-options {
  border: none;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.animal-option {
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 1rem; 
}

.animal-option img {
  border: none; 
  height: 100px;
  width: 120px;
  object-fit: cover;
  transition: transform 0.1s ease, box-shadow 0.1s ease; 
}

.animal-option img:hover {
  transform: scale(1.5, 1.5); 
  box-shadow: 10 10 100px rgba(232, 232, 228, 0.3);
}

#start-quiz {
  background: #d87c04;
  color: #fff;
  padding: 10px ;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  width: 100%; 
  max-width: 200px; 
  margin: 10px auto; 
  display: block;
}


#start-quiz:hover {
  background: #f2de45;
}

.animal-option.selected {
  color: #dde997;
  background-color: #ddee99;
}

h1 {
  color: #4b0404;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
}

#quiz-controls {
  text-align: center;
  margin: 20px 0;
}

.input-group {
  display: flex; 
  align-items: center;
  gap: 10px;
}

#topic-input {
  padding: 5px;
  font-size: 16px;
  border: 4px solid #d87c04;
  border-radius: 5px;
  background-color: #fff;
  color: #6d3205;
  flex: 1; 
  cursor: pointer;
  height: 40px;
  width: 0.4rem;
}
#topic-input:hover {
  border-color: #f2580b;
  border-width: 0.4rem;
}

#generate-question-btn {
  display: flex;
  background: #d87c04;
  color: #fff;
  font-weight: 400;
  padding: 10px 20px; 
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem; 
  width:50%;
  max-width: 200px;
  margin-top: 0px; 
  white-space: nowrap;
  height: 40px; 
  align-items: center;
  justify-content: center;
}

#generate-question-btn:hover {
  background: #c56a00;
}

.quiz {
  margin-bottom:15px;
}
#mute-btn {
  position: fixed;
  top: 10px; 
  right: 10px; 
  background: none;
  border: none;
  font-size: 1rem; 
  color: #d87c04;
  z-index: 1000;
}

#mute-btn:hover {
  color: #f2de45; 
}

@media (max-width: 768px) {
  .board {
    padding: 15px; 
  }

  .board h1 {
    font-size: 1.3rem; 
    
  }

  .quiz h2 {
    font-size: 1rem;
  }

  .btn {
    font-size: 0.9rem; 
    padding: 8px; 
  }

  .animal-option img {
    height: 70px; 
    width: 50px;
  }

  #start-quiz, #generate-question-btn {
    font-size: 0.9rem;
  }
}

#result-message {
  display: none; 
  text-align: center;
  margin: 20px;
  font-size: 24px;
  font-family: 'Montserrat', sans-serif;
  font-weight: bold;
}

#result-message.win {
  color: #08853e; 
}

#result-message.lose {
  color: #c54205; 
}