/* -------- General Layout -------- */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fdfcfb;
  color: #333;
  text-align: center;
}

/* -------- Header -------- */
header {
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 1em 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

h1 {
  font-size: 1.8em;
  color: #2f2f2f;
  margin: 0.2em 0;
  letter-spacing: 0.5px;
}

nav {
  margin-top: 0.5em;
}

.nav-btn {
  display: inline-block;
  margin: 0 0.4em;
  padding: 0.45em 1em;
  background-color: #e0e7ff;
  border-radius: 20px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.nav-btn:hover {
  background-color: #c7d2fe;
}

/* -------- Intro Section -------- */
.intro {
  margin: 2em auto;
  max-width: 800px;
  line-height: 1.6;
}

.intro h2 {
  font-size: 1.6em;
  color: #333;
}

.subtext {
  font-size: 0.95em;
  color: #555;
  margin-top: 0.5em;
}

/* -------- Book Gallery -------- */
.book-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5em;
  padding: 2em;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.book-item {
  width: 160px;
  text-align: center;
}

.book-item img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.book-source {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.4em;
}

/* -------- Footer -------- */
footer {
  background-color: #fff;
  border-top: 1px solid #eee;
  padding: 1.2em 0;
  font-size: 0.85em;
  color: #666;
  margin-top: 2em;
}

/* -------- Responsive Tweaks -------- */
@media (max-width: 600px) {
  h1 {
    font-size: 1.5em;
  }

  .book-item {
    width: 130px;
  }

  .book-item img {
    max-height: 200px;
  }
}
