* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  font-family: "Segoe UI", Roboto, "Open Sans", sans-serif;
  background-image: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.3),
      rgba(0, 0, 0, 0.7),
      rgb(25, 23, 23)
    ),
    url("../images/blackBackground.jpg");

  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.main-conatiner {
  display: flex;
  flex-direction: column;
  gap: 33px;
  align-items: center;
  width: 50%;
  margin: 0 auto;
  margin-top: 4rem;
  padding: 40px;
  background: linear-gradient(
    135deg,
    rgba(58, 58, 58, 0.8),
    rgba(20, 20, 20, 0.9)
  );
  border-radius: 10px;
  box-shadow: 0 0 5px #fbf2d5, 0 0 10px #fbf2d5, 0 0 20px #fbf2d5;
}

#heading {
  font-size: 3.7rem;
  color: rgb(142, 127, 100);
}

h2 {
  color: #53401b;
  font-size: 2rem;
}

.search-container {
  display: flex;
  gap: 50px;
  width: 75%;
  margin-bottom: 15px;
}

#search-input {
  padding: 0.7rem;
  font-size: 1.1rem;
  width: 100%;
  border: none;
  border-radius: 10px;
  transition: all 0.2s ease-in-out;
}

#search-button {
  width: 40%;
  padding: 0.7rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(91, 89, 89, 0.8),
    rgba(47, 46, 46, 0.9)
  );
  color: white;
  transition: all 0.3s ease-in-out;
}

#search-button:hover {
  transform: scale(1.1);
  cursor: pointer;
  background-color: rgba(194, 179, 163, 0.6);
}

#search-input:hover {
  transform: scale(1.1);
}

img {
  height: 150px;
  width: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.recipe-img {
  height: 150px;
  width: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: rgb(142, 127, 100);
  margin-top: 50px;
  gap: 15px;
  padding: 40px;
  height: auto;
  width: 300px;
  overflow: hidden;
  word-wrap: break-word;
  text-overflow: ellipsis;
  background: linear-gradient(
    135deg,
    rgba(58, 58, 58, 0.8),
    rgba(20, 20, 20, 0.9)
  );
  box-shadow: 0 0 5px #fbf2d5, 0 0 10px #fbf2d5, 0 0 20px #fbf2d5;
  border-radius: 10px;
  transition: all 0.2s ease-in-out;
}

.recipe-card:hover {
  transform: scale(1.1);
  cursor: pointer;
}

.recipe-card h3 {
  font-size: 1.5rem;
  text-align: center;
  word-break: break-word;
  overflow: hidden;
  height: 2.8em;
}

.recipe-card pre {
  text-align: center;
  font-size: 1.1rem;
}

span{
  font-size: 1.2rem;
  font-style: italic;
}

#results-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8%;
  justify-content: center;
  margin-bottom: 5rem;
}

.no-result {
  color: rgba(255, 18, 18, 0.6);
  margin-top: 50px;
  font-size: 4rem;
  font-style: italic;
}

#typing-text {
  font-size: 4.5rem;
  font-weight: bold;
  color: white;
  text-align: center;
  margin-top: 2%;
  width: 100%;
  height: 10%;
}

#mp-loader {
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 7%;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ccc;
  border-top: 6px solid rgb(112, 94, 61);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media screen and (max-width: 420px) {
  .main-conatiner {
    margin-top: 1.5rem;
    width: 70%;
    padding: 27px;
    gap: 20px;
  }

  #heading {
    font-size: 1.9rem;
    text-align: center;
  }

  .search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 95%;
    gap: 25px;
    margin-bottom: 10px;
  }

  #search-input {
    padding: 0.6rem;
    width: 90%;
    font-size: 0.8rem;
  }

  #search-button {
    width: 45%;
    padding: 0.6rem;
    font-size: 0.8rem;
  }

  #typing-text {
    font-size: 1.7rem;
    width: 90%;
    text-align: center;
    margin: 0 auto;
    margin-top: 1rem;
    height: 6%;
  }

  .recipe-card {
    height: 270px;
    width: 230px;
    padding: 20px;
    gap: 15px;
  }

  .recipe-card:hover {
    transform: scale(1.07);
  }

  .recipe-card h3 {
    font-size: 1.4rem;
  }

 .recipe-card pre {
  text-align: center;
  font-size: 0.8rem;
}

span{
  font-size: 1.2rem;
  margin-bottom: 3px;
}

  .recipe-img {
    height: 100px;
    width: 100px;
  }

  .no-result {
    margin-top: 50px;
    font-size: 2.2rem;
  }
}

@media screen and (min-width: 421px) and (max-width: 620px) {
  .main-conatiner {
    width: 70%;
    margin-top: 0;
    gap: 25px;
    padding: 25px;
  }

  #heading {
    font-size: 2.5rem;
    text-align: center;
  }

  .search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 85%;
    gap: 25px;
    margin-bottom: 10px;
  }

  #search-input {
    padding: 0.6rem;
    width: 80%;
    font-size: 0.8rem;
  }

  #search-button {
    width: 35%;
    padding: 0.6rem;
    font-size: 0.8rem;
  }

  #typing-text {
    font-size: 2rem;
    width: 90%;
    text-align: center;
    margin: 0 auto;
    margin-top: 1.2rem;
  }

  .recipe-card {
    height: 270px;
    width: 230px;
    padding: 25px;
    gap: 15px;
  }

  .recipe-card h3 {
    font-size: 1.2rem;
    text-align: center;
  }

  .recipe-card pre {
  text-align: center;
  font-size: 0.8rem;
}

span{
  font-size: 1.2rem;
}

 
  .recipe-img {
    height: 100px;
    width: 100px;
  }

  .no-result {
    margin-top: 50px;
    font-size: 2.7rem;
  }
}

@media screen and (min-width: 621px) and (max-width: 1024px) {
  .main-conatiner {
    width: 65%;
    margin-top: 0.5rem;
    padding: 25px;
    gap: 27px;
  }

  #heading {
    font-size: 3.5rem;
  }

  .search-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 70%;
    gap: 40px;
    margin-bottom: 20px;
  }

  #search-input {
    padding: 0.6rem;
    width: 70%;
    font-size: 0.8rem;
  }

  #search-button {
    width: 25%;
    padding: 0.6rem;
    font-size: 0.8rem;
  }

  #typing-text {
    font-size: 3.5rem;
    width: 90%;
    text-align: center;
    margin: 0 auto;
    margin-top: 1.5rem;
  }

  #results-container {
    gap: 8%;
  }

  .recipe-card {
    height: 300px;
    width: 270px;
    padding: 25px;
    gap: 15px;
  }

  .recipe-card h3 {
    font-size: 1.2rem;
    text-align: center;
  }

  .recipe-card pre {
  text-align: center;
  font-size: 1rem;
}

span{
  font-size: 1.2rem;
}

  .recipe-img {
    height: 110px;
    width: 110px;
  }
}
