@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap');

body {
  font-family: 'Montserrat', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-image: url(backgound1.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 15px 20px; /* Reduced top and bottom padding */
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 3%;
}

h1 {
  text-align: center;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 30px;
}

.search-bar {
  display: flex;
  margin-bottom: 20px;
}

#search-input {
  border: 1px solid #dedede;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  font-size: 14px;
  padding: 5px 20px;
  transform: translateX(2.5cm);
}

#search-button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  background-color: #864c04;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  margin-left: 100px; /* Added margin for better separation */
}

#search-button:hover {
  background-color: #2d1804;
}

#book-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Display three columns */
  grid-gap: 20px;
}

.book {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 10px;
  align-items: center;
  padding: 10px;
  background-color: #d6c489a8;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.book:hover {
  background-color: #eee;
}

.book img {
  width: 100%;
  max-width: 120px;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
}

.book-details {
  display: none;
  grid-column: span 2;
}

.book-title {
  font-size: 18px;
  font-weight: 700;
  color: #b19704;
}

.book-author {
  font-size: 14px;
  color: #777;
}

.book-description {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

.no-results {
  text-align: center;
  color: #444444;
}

.basket {
  position: fixed;
  top: 50px;
  right: 50px;
  font-size: 24px;
  color: #4f2f08;
  cursor: pointer;
}

.basket:hover {
  color: #2d1804;
}

.saved-books {
  position: fixed;
  top: 150px;
  right: 50px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 20px;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.saved-books-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.saved-book {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.saved-book img {
  width: 50px;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
}

.saved-book-details {
  margin-left: 10px;
}

.saved-book-title {
  font-size: 14px;
  color: #2f2f2f;
  font-weight: 700;
}

.saved-book-author {
  font-size: 12px;
  color: #777;
}
.delete-button {
  font-size: 16px;
  color: #f00;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 5px;
}

.delete-button:hover {
  color: #d00;
}
.book {
  /* ...existing styles... */
  position: relative; /* Added positioning for the heart symbol */
}

.save-button {
  /* ...existing styles... */
  position: absolute;
  top: 8px;
  right: 113px;
  background: none;
  border: none;
  cursor: pointer;
  color: #f00;
  font-size: 18px;
  transition: color 0.3s ease;
}

.save-button:hover {
  color: rgb(80, 15, 15);
}

.description-window {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.description-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.description-content {
  background-color: #969696;
  padding: 20px;
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

.description-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #b19704;
}

.description-author {
  font-size: 14px;
  color: #531e1e;
}

.description-text {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

.description-text a {
  color: #0645ad;
  text-decoration: none;
}
