/* Book Search Container */
.book-search-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 40px auto;
  padding: 20px;
  max-width: 800px;
  background: linear-gradient(135deg, #1c1c1c, #2e2e2e);
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
  font-family: 'Eagle Lake', serif;
  flex-wrap: wrap;
}

.search-label {
  color: #ffd700;
  font-size: 1.2em;
  white-space: nowrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 12px;
  font-size: 1em;
  border: 2px solid #ffd700;
  border-radius: 8px;
  background-color: #111;
  color: #fff;
}

/* Search Results */
.search-results {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #222;
  border-radius: 10px;
  color: #fff;
  font-family: 'Eagle Lake', serif;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* Book Grid */
.book-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  margin: 50px auto;
  max-width: 1400px;
  padding: 20px;
}

/* Book Card */
.book-card {
  background: linear-gradient(135deg, #1c1c1c, #2e2e2e);
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 20px;
  width: 360px;
  max-width: 100%;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
  color: #fff;
  font-family: 'Eagle Lake', serif;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.book-cover {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.book-title {
  color: #ffd700;
  font-size: 1.3em;
  margin-bottom: 10px;
}

.book-genre {
  font-style: italic;
  color: #ffcc66;
  margin-bottom: 10px;
}

.book-description {
  font-size: 0.95em;
  line-height: 1.4;
  color: #eee;
}

.book-summary {
  margin-top: 10px;
  font-size: 1em;
  color: #f5f5f5;
  line-height: 1.5;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

/* Animated Header Text */
main p {
  text-align: center;
  font-size: 2em;
  color: goldenrod;
  margin: 20px 0;
  letter-spacing: 0.5px;
  line-height: 1.6;
  font-family: 'Eagle Lake', serif;
  text-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
  -webkit-text-stroke: 2px #000;
  text-stroke: 2px #000;
  animation: pop-electric 1s cubic-bezier(0.23, 1.02, 0.36, 1.01) both;
  opacity: 0;
  transform: scale(0.8);
}

main p.visible {
  opacity: 1;
  transform: scale(1);
  animation: pop-electric 0.8s cubic-bezier(0.23, 1.02, 0.36, 1.01) both;
}

@keyframes pop-electric {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-2deg);
    filter: drop-shadow(0 0 0px #ffd700) drop-shadow(0 0 0px #fff);
  }
  60% {
    opacity: 1;
    transform: scale(1.08) rotate(2deg);
    filter: drop-shadow(0 0 16px #ffd700) drop-shadow(0 0 8px #fff);
  }
  80% {
    transform: scale(0.96) rotate(-1deg);
    filter: drop-shadow(0 0 8px #ffd700) drop-shadow(0 0 4px #fff);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 4px #ffd700) drop-shadow(0 0 2px #fff);
  }
}

/* 📱 Mobile Responsiveness */
@media (max-width: 768px) {
  .book-search-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-label {
    font-size: 1em;
    text-align: center;
  }

  .search-input {
    font-size: 0.95em;
    padding: 10px;
  }

  .book-grid {
    gap: 20px;
    padding: 10px;
  }

  .book-card {
    width: 100%;
    padding: 15px;
  }

  .book-title {
    font-size: 1.2em;
  }

  .book-description,
  .book-summary {
    font-size: 0.95em;
  }

  main p {
    font-size: 1.6em;
  }
}

@media (max-width: 480px) {
  .search-label {
    font-size: 0.95em;
  }

  .search-input {
    font-size: 0.9em;
    padding: 8px;
  }

  .book-title {
    font-size: 1.1em;
  }

  .book-description,
  .book-summary {
    font-size: 0.9em;
  }

  main p {
    font-size: 1.4em;
  }
}
