.api-indicator {
  position: absolute;
  background: #f9ab45;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  right: 6px;
}

.amazon-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.amazon-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: middle;
  border: .15em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border .75s linear infinite;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.book {
  background: url(/img/book-paper.png);
  background-size: 100% 100%;
  perspective: 1000px;
  width: 175px;
  height: 255px;
  border-radius: 4px;
}

.book img {
  width: 175px;
  height: 255px;
  transition: 1s cubic-bezier(0.25, 1, 0.5, 1);
  transform: rotate(0);
  transform-origin: left;
  border-radius: 4px;
  filter: drop-shadow(0px 20px 13px rgba(27, 37, 58, 0.1)) drop-shadow(0px 8px 5px rgba(27, 37, 58, 0.06));

}

.book:before {
  content: "";
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(255, 255, 255, 0.4) 100%);
  width: 2px;
  margin-left: 8px;
  height: 100%;
  display: block;
  position: absolute;
  z-index: 2;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  ;
}

.book:hover img {
  transition: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  transform: rotateY(-40deg);
  filter: drop-shadow(0px 100px 87px rgba(23, 35, 67, 0.07)) drop-shadow(0px 41.7776px 36.3465px rgba(23, 35, 67, 0.0503198)) drop-shadow(0px 22.3363px 19.4326px rgba(23, 35, 67, 0.0417275)) drop-shadow(0px 12.5216px 10.8938px rgba(23, 35, 67, 0.035)) drop-shadow(0px 6.6501px 5.78559px rgba(23, 35, 67, 0.0282725)) drop-shadow(0px 2.76726px 2.40751px rgba(23, 35, 67, 0.0196802));
  pointer-events: none;
}

.book:hover:before {
  margin-left: 6px;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.btn-top50 {
  position: relative;
  display: inline-block;
  padding: 12px 28px !important;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff7043, #ff5722);
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: 1px solid rgba(255, 87, 34, 0.2);
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.15);
}

.btn-top50::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff5722, #f4511e);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.btn-top50-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.btn-top50-text {
  transition: transform 0.3s ease;
}

.btn-top50-icon {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.btn-top50:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 87, 34, 0.25);
  color: #fff !important;
  text-decoration: none;
}

.btn-top50:hover::before {
  opacity: 1;
}

.btn-top50:hover .btn-top50-text {
  transform: translateX(-4px);
}

.btn-top50:hover .btn-top50-icon {
  transform: translateX(4px);
}

.btn-top50::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.3) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(30deg);
  transition: transform 0.6s ease;
  z-index: 1;
}

.btn-top50:hover::after {
  transform: rotate(30deg) translate(50%, 50%);
}

.btn-top50-green {
  position: relative;
  display: inline-block;
  padding: 12px 28px !important;
  border-radius: 12px;
  background: linear-gradient(135deg, #24b04f, #1e8e43);
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: 1px solid rgba(36, 176, 79, 0.2);
  box-shadow: 0 2px 8px rgba(36, 176, 79, 0.15);
}

.btn-top50-green::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e8e43, #19763a);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.btn-top50-green-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.btn-top50-green-text,
.btn-top50-green-icon {
  transition: transform 0.3s ease;
}

.btn-top50-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(36, 176, 79, 0.25);
  color: #fff !important;
  text-decoration: none;
}

.btn-top50-green:hover::before {
  opacity: 1;
}

.btn-top50-green:hover .btn-top50-green-text {
  transform: translateX(-4px);
}

.btn-top50-green:hover .btn-top50-green-icon {
  transform: translateX(4px);
}

.btn-top50-green::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.3) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(30deg);
  transition: transform 0.6s ease;
  z-index: 1;
}

.btn-top50-green:hover::after {
  transform: rotate(30deg) translate(50%, 50%);
}


.book-title-hover {
  display: flex;
  align-items: center;
}

.book-title-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  max-width: 122px;
  margin-left: 8px;
}

.book-item.book-locked:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
  border-radius: 8px 8px 0 0;
}

.book-item.book-locked .lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: url('/img/icon-lock-item.svg') no-repeat center center;
  background-size: 50px;
  width: 50px;
  height: 67px;
  z-index: 3;
  cursor: pointer;
  /* Permite interação no cadeado */
}

.book-item.book-locked .lock-icon.shake {
  animation: shake 0.5s ease-in-out;
}

