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

:root {
  --primary-color: #ff6f61;
  --secondary-color: #4caf50;
  --font-family: "Arial, sans-serif";
}

.logo-area {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  width: 150px;
  height: auto;
  margin: 0 auto;
}

.hero-area {
  background-image: url("../assets/page-title.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  height: 250px;
  color: white;
  text-align: center;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-area-title {
  font-size: 2.5rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  margin-bottom: 1rem;
}

.search-area {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

.no-results {
  text-align: center;
  font-size: 1.5rem;
  color: #555;
  margin-top: 2rem;
}

#search-input {
  width: 40%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  /* margin-right: 1rem; */
}

#search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(255, 111, 97, 0.5);
}

#search-button {
  background-color: var(--primary-color);
  color: white;
  border: 1px solid #ccc;
  border-left: 0;
  padding: 0.54rem 1rem;
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 0 4px 4px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

#search-button::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid white;
  border-radius: 100%;
}

#search-button:hover,
#search-button:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(255, 111, 97, 0.5);
}

.recipe-area-title {
  text-align: center;
  margin-top: 1rem;
  font-size: 2rem;
}

.recipe-area-title h2 {
  padding-bottom: 0.5rem;
  inline-size: 50%;
  margin: 0 auto;
  border-bottom-style: outset;
}

/* Loader Styles */
.loader {
  border: 16px solid var(--primary-color);
  border-top: 16px solid #f3f3f3;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 3s linear infinite;
  margin: 2rem auto;
  display: none;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.results-area {
  padding: 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.recipe-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background-color: white;
}

.recipe-image {
  width: 100%;
  object-fit: contain;
}

.recipe-image:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.recipe-info {
  padding: 1rem;
}

#meal-id {
  display: none;
}

.card-recipe-description {
  margin-top: 1rem;
  font-size: 1rem;
  color: #555;
  /* height: 60px; */
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-details-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 1rem;
  display: block;
  margin-left: auto;
  margin-right: 0;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(28, 27, 26, 0.9);
  color: #f3f3f3;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.recipe-modal-content {
  max-width: 800px;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recipe-modal-body {
  padding: 3.5rem;
}

#recipe-modal-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#recipe-modal-title,
#recipe-modal-category,
#recipe-modal-area {
  text-align: center;
  margin-bottom: 1rem;
}

#recipe-modal-ingredients-list {
  list-style-type: none;
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.modal-close-button {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 3rem;
  color: white;
  cursor: pointer;
}

.footer-area {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1rem;
  width: 100%;
}

#scroll-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  display: none;
  z-index: 1000;
}
#scroll-to-top-btn:hover {
  background-color: #555;
}
