/* ================= Global Reset ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ================= Navbar / Header ================= */
.header-center {
  background: #1e1e1e;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding: 15px 20px;
  background-color: #b22222;
  border-radius: 0 0 10px 10px;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.navbar a:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 180px;
  top: 120%;
  left: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  border-radius: 6px;
  z-index: 100;
}

.dropdown-content a {
  display: block;
  padding: 10px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}

.dropdown-content a:hover {
  background: #f2f2f2;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ================= Search Bar ================= */
.search-input {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  outline: none;
  width: 220px;
  max-width: 100%;
  font-size: 14px;
}

/* ================= Section Headings ================= */
.section-heading {
  text-align: center;
  margin: 20px auto 10px;
  font-size: 26px;
  color: #000000;
}

#loading-message {
  margin-top: 10px;
}

/* ================= Books Grid ================= */
.book-section {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 20px;
  padding: 20px;
  justify-items: center;
}

.book-card {
  width: 100%;
  max-width: 180px;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e0d4c5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-5px);
}

.book-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}

.book-card h3 {
  font-size: 15px;
  font-weight: bold;
  margin: 6px 0 4px;
  color: #111;
}

.book-card p {
  font-size: 14px;
  color: #090909;
}

/* ================= Footer ================= */
.footer {
  background-color: #1e1e1e;
  color: #f1f1f1;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: auto;
}

.footer h2,
.footer h3,
.footer h4 {
  color: #ffffff;
  margin-bottom: 15px;
}

.footer p {
  font-size: 14px;
  line-height: 1.6;
  color: #dddddd;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin: 8px 0;
}

.footer-section ul li a {
  color: #cfc614;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #ff6347;
}

/* Social Icons */
.social-icons {
  margin-top: 15px;
  display: flex;
  gap: 15px;
}

.social-icons a img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.social-icons a img:hover {
  transform: scale(1.1);
}

/* ================= Responsive ================= */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 0.8rem;
  }

  .search-input {
    width: 100%;
  }

  .footer {
    grid-template-columns: 1fr 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .book-section {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
  }

  .book-card {
    max-width: 150px;
    padding: 6px;
  }

  .book-card img {
    height: 150px;
  }

  .book-card h3 {
    font-size: 14px;
  }

  .book-card p {
    font-size: 13px;
  }

  .footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }
}
