* {
  font-family: "Open Sans", sans-serif;
  box-sizing: border-box;
}

body {
  background-color: #fafbff;
  max-width: 1312px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  height: 100vh;
  color: black;
  align-items: center;
  justify-content: center;
}

main {
  background-color: #fafbff;
}

.title-container {
  background-color: #fafbff;
  /*.bookImage: 2px black solid;*/
  margin-top: 30px;
  width: 100%;
  max-width: 1312px;
  height: 120px;
  padding: 2px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-right: 10px;
}

.userSearch {
  position: relative;
  margin-left: auto;
  margin-right: 7%;
}

#userInput {
  background-color: #e9e9e9;
  border: 1px lightgray solid;
  border-radius: 10px 0 0 10px;
  height: 36px;
  width: 200px;
  margin-top: 4px;
}

#searchButton {
  background-color: black;
  color: white;
  border: none;
  border-radius: 0 10px 10px 0;
  width: 60px;
  height: 36px;
  position: absolute;
  margin-left:0;
}

h1 {
  font-size: 60px;
  text-align: center;
  font-weight: 750;
}

h2 {
  text-align: center;
}

h3 {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
}

h4 {
  font-size: 11px;
}

p {
  font-weight: bolder;
}

.filters {
  background-color: #fafbff;
  /*border: 2px grey solid;*/
  border-radius: 30px;
  width: 100%;
  height: 120px;
  margin-bottom: 8px;
  padding: 10px 10px 16px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.genre {
  background-color: #fafbff;
  /*border: 1px black solid;*/
  border-radius: 30px;
  width: 46%;
  height: 80px;
  margin: 2px 12px 2px 2px;
  padding: 2px 16px;
  justify-content: center;
  color: black;
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

.genreChoice,
.genreButton button
.genreButton{
    display: inline-block;
}

.sort {
  background-color: #fafbff;
  /*border: 1px black solid;*/
  border-radius: 30px;
  width: 32%;
  height: 80px;
  margin: 2px 2px 2px 2px;
  padding: 2px 16px;
  justify-content: center;
  color: black;
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

.surprise {
  background-color: #fafbff;
  /*border: 1px black solid;*/
  border-radius: 30px;
  width: 24%;
  height: 80px;
  margin: 2px;
  padding: 2px 16px;
  justify-content: center;
  color: black;
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

.sortTitle,
.surpriseTitle {
  font-size: 22px;
  font-weight: bolder;
  padding-left: 5px;
  margin-bottom: 4px;
}

button {
  background-color: #e9e9e9;
  color: black;
  border-radius: 50px;
  border: none;
  width: auto;
  height: 36px;
  padding: 1px 12px;
  margin: 4px;
  cursor: pointer;
  font-weight: 500;
}

button#random {
  background-color: #ff6589;
  color: white;
  border-radius: 50px;
  border: none;
  width: 150px;
  height: 36px;
  padding: 1px 20px;
  margin-right: 4px;
  cursor: pointer;
  font-weight: 500;
}

#surpriseButton{
    display: flex;
    flex-direction: row;
}

option {
  background-color: #e9e9e9;
  color: black;
  border-radius: 50px;
  border: none;
  width: 100px;
  height: 36px;
  padding: 1px 20px;
  margin-right: 4px;
  cursor: pointer;
  font-weight: 500;
}

#more:hover,
#more1:hover,
button:hover {
  border: 2px black solid;
}

#more:focus,
#more1:focus,
button:focus {
  border: 2px black solid;
  background-color: black;
  color: white;
}

#random:hover {
  border: 2px #0018a4 solid;
}

#random:focus {
  border: 2px #0018a4 solid;
  background-color: #0018a4;
  color: white;
}

/*#all{
    background-color: black;
    color: white;
}*/

#more,
#more1 {
  background-color: #e9e9e9;
  border-radius: 50px;
  border: none;
  width: 100px;
  height: 36px;
  padding: 1px 12px;
  margin: 2px;
  cursor: pointer;
  font-weight: bolder;
}