.book-item.book-locked @keyframes shake {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  25% {
    transform: translate(-50%, -50%) rotate(-20deg);
  }

  50% {
    transform: translate(-50%, -50%) rotate(20deg);
  }

  75% {
    transform: translate(-50%, -50%) rotate(-10deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
}

.btn-amazon {
  margin: 0px auto;
  background: #FFF;
  border: none;
  padding: 0;
  margin-top: auto;
  cursor: pointer;
  padding: 7px 2.1em;
  display: block;
  margin-bottom: 5px;
  margin-bottom: 5px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease-out;
  text-align: center;
}

.btn-amazon img {
  display: block;
  max-width: 72px;
  width: auto;
  height: auto;
  margin: 0 auto;
  position: relative;
  top: 2px;
}

.btn-amazon:hover {
  background-color: #ffac5857;
}

.btn-amazon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
  transition: left 0.6s;
}

.btn-amazon:hover::before {
  left: 100%;
}

.btn-amazon:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 153, 0, 0.3);
}

.book-cover-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f6faff;
  padding-top: 1em;
  padding-bottom: 3em;
}

.book-cover {
  max-width: 100%;
  border-radius: 7px;
  min-height: 197px;
  max-height: 197px;
}

.book-info {
  padding: 10px;
  text-align: center;
  position: absolute;
  bottom: 0;
  width: 100%;
}

.book-title {
  margin: 0;
  color: #004271;
  font-size: 15px;
  line-height: 20px;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-author {
  font-size: 12px;
  color: #666;
  margin: 5px 0 0 0;
}

.book-rank::before {
  content: '#';
  font-size: 0.9em;
  opacity: 0.8;
}

.book-hover-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  padding: 5px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 4em;
  padding-bottom: 3em;
  z-index: 3;
}

.book-hover-info::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: -1;
}

.book-item:hover .book-hover-info {
  display: flex;
}

.book-hover-info p,
.book-hover-info ul {
  margin: 0;
  padding: 10px;
  list-style: none;
  font-size: 13px;
  line-height: 1.6;
  color: #ffffff;
}


.book_card_front:hover {
  cursor: pointer;
}

.book__flip-container.flipped .flipped .wrapper-spiner-center .spinner-border {
  width: 7rem !important;
  height: 7rem !important;
}

.list-group-item-action:hover {
  cursor: pointer;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 20px;
}

.book-item {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 1px 9px 16px -9px #75c6ff47;
  transition: transform 0.3s;
  border: 1px solid #EAEAEA;
  min-height: 350px;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.book-hover-info ul li {
  margin-bottom: 5px;
}

.bt-level-group {
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 8px;
  padding: 0;
  margin: 2px 0;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}

/* Brilho dinâmico genérico */
.bt-level-group::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 25%,
      rgba(255, 255, 255, 0.15) 50%,
      transparent 75%);
  animation: shine 4s infinite;
  pointer-events: none;
  opacity: 0.5;
}

/* Brilho colorido específico */
.bt-level-group::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 25%,
      var(--glow-color) 50%,
      transparent 75%);
  animation: shine 6s infinite;
  pointer-events: none;
  opacity: 0.3;
}

