@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300&family=Staatliches&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 1rem;
  font-family: "Roboto", sans-serif;
  font-weight: bolder;
  color: #a44c24;
}

html {
  background-image: url(images/ma.jpg);
  background-size: cover;
}

h1 {
  text-align: center;
  margin-top: 5rem;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

hr {
  margin: 2rem auto;
  padding: 1.5px;
  width: 30%;
  border-radius: 40%;
  border-width: 2px;
  border-color: rgb(197, 191, 191);
  background-color: rgb(141, 140, 140);
}

nav {
  display: flex;
  justify-content: space-between;
  position: fixed;
  top: 0;
  padding: 0.5rem;
  width: 99%;
  margin: 1rem auto 0;
  border: solid 1px #000;
  background-color: rgb(159, 195, 226);
  align-items: center;
  margin-top: 0.3rem;
}

a {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links > li {
  border-right: 2px solid #000;
  padding-right: 20px;
  font-size: 2rem;
  display: flex;
}

.nav-links > li:last-child {
  border-right: none;
}

/* Date and Time section */
#date {
  text-align: right;
  font-size: 1.3rem;
  padding: 10px;
  color: #fff;
  margin-top: 50px;
}

/* Book Library */

#book-library {
  margin-top: 10em;
}

.book {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1rem;
  gap: 20px;
  max-width: 50%;
  margin: 0 auto;
  justify-content: center;
  align-items: flex-start;
}

.remove {
  align-self: flex-end;
  appearance: none;
  padding: 0.3rem;
  transition-duration: 0.3s;
}

.remove:hover {
  transform: translate(5px, 5px);
  box-shadow: none;
}

.remove:active {
  transform: translate(5px, 5px);
  box-shadow: none;
  background-color: rgb(156, 147, 147);
}

.hide {
  display: none;
  visibility: hidden;
}

#new-book {
  width: 100%;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  padding: 0 2rem;
  gap: 1rem;
  border: none;
  align-items: flex-end;
}

input {
  font-size: 1.2em;
  width: 100%;
  padding: 0.8rem;
}

#add-book {
  width: 30%;
  border-bottom: 6px solid black;
  border-right: 7px solid grey;
  background-color: #6e9ecd;
}

#add-book:active {
  background-color: rgb(156, 147, 147);
}

#all-books {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 3px solid rgb(69, 134, 188);
  width: 80%;
  margin: 0 auto 1rem;
  margin-bottom: 70px;
  text-align: center;
  padding: 0.3rem;
}

#book-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  width: 100%;
  align-items: flex-start;
}

.the-book {
  background-color: #99d4e0;
  padding-right: 1px;
}

.book-details {
  display: grid;
  grid-template-columns: 1.7fr 0.5fr 1.7fr 4fr;
  grid-template-rows: 1fr;
  align-items: center;
  padding: 5px 0 5px 3px;
  background-color: #99d4e0;
  color: black;
}

.book-details p {
  color: black;
  font-size: 1em;
  text-align: left;
}

.infor::first-letter {
  text-transform: uppercase;
}

#add-new-book {
  width: 70%;
  margin: 0 auto;
  margin-bottom: 10em;
  margin-top: 10em;
}

#add-new-book h2 {
  font-size: 1.8em;
  text-align: center;
  font-style: italic;
}

.delete {
  margin-left: 50%;
  width: 40%;
  padding: 7px 0;
  border-bottom: 6px solid black;
  border-right: 6px solid grey;
}

/* Contact Section */

#contact-section {
  width: 70%;
  margin: 0 auto;
  margin-bottom: 10em;
  background-color: #fff;
  background-size: cover;
  padding: 10px;
  margin-top: 10em;
}

.contact-title {
  margin: 0 auto;
  font-size: 1.8em;
  text-align: center;
  margin-bottom: 1.5em;
  width: 60%;
  margin-top: 1em;
}

.contact-text {
  font-size: 1rem;
  text-align: left;
  margin: 0 auto;
  width: 88%;
  margin-bottom: 2rem;
}

.contact-details {
  margin: 0 auto;
  width: 60%;
  margin-bottom: 2em;
}

.footer {
  width: 100%;
  background-color: rgb(159, 195, 226);
  padding: 0.8rem;
  position: fixed;
  bottom: 0;
}

@media screen and (max-width: 768px) {
  #book-library {
    margin-top: 1em;
  }

  #contact-section {
    margin-top: 1em;
  }

  h1 {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 3rem;
    font-size: 1.8rem;
  }

  #all-books {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 3px solid rgb(69, 134, 188);
    width: 90%;
    margin-bottom: 70px;
    text-align: center;
    padding: 0.3rem;
  }

  .book-details {
    grid-template-columns: 1fr 0.5fr 1fr 3fr;
    grid-template-rows: 1fr;
    gap: 5px;
    padding: 5px 0 5px 3px;
    background-color: #99d4e0;
    color: black;
  }

  .book-details p {
    color: black;
    font-size: 1em;
    text-align: left;
  }

  .delete {
    margin-left: 10%;
    width: 80%;
    font-size: 0.8rem;
    padding: 5px 0;
    border-bottom: 6px solid black;
    border-right: 6px solid grey;
  }

  #add-new-book {
    margin-top: 7em;
    width: 95%;
  }

  input {
    font-size: 0.9em;
    padding: 0.6rem;
  }

  #add-book {
    width: 40%;
    border-bottom: 5px solid black;
    border-right: 5px solid grey;
  }

  #add-new-book h2 {
    font-size: 1.5em;
  }
}
