* {
  box-sizing: border-box;
}

body {
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
  background: rgb(245, 240, 224, 1);
  padding: 0;
  margin: 0;
}

header {
  display: flex;
  justify-content: center;
  text-align: center;
  background-color: #a2bb9d;
  padding: 0;
  margin: 0;
}

button {
  background-color: #fff;
  border: 0 solid #e2e8f0;
  border-radius: 1.5rem;
  color: #0d172a;
  cursor: pointer;
  display: inline-block;
  margin: 2px;
  font-weight: 600;
  line-height: 1;
  padding: 0.5rem 1rem;
  text-align: center;
}

h1,
h3 {
  font-family: "Permanent Marker";
  color: #404a41;
  text-shadow: 1px 1px 2px snow;
}

h2 {
  font-family: "Courier New", Courier, monospace;
  padding: 5px 0 5px 0;
  margin: 0;
}

h4,
h3,
h5,
p {
  padding: 2px;
  margin: 0;
}

hr {
  width: 98%;
  border: 0;
  height: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.filter:hover {
  box-shadow: inset 0 0 0 2px #729869;
}

.sort:hover {
  box-shadow: inset 0 0 0 2px #4a6445;
}

#random-button:hover {
  box-shadow: inset 0 0 0 2px #a96c97;
}

.clicked-filter {
  background-color: #729869;
  color: #fff;
}

.clicked-sort {
  background-color: #4a6445;
  color: #fff;
}

.filter-sort-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 50px 5px 50px;
  background-color: #c4d4c0;
}

.dropdown {
  border: none;
  border-radius: 4px;
  color: #0d172a;
  background-color: #fff;
  padding: 5px;
  margin: 0 0 10px 0;
  font-size: 0.8rem;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 5px 0 10px 0;
  padding: 0 50px 0 50px;
  justify-content: center;
}

.book-display {
  display: flex;
  flex-direction: column;
  background-color: #f1f5f1;
  max-width: 300px;
  min-width: 300px;
  padding: 1rem;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  border-radius: 20px;
}

.book-display h2 {
  text-align: center;
}

.book-display img {
  max-height: 180px;
  object-fit: cover;
  margin: 0 0 10px 0;
  border-radius: 10px;
}

.book-display:hover {
  box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

#filter,
#sort,
#tablet-filter {
  display: none;
}

#random-button-div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .filter-sort-flex {
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    align-items: flex-end;
  }

  #filter-dropdown {
    margin: 2px;
    width: 200px;
    height: 30px;
  }

  #sort-dropdown {
    display: none;
  }
  #sort,
  #tablet-filter {
    display: block;
  }
}

@media (min-width: 1024px) {
  .dropdown {
    display: none;
  }

  .filter-sort-flex {
    flex-direction: row;
    gap: 30px;
  }

  #filter,
  #sort {
    display: block;
  }
}
