:root {
  --primary: #3b82f6;
  --secondary: #60a5fa;
  --accent: #10b981;
  --highlight: #fbbf24;
  --text-dark: #384e6c;
  --text-light: #f9fafb;
  --bg-light: #f3f4f6;
  --bg-dark: #111827;
  --radius: 18px;
  --transition: 0.3s ease;
}


body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  transition: var(--transition);
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- BOOK HERO ---------- */

.book-hero {
  position: relative;
  height: 70vh;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
}


.book-hero-bg {
  position: absolute;
  inset: 0;
  background: url('./Asset/Background.webp') center / cover no-repeat;
  z-index: 0;
}

.book-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(0,0,0,0.55),
    rgba(0,0,0,0.7)
  );
  z-index: 1;
}


/* Overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(0,0,0,0.55),
    rgba(0,0,0,0.7)
  );
  z-index: 1;
}

/* HERO CONTENT FIX */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

 
  margin-top: 60px;
}

/* TEXT ALIGNMENT */
.hero-content h1,
.hero-content h2,
.hero-content p {
  text-align: center;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
  padding: 0 24px;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-content h1 {
  
  margin-bottom: 14px;
}

.hero-content h2 {
  
  margin-bottom: 18px;
  opacity: 0.95;
}

.hero-content p {
  max-width: 680px;
  line-height: 1.65;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-content .cta-btn {
  margin: 6px;
}

@media (max-width: 768px) {
  .hero-content {
    margin-top: 80px;
  }

  .hero-content p {
    font-size: 0.95rem;
  }
}
/* ---------- BOOK GRID ---------- */

.book-card {
  transition: 0.3s;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.book-card img {
  height: 220px;
  object-fit: cover;
}

/* ---------------- Sidebar ---------------- */

.filter-title {
  cursor: pointer;
  user-select: none;
  margin-bottom: 5px;
}

.filter-title::after {
  content: " ▼";
  float: right;
  transition: transform 0.2s;
}

.filter-group.collapsed .filter-title::after {
  transform: rotate(-90deg);
}



.filter-group.collapsed div {
  max-height: 0;
  overflow: hidden;
}

.filter-group div {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Sidebar hidden on mobile */
#sidebarFilters {
  background: #f9f9f9;
  padding: 15px;
  border-right: 1px solid #ddd;
  height: 100%;
  position: sticky;
  top: 90px;
  transition: all 0.3s ease;
}

/* ---------------- Book Grid ---------------- */
.book-item {
  transition: transform 0.3s, opacity 0.3s;
}

.book-show {
  transform: scale(1);
  opacity: 1;
}

.book-hide {
  transform: scale(0.95);
  opacity: 0;
}

/* ---------- FAVORITE BUTTON ---------- */
.fav-btn {
  font-size: 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.3s, transform 0.2s;
  color: gray;
  /* default unfilled color */
}

.fav-btn.active {
  color: red;
  /* filled color */
  transform: scale(1.3);
  /* slight pop animation */
}


/* ---------- STAR RATING ---------- */

.rating span {
  font-size: 18px;
  cursor: pointer;
  color: #ccc;
}

.rating span.active {
  color: gold;
}

/* ---------- IQIYI STYLE TRENDING ---------- */
.trending-book {
  transition: 0.3s;
  cursor: pointer;
}

.trending-book img {
  border-radius: 10px;
  width: 100%;
  height: auto;
}

.trending-book:hover {
  transform: scale(1.05);
}


/* ---------- MODAL ---------- */

.modal-body iframe {
  border-radius: 8px;
  border: none;
}

/* ---------- SEARCH ---------- */

#searchBooks {
  border-radius: 30px;
  padding: 12px 20px;
}

/* ---------- MOBILE OPTIMIZATION ---------- */

@media (max-width:768px) {

  .book-card img {
    height: 180px;
  }

  .trending-book {
    min-width: 140px;
  }

}

.container {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.sidebar,
#sidebarFilters {
  width: 260px;
  flex-shrink: 0;
}


.books-area {
  flex: 1;
}

#booksGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.footer {
  background: #111827;
  color: var(--text-light);
  padding: 60px 20px 20px 20px;
  font-size: 14px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-left,
.footer-center,
.footer-right {
  flex: 1;
  min-width: 220px;
}

.footer-logo {
  width: 120px;
  margin-bottom: 15px;
}

.footer-center ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-center ul li {
  margin-bottom: 8px;
}

.footer-center ul li a,
.footer-right a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-center ul li a:hover,
.footer-right a:hover {
  color: var(--accent);
}

.footer-right .social-icons {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.footer-right .social-icons a {
  color: var(--text-light);
  font-size: 18px;
  transition: color 0.3s;
}

.footer-right .social-icons a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-right .social-icons {
    justify-content: center;
  }
}


@media (max-width:768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    margin-top: 10px;
  }

  .nav-links {
    display: none;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
    margin-top: 64px;
  }

  .nav-links.active a {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
  }

  .hamburger {
    display: block;
    align-self: flex-end;
  }

  .nav-actions {
    position: absolute;
    right: 16px;
    top: 12px;
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    align-items: center;
  }
}

@media (max-width:768px) {

  .container {
    flex-direction: column;
  }

  #sidebarFilters {
    width: 100%;
  }

}