.library {
  background-color: #fafbff;
  box-sizing: border-box;
  /*border: 2px black solid;*/
  border-radius: 30px;
  color: black;
  width: 100%;
  max-width: 1312px;
  padding: 4px 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, auto);
  justify-content: space-between;
}

.bookItem {
  background-color: white;
  border: 2px #e9e9e9 solid;
  border-radius: 16px;
  width: 300px;
  height: 500px;
  margin: 8px;
  padding: 16px 16px 8px 16px;
  align-items: center;
  color: black;
  font-size: 18px;
  text-wrap: wrap;
  display: grid;
  grid-template-rows: 260px 56px 132px;
}

.bookItem:hover {
  border: 2px black solid;
  box-shadow: 5px 5px 8px lightgray;
}

.bookImage {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.bookChild {
  border-bottom: 1px #e9e9e9 solid;
  width: 100%;
  height: 100%;
  margin: 2px;
  padding: 2px 10px;
  font-size: 10px;
}


@media(min-width:1025px) and (max-width:1311px){
  .body{
      width: 1024px;
  }
  .filters {
      justify-content: space-between;
      flex-wrap: nowrap;
  }
  .genre{
      width: 46%;
      height: 80px;
      margin: 2px px 2px 2px;
      padding: 2px 6px;
      justify-content: center;
      color: black;
      font-size: 16px;
      display: flex;
      flex-direction: column;
  }
  .genre
  .sort,
  .surprise{
      display: inline-block;
  }

  .library {
      grid-template-columns: repeat(2, 1fr);
      margin-top: 55px;
      justify-content: center;
      display: flex;
      flex-wrap: wrap;
  }
}

/* For tablets: 2 columns */
@media(min-width:667px) and (max-width:1024px){
  .library {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 155px;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
  }

  h1 {
    font-size: 40px;
  }

  .filters {
    flex-direction: column;
    align-items: center;
  }

  .genre,
  .sort,
  .surprise {
    width: calc(100% - 20px);
    margin-bottom: 8px;
  }
  .title-container{
    padding:32px;
  }
}

/* For mobile: 1 column */
@media(max-width:666px){
  .library {
    grid-template-columns: repeat(1, 1fr);
    margin-top: 190px;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
  }
  .title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    height: max-content;
    justify-content: center;
  }
  .logo {
    width: 40px;
    height: 40px;
    margin-right: 5px;
  }
  .logo,
  h1{
    display: inline-block;
  }

  h1 {
    margin-bottom: 10px;
    margin-top: 10px;
    font-size: 36px;
  }

  .userSearch {
    margin-top: 10px; 
    margin-left: 18%;
    justify-content: center;
    order: 1; 
    width: calc(100% - 30px); 
    max-width: 300px;
  }

  .filters {
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 30px;
  }

  .genre,
  .sort,
  .surprise {
    width: calc(100% - 20px);
    margin-top: 10px;
  }
  .genreButton{
    display: flex;
    flex-direction: row;
    justify-content: ;
  }

  .genreChoice{
    display: inline-block;
  }

  button{
    border-radius: 20px;
    width: 70px;
    height: 30px;
    padding: 1px 6px;
    margin-right: 4px;
    font-size: 12px;
    display: inline-block;
  }

  button#random {
    border-radius: 20px;
    width: 70px;
    height: 32px;
    padding: 1px 6px;
    margin-right: 4px;
    font-size: 10;
  }

  #more{
    border-radius: 20px;
    width: 70px;
    height: 30px;
    padding: 1px 6px;
    margin: 2px;  
    font-size: 12px;
    font-weight: bolder;
    display: inline-block;
  }
  #more1 {
    border-radius: 20px;
    width: 70px;
    height: 32px;
    padding: 1px 6px;
    margin: 2px;  
    font-size: 12px;
    font-weight: bolder;
  }
}


