.library-title {
  color: var(--brown-dark);
  position: relative;
}

.library-search .form-control {
  border: 1px solid rgba(74, 44, 15, 0.1) !important;
  background-color: var(--cream);
  transition: all 0.3s ease;
  padding: 0.6rem 1rem;
  font-size: 1rem;
}

.library-search .form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.book-list-page #bookSearchForm,
.book-list-page #bookSearchForm .row,
.book-list-page #bookSearchForm .dropdown {
  overflow: visible;
}

.book-list-page #tagFilterMenu {
  z-index: 1080;
  max-height: 280px;
  overflow-y: auto;
}

.book-list-page #tagFilterMenu.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  display: block !important;
}

.book-list-page .book-search-suggestions {
  inset: auto 0 auto 0;
  margin-top: 0.35rem;
  max-height: 320px;
  overflow-y: auto;
  z-index: 1085;
  border-radius: 1rem;
  border: 1px solid rgba(74, 44, 15, 0.12);
  background: var(--cream);
}

.book-list-page .book-search-suggestions.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  display: block !important;
}

.book-list-page .book-search-suggestion-group + .book-search-suggestion-group {
  border-top: 1px solid rgba(74, 44, 15, 0.08);
}

.book-list-page .book-search-suggestion-heading {
  padding: 0.65rem 1rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brown-light);
}

.book-list-page .book-search-suggestion-item {
  padding: 0.55rem 1rem;
  color: var(--brown-dark);
}

.book-list-page .book-search-suggestion-item:hover,
.book-list-page .book-search-suggestion-item.active {
  background: rgba(212, 175, 55, 0.14);
  color: var(--emerald-dark);
}

body[data-theme='dark'] .book-list-page .book-search-suggestion-heading {
  color: #d6e3ee;
}

body[data-theme='dark'] .book-list-page .book-search-suggestion-item {
  color: #eef6ff;
}

body[data-theme='dark'] .book-list-page .book-search-suggestion-item:hover,
body[data-theme='dark'] .book-list-page .book-search-suggestion-item.active {
  color: #ffffff;
  background: rgba(111, 215, 178, 0.22);
}

.book-list-page .book-rating-filter {
  min-height: 38px;
}

.book-list-page .rating-filter-star-btn,
.book-list-page .rating-filter-clear-btn {
  border-radius: 999px;
}

.book-list-page .rating-filter-star-btn i {
  margin-right: 0.05rem;
}

.input-group-lg {
  max-width: 100%;
}

.library-badge {
  background-color: var(--cream) !important;
  color: var(--brown-dark) !important;
  border: 1px solid rgba(74, 44, 15, 0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

body[data-theme='dark'] .library-badge {
  color: #ffffff !important;
}

.library-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.small-badge {
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--cream) !important;
  color: var(--brown-medium) !important;
  border: 1px solid rgba(74, 44, 15, 0.1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: inline-block;
  margin-top: 0.5rem;
}

.library-book-card {
  border-radius: 0.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--cream);
  border: 1px solid rgba(74, 44, 15, 0.1) !important;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}

.library-book-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.library-book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12) !important;
}

.library-book-card:hover::after {
  opacity: 1;
}

.book-cover {
  transition: all 0.4s ease;
  width: 100%;
  background-color: rgba(74, 44, 15, 0.06);
}

.book-cover.is-loading {
  filter: blur(2px);
  transform: scale(1.015);
}

.library-book-card:hover .book-cover {
  transform: scale(1.05);
}

.book-title {
  color: var(--brown-dark);
  transition: all 0.3s ease;
}

.library-book-card:hover .book-title {
  color: var(--emerald);
}

.book-author {
  color: var(--brown-medium);
}

.checkout-badge {
  background-color: var(--red-accent) !important;
  border: 2px solid var(--cream);
  box-shadow: 0 2px 8px rgba(139, 46, 46, 0.3);
}

.isbn-badge {
  background-color: rgba(212, 175, 55, 0.1) !important;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.library-action-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.library-action-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.library-action-btn:hover::after {
  animation: ripple 1s ease-out;
}

.library-pagination {
  margin: 2rem 0;
}

.library-pagination .page-item {
  margin: 0 0.15rem;
}

.library-page-link {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: var(--brown-dark);
  background-color: var(--cream);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  border-radius: 0.25rem;
  margin: 0 2px;
}

.library-page-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.library-page-link:hover {
  transform: translateY(-2px);
  background-color: var(--cream);
  color: var(--emerald);
  border-color: transparent;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.library-page-link:hover::after {
  transform: scaleX(1);
}

.library-page-link.active-page {
  background: linear-gradient(to bottom right, var(--emerald), var(--emerald-light)) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 8px rgba(18, 113, 81, 0.25) !important;
  animation: pulse 2s infinite;
}

.library-page-link.active-page::after {
  background: var(--gold);
  transform: scaleX(1);
}

.pagination-md .library-page-link {
  width: 35px;
  height: 35px;
  font-size: 0.85rem;
}

.pagination-lg .library-page-link {
  width: 45px;
  height: 45px;
  font-size: 1rem;
  font-weight: 500;
}

.pagination-md .page-link {
  width: 35px;
  height: 35px;
  font-size: 0.9rem;
}

.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--cream);
  color: var(--emerald);
  border: 2px solid var(--gold);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top-btn:hover {
  background-color: var(--gold-light);
  color: var(--brown-dark);
  transform: translateY(0) scale(1.05);
}

.back-to-top-btn.show {
  opacity: 0.85;
  transform: translateY(0);
}

.back-to-top-btn i {
  font-size: 1.2rem;
}

.book-cover-wrapper-fixed {
  height: 260px;
}

.tags-container-limited {
  max-height: 80px;
}

.tag-color-dynamic {
  color: var(--brown-dark);
}

.book-list-page .tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(63, 42, 24, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-list-page .tag-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 18px rgba(63, 42, 24, 0.08);
}

.book-list-page .tag-pill-compact {
  max-width: 100%;
}

.book-list-page .tag-pill-icon {
  font-size: 0.68rem;
  opacity: 0.9;
}

.book-list-page .tag-pill-label {
  white-space: nowrap;
}

.book-list-page a.is-loading-nav {
  pointer-events: none;
  opacity: 0.88;
}

.book-list-page .spinner-border-sm {
  width: 0.85rem;
  height: 0.85rem;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.back-to-top-btn.show:hover i {
  animation: float 1s ease-in-out infinite;
}
