* {
  box-sizing: border-box;
}

/* General Styles */
.section {
  display: none;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family:
    "Lucida Sans",
    "Lucida Sans Regular",
    "Lucida Grande",
    "Lucida Sans Unicode",
    Geneva,
    Verdana,
    sans-serif;
  background-image:
    linear-gradient(
      to bottom right,
      rgba(199, 165, 102, 0.245),
      rgba(105, 92, 97, 0.268)
    );
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}

/* Nav-Bar */
#navbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 10%;
  flex-wrap: wrap;
  margin: 0;
  border: 2px solid black;
  box-shadow: 0 0 15px rgba(5, 110, 73, 0.876);
}

#bar-header {
  text-align: center;
  margin: 0 auto;
}

#nav-list {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  text-align: center;
  padding: 8px 10px;
}

.nav-link:hover {
  text-shadow: 0 0 10px rgb(0, 64, 255);
}

#list-link {
  position: relative;
}

/* Book counter */

/* --- */
#book-counter {
  display: none;
  position: absolute;
  top: -60%;
  left: -50%;
  font-size: 18px;
  font-weight: bolder;
  line-height: 13px;
  text-shadow: none;
  color: rgb(27, 24, 24);
  background-color: #cef093;
  padding: 10px;
  border: 1px solid rgb(99, 143, 106);
  border-radius: 50%;
}

.highlight-counter {
  animation: show-counter 0.5s ease-out;
}

@keyframes show-counter {
  from {
    transform: translateY(-25%);
  }

  50% {
    box-shadow: 0 0 15px rgb(15, 231, 65);
    color: rgb(5, 255, 201);
  }

  to {
    transform: translateY(10%);
  }
}

#add-new-link {
  border-left: 2px solid black;
  border-right: 2px solid black;
}

/* Date */
#date {
  text-align: right;
  font-weight: bold;
  padding: 20px;
}

/* Section 1 */
#books-header {
  font-size: 45px;
  font-weight: bolder;
  text-align: center;
  margin: 20px 0;
}

#book-list {
  border: 2px solid black;
  overflow: auto;
  max-height: 300px;
}

.book-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background-color: whitesmoke;
  max-width: 750px;
  padding: 15px 30px;
  border-radius: 8px;
  margin: 1.5% auto;
  box-shadow: 0 0 10px rgb(86, 126, 131);
}

.book-info {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.book-info h5 {
  margin: auto 0;
  word-break: break-all;
}

.book-title {
  font-size: 30px;
}

.book-author {
  font-size: 26px;
  font-weight: lighter;
}

button {
  display: block;
  cursor: pointer;
  font-size: 18px;
  padding: 12px;
  border: none;
  border-radius: 5px;
}

.remove-btn {
  background-color: rgb(214, 204, 197);
}

.remove-btn:hover {
  color: white;
  background-color: rgb(232, 181, 145);
}

.remove-btn:active {
  color: initial;
  background-color: rgb(214, 204, 197);
}

/* Section 2 */
form {
  position: relative;
  background-image:
    linear-gradient(
      to bottom right,
      rgba(221, 233, 56, 0.243),
      rgba(197, 77, 233, 0.311)
    );
  padding: 40px;
  margin: 20px auto;
  border-radius: 10px;
}

/* Success Message */
.success-message {
  display: none;
  position: absolute;
  top: -10%;
  left: 0;
  right: 0;
  width: max-content;
  color: #4f8a10;
  background-color: #dff2bfb0;
  font-size: 1.5rem;
  padding: 0.8rem 1.5rem;
  margin: 0 auto;
  border-radius: 5px;
  box-shadow: 0 0 10px rgb(116, 212, 92);
  animation: fadein 0.4s ease-out;
}

@keyframes fadein {
  from {
    transform: rotateX(90deg);
  }

  40% {
    transform: rotateX(0deg);
    transform: scale(1.15);
    box-shadow: none;
  }

  to {
    transform: none;
  }
}

fieldset {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: none;
}

legend {
  text-align: center;
  font-size: 24px;
  font-weight: bolder;
}

input {
  font-size: 18px;
  padding: 10px;
  margin: 8px 0;
  width: 350px;
}

#alert-message {
  display: none;
  text-align: center;
  font-size: 16px;
  font-weight: bolder;
  color: rgb(53, 49, 49);
  background-color: rgb(153, 170, 182);
  padding: 10px;
  border: 4px solid rgb(198, 189, 203);
  border-radius: 5px;
  margin: 10px auto;
  width: 200px;
  box-shadow: 0 0 5px rgb(238, 175, 238);
  transition: all 0.3s;
}

#add-btn {
  font-weight: bold;
  background-color: rgb(97, 215, 148);
  color: white;
  width: 150px;
  margin: 8px 0 8px auto;
  padding: 15px;
  border: transparent;
  transition: all 0.3s;
}

#add-btn:hover {
  box-shadow: 0 0 10px white;
}

#add-btn:active {
  color: initial;
  box-shadow: none;
}

/* Section 3 */
#contact {
  margin: 0 auto;
}

#contact h2 {
  font-size: 30px;
  font-weight: bold;
}

/* Footer */
#foot-header {
  border: 2px solid black;
  padding: 15px;
  margin: 0;
}

/* Toggle Classes */
.show-section {
  display: block;
  animation: appearEffect 0.5s;
}

@keyframes appearEffect {
  from {
    transform: translateX(-150%);
  }

  to {
    transform: none;
  }
}

.highlight-link {
  color: rgb(88, 101, 181);
  text-shadow: 0 0 5px blue;
  font-weight: bold;
  text-decoration: underline solid rgb(46 145 255) 5px;
}

.recent-added {
  box-shadow: 0 0 15px #13e308 inset;
}

.highlight-recent {
  background-color: #dff2bf86;
}
