@import url('https://fonts.googleapis.com/css2?family=DynaPuff:wght@400..700&family=Rock+3D&family=Sour+Gummy:ital,wght@0,100..900;1,100..900&display=swap');


body {
  background: #A68167;
  margin: 0;
}

section {
  display: flex;
}

.title-container {
  background-color: #322111;
  width: 400px;
  margin: 0;
  /* height: 100vh; */

}

.main-container {
  margin-left: 50px;
  margin-top: 50px;
}

.title-container h1 {
  font-family: "Rock 3D", serif;
  font-weight: 400;
  font-style: normal;
  color: #A68167;
  font-size: 96pt;
  overflow-wrap: break-word;
  text-transform: uppercase;
  margin: 0;
  text-align: center;

}

.title-container a {
  text-decoration: none;
}

.sort-container h2 {
  font-family: "DynaPuff", serif;
  color: #322111;
  width: 120px;
}

#sort-by {
  display: flex;
  width: 600px;
  gap: 20px;
  align-items: center;
}

button {
  background-color: #322111;
  color: #D2C1AD;
  font-family: "DynaPuff", serif;
  height: 30px;
  min-width: 100px;
  border-radius: 40px;
  border: none;
  cursor: pointer;

}

/* here is the styling for the button when it is enabled */
.clicked-button {
  background-color: #D2C1AD;
  color: #322111;
  border: 2px solid #322111;
}

.filter-way {
  display: flex;
  width: 600px;
  gap: 20px;
  align-items: center;
}

.filter-way select {
  background-color: #322111;
  color: #D2C1AD;
  border: none;
  border-radius: 40px;
  font-family: "Sour Gummy", serif;
  text-shadow: none;
  text-align: center;
  cursor: pointer;
  font-size: 16px;

}

#library-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 30px;
}

.book-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  background-color: #322111;
  border-radius: 40px;
  width: 30%;
  max-width: 500px;
  /* height: 500px; */
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  margin: 0;
}

.cover-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  font-family: "DynaPuff", serif;
  color: #D2C1AD;
  font-size: 14pt;
  height: 50%;

}

.cover-container h2 {
  margin: 5px 0 0 0;
  padding: 0 15px;
  text-align: center;
  /* width: 100%; */
}


img {
  width: 200px;
  height: 100px;
  object-fit: cover;
  margin-top: 20px;
  margin-bottom: 0;

}

.author-info-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  font-family: "DynaPuff", serif;
  color: #A68167;
}

.author-info-container h3 {
  margin: 0;
  font-size: 16pt;
  text-overflow: wrap;
  text-align: center;

}

.author-info-container h4 {
  margin: 0;
  text-transform: uppercase;
  font-size: 12pt;
}

.description-container {
  font-family: "Sour Gummy", serif;
  color: #D2C1AD;
  font-size: 12pt;
}

.description-container p {
  padding: 10px 20px;
  margin: 0;
}

footer {
  background-color: #322111;
  font-family: "Sour Gummy", serif;


}

.github-link {
  text-decoration: none;
  color: #A68167;

}

/* adding some hover effects */

button:hover {
  border: 2px solid #D2C1AD;
}

select:hover {
  background-color: #D2C1AD;
  color: #322111;
}

.github-link:hover {
  opacity: 50%;
}

/* impovements: next time I will start with mobile first again... I was too eager to start with the java script... also for the fill webpage I think doing grid instead of flexbox would be the better way to go.. I will incorporate that in the next project. */
@media (max-width: 667px) {
  section {
    flex-direction: column;
  }

  .title-container {
    width: 100%;
    margin-bottom: 0;

  }

  .title-container h1 {
    font-size: 48pt;
  }

  .sort-container {
    margin-top: 0;
  }

  #sort-by {
    width: auto;
    flex-wrap: wrap;
    margin-left: 80px;
    position: relative;
  }

  #sort-by h2 {
    position: absolute;
    left: -100px;
  }

  .filter-way {
    width: auto;
    margin-left: 80px;
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;

  }

  .filter-way h2 {
    position: absolute;
    left: -100px;
  }

  #library-container {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }

  .book-container {
    width: 90%;
  }
}

@media (min-width: 668px) and (max-width: 1224px) {
  /* #library-container {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  } */

  .book-container {
    width: 40%;
  }

  #sort-by {
    width: 300px;
  }
}