* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Chewy", system-ui;
  font-weight: 400;
  font-style: normal;
  background-image: url(Images/MathBackground3.png);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/*--home page--*/

#MainTitle {
  display: flex;
  justify-content: center;
  font-size: 5rem;
  color: black;
  height: auto;
  text-align: center;
  margin-bottom: 3rem;
}

#Home_heading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40vh;
  color: black;
  text-align: center;
  line-height: 2;
  margin-top: 60px;
}

#navbar {
  background-color: transparent;
  padding: 0px 20px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-hamburger {
  display: none;
  font-size: 2rem;
  color: black;
  cursor: pointer;
  margin-right: auto;
  margin-left: 30px;
  line-height: 1;
  font-size: 2rem;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: black;
  text-decoration: none;
  font-size: 2.2rem;
}

.nav-links a:hover {
  color: teal;
}

/*--Addition Page--*/

#add-problem-container,
#sub-problem-container,
#multi-problem-container,
#div-problem-container,
#challenge-problem-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8rem;
  font-size: 3rem;
}

/* === Shared Elements (Class-Based) === */

.input-checkanswer-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.answer-input {
  border-radius: 10px;
  border: none;
  font-family: "Chewy";
  color: teal;
  text-align: center;
  font-size: 1.2rem;
  padding: 6px 12px;
}

.answer-input::placeholder {
  color: teal;
  font-size: 1.1rem;
}

.check-answer-btn {
  font-size: 1.1rem;
  font-family: "Chewy";
  color: teal;
  border: none;
  border-radius: 12px;
  padding: 5px 12px;
  background-color: rgb(216, 205, 205);
  margin-left: 1rem;
  cursor: pointer;
}

.feedback-text {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  font-size: 2.5rem;
}

.next-question-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.next-question-btn {
  font-size: 1.1rem;
  font-family: "Chewy";
  border-color: teal;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  color: teal;
  background-color: rgb(216, 205, 205);
  padding: 5px 12px;
}

/*--Screen size adaptations--*/

@media (max-width: 768px) {
  .input-checkanswer-container,
  .next-question-container {
    margin-top: 1.2rem;
  }

  .answer-input {
    width: 50%;
    font-size: 1.2rem;
  }

  .check-answer-btn,
  .next-question-btn {
    font-size: 1.2rem;
    padding: 8px 16px;
  }

  #MainTitle {
    font-size: 3rem;
    margin-top: 3rem;
  }

  #sub-problem-container {
    margin-top: 3rem;
  }

  #add-problem-container {
    margin-top: 3rem;
  }

  #multi-problem-container {
    margin-top: 3rem;
  }

  #div-problem-container {
    margin-top: 3rem;
  }

  #challenge-problem-container {
    margin-top: 3rem;
  }

  #Home_heading {
    margin-top: -1rem;
  }
}

@media (max-width: 1180px) {
  .menu-hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #25a1aa;
    border-top: 2px solid #050505;
    border-bottom: 2px solid #050505;
    border-left: 2px solid #050505;
    border-right: 2px solid #050505;
    width: 100%;
    position: absolute;
    border-radius: 25px;
    top: 70px;
    left: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    text-align: center;
    padding: 10px;
    border-top: 1px solid #555;
  }

  #MainTitle {
    margin-top: 3rem;
  }
}
