/* General reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
}

.app {
  width: 100%;
  max-width: 1000px;
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.search-box input {
  width: 60%;
  padding: 12px 15px;
  font-size: 1rem;
  border: none;
  border-radius: 25px 0 0 25px;
  outline: none;
}

.search-box button {
  padding: 12px 20px;
  background: #ffdd57;
  border: none;
  border-radius: 0 25px 25px 0;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.3s;
}

.search-box button:hover {
  background: #ffc107;
}

/* Results grid */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.book-card {
  background: #fff;
  color: #333;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  transition: transform 0.2s ease-in-out;
}

.book-card:hover {
  transform: translateY(-8px);
}

.book-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.book-card h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.book-card p {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #555;
}

.book-card a {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: #2575fc;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.3s;
}

.book-card a:hover {
  background: #6a11cb;
}