.bg-grades1 {
  background: linear-gradient(45deg, #3B82F6, #2563EB);
}

.bg-grades2 {
  background: linear-gradient(45deg, #F97316, #EA580C);
}

.bg-grades3 {
  background: linear-gradient(45deg, #10B981, #059669);
}

.book-grid:has(.loading-container) {
  display: block;
  /* Muda para block apenas quando tem loading */
}

.card-search-book-list {
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
}

.color-white {
  color: #FFF !important;
}

.card-search-book-list li {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-search-book-icon {
  color: #007bff;
}

.copy-title-btn,
.copy-title-btn:hover,
.copy-title-btn:active {
  color: #FFF;
  border: 1px solid #eaeaea7d;
}

.emoji {
  font-size: 1.6em;
  filter: drop-shadow(0 0 8px currentColor);
  animation: float 3s ease-in-out infinite;
  position: relative;
  left: 2px;
  top: 2px;
}

.emoji-wrapper {
  margin-right: 6px;
  font-size: 1.1rem;
  display: inline-block;
  position: relative;
  z-index: 2;
  padding: 4px;
  margin-right: 8px;
  display: inline-block;
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.emoji-wrapper::before {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  background: white;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

.filter-pill {
  border: none;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.2s ease;
  opacity: 1;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
}

.filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-pill.active {
  opacity: 1 !important;
}

.filter-pill:not(.active) {
  opacity: 0.6;
}

.fixed-amazon-button a {
  border: 2px solid #059669;
  border-radius: 21px;
  margin-top: 4px;
}


.form-label {
  font-size: 16px;
}

.fixed-amazon-button {
  background: #FFF
}

.featured-item {
  position: relative;
  border: 2px solid #FFD700;
  background: linear-gradient(145deg,
      rgba(255, 215, 0, 0.1) 0%,
      rgba(255, 255, 255, 1) 50%);
  border-radius: 16px;
  overflow: hidden;
}

.featured-item::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: linear-gradient(to bottom right,
      transparent 30%,
      rgba(255, 215, 0, 0.1) 50%,
      transparent 70%);
  animation: shine 3s infinite;
  transform: rotate(30deg);
  z-index: 1;
  pointer-events: none;
}

.fixed-amazon-button a {
  border: 2px solid #059669;
  border-radius: 21px;
  margin-top: 4px;
}

.featured-banner {
  position: absolute;
  top: 220px;
  right: -10px;
  background: #FFD700;
  color: #000;
  padding: 5px 15px;
  border-radius: 3px;
  font-weight: bold;
  transform: rotate(3deg);
  box-shadow:
    0 0 15px rgba(255, 215, 0, 0.6),
    0 0 30px rgba(255, 215, 0, 0.4),
    0 0 45px rgba(255, 215, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1;
  animation: glow-animation 1.5s ease-in-out infinite alternate;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.filter-pill {
  border: none;
  padding: 0;
  background: transparent;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.pill-bubble:hover .emoji-wrapper {
  transform: rotate(15deg) scale(1.1);
}

.pill-bubble:hover .emoji-wrapper::before {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pill-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.9rem;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(30deg);
  }

  100% {
    transform: translateX(100%) rotate(30deg);
  }
}

/* keyframes do bootstrap */
@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}


@keyframes glow-animation {
  0% {
    box-shadow:
      0 0 10px rgba(255, 215, 0, 0.6),
      0 0 20px rgba(255, 215, 0, 0.4),
      0 0 30px rgba(255, 215, 0, 0.2),
      0 2px 4px rgba(0, 0, 0, 0.2);
  }

  100% {
    box-shadow:
      0 0 20px rgba(255, 215, 0, 0.8),
      0 0 40px rgba(255, 215, 0, 0.6),
      0 0 60px rgba(255, 215, 0, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.2);
  }
}

@keyframes shine {
  0% {
    transform: translateX(-150%) rotate(45deg);
  }

  100% {
    transform: translateX(150%) rotate(45deg);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

/* GRADE FILTERS COMPACTOS */
.grade-filters .pill-bubble {
  padding: 6px 12px;
  font-size: 0.9em;
}

.grade-filters {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.pill-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 25px;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  color: white;
  cursor: pointer;
}

/* --- Efeito Hover Corrigido --- */
.pill-bubble:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 20px -5px rgba(0, 0, 0, 0.2),
    0 0 0 2px rgba(255, 255, 255, 0.15) inset;
}

/* --- Efeito de Brilho Dinâmico --- */
.pill-bubble::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.2) 50%,
      rgba(255, 255, 255, 0) 100%);
  transition: left 0.6s ease;
}

.pill-bubble:hover::after {
  left: 150%;
}

/* --- Animação de Gradiente --- */
.pill-bubble {
  background-size: 200% auto;
}

.pill-bubble:hover {
  background-position: right center;
}

.loading-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
  min-height: 200px;
}

.loading-container .spinner-border {
  width: 3rem;
  height: 3rem;
}

.loading-container p {
  font-size: 1.1rem;
  max-width: 400px;
  text-align: center;
}

.list-group-item {
  font-size: 15px;
}

.two-colums li {
  gap: 3px;
}

/* Grid items */
.wrapper-book-item-and-amazon {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.s-badge {
  position: absolute;
  top: 6px;
  left: 5px;
  background-color: #ff9800;
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  z-index: 5 !important;
}

/* 1) Brilho atravessando o botão via wrapper hover */
.wrapper-book-item-and-amazon:hover .btn-amazon::before {
  left: 100%;
}

/* 2) Flutuação + sombra via wrapper hover */
.wrapper-book-item-and-amazon:hover .btn-amazon {
  box-shadow: 0 5px 15px rgba(255, 153, 0, 0.3);
  transform: translateY(-8px);
  background-color: #ffac58;
  border-color: #e18d38;
}

.wrapper-book-item-and-amazon .book-item,
.wrapper-book-item-and-amazon .fixed-amazon-button {
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.wrapper-book-item-and-amazon:hover .book-item,
.wrapper-book-item-and-amazon:hover .fixed-amazon-button {
  transform: scale(1.05);
}


.wrapper-book-item-and-amazon:hover .btn-amazon {
  transform: translateY(-8px);
  background-color: #ffac58;
  border-color: #e18d38;
}

@media (max-width: 1000px) {
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

}