/* Import Google Font Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styling */
body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  padding: 20px;
  background-color: #F9F9F9;
  color: #333;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2.5em;
  color: #007BFF;
}

/* Dropdown Select */
#genre-select {
  display: block;
  width: 250px;
  margin: 20px auto;
  padding: 12px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  border-radius: 10px;
  border: 2px solid #333;
  background-color: #fff;
  color: #333;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23007BFF" height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-position: right 10px center;
  background-size: 12px;
  background-repeat: no-repeat;
}

/* Hover effect */
#genre-select:hover {
  border-color: #00aaff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Focus (when the user clicks on the dropdown) */
#genre-select:focus {
  outline: none;
  border-color: #007BFF;
  box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4);
}

/* Adjust dropdown arrow styling */
#genre-select {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

#random-book-button,
#sort-high-to-low-button,
#sort-low-to-high-button {
  display: block;
  width: 250px;
  margin: 20px auto;
  padding: 12px;
  font-size: 16px;
  font-family: 'Poppins', sans-serif; /* Example new font */
  border-radius: 10px;
  border: 2px solid #333;
  background-color: #fff;
  color: #333;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#random-book-button:hover,
#sort-high-to-low-button:hover,
#sort-low-to-high-button:hover {
  border-color: #00aaff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Additional styles for minimalistic happy palette */
body {
  background-color: #fafafa; /* Light background */
}

#book-list li {
  border-color: #00aaff;
}

#book-list li:hover {
  border-color: #ff6347; /* Hover border change */
  transform: translateY(-10px);
}

/* Container for book list */
#book-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  list-style: none;
}

/* Book Item Styling */
#book-list li {
  background-color: white;
  border: 1px solid #E5E5E5;
  padding: 15px;
  border-radius: 12px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#book-list li:hover {
  transform: translateY(-10px);
  border-color: #007BFF;
  box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4);
}

#book-list img {
  width: 80%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

#book-list h3 {
  font-size: 18px;
  margin-top: 10px;
}

#book-list p {
  margin: 4px 0;
}

/* Responsive Media Queries */
@media (max-width: 600px) {
  h1 {
    font-size: 24px;
  }

  #book-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  #book-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  #book-list img {
    height: 200px;
  }
}

@media (min-width: 1025px) {
  #book-list {
    grid-template-columns: repeat(4, 1fr);
  }

  #book-list img {
    height: 300px;
  }
}