/* Estilos para a página da Biblioteca */

/* Container principal */
.biblioteca-container {
  max-width: 120rem;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Cabeçalho da biblioteca */
.biblioteca-header {
  margin-bottom: 4rem;
  text-align: center;
}

.biblioteca-header .heading-primary {
  font-size: 3.2rem;
  margin-bottom: 2rem;
  color: #004d88;
}

/* Tabs para filtros */
.tabs-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  gap: 1rem;
}

.tab-button {
  padding: 1rem 2.5rem;
  border: none;
  background-color: #f0f0f0;
  border-radius: 2.5rem;
  font-size: 1.6rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-button:hover {
  background-color: #e0e0e0;
}

.tab-button.active {
  background-color: #004d88;
  color: #fff;
}

/* Seções da biblioteca */
.biblioteca-secao {
  margin-bottom: 5rem;
}

.heading-secondary {
  font-size: 2.4rem;
  margin-bottom: 2.5rem;
  color: #333;
  position: relative;
  padding-bottom: 1rem;
}

.heading-secondary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 6rem;
  height: 3px;
  background-color: #004d88;
}

/* Grid para livros */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 3rem;
}

/* Card de livro padrão */
.book-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.book-card .book-cover-container {
  position: relative;
  height: 25rem;
  overflow: hidden;
  flex-shrink: 0;
}

.book-card .book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.progress-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem;
  font-size: 0.8rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.progress-bar {
  height: 4px;
  background: #e74c3c;
  border-radius: 2px;
  flex-grow: 1;
  max-width: 100px;
}

.progress-text {
  font-weight: bold;
  min-width: 30px;
}

.book-card .book-overlay-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.book-card .action-button {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: none;
  font-size: 1.6rem;
  color: #333;
  transition: all 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.book-card .action-button:hover {
  background-color: #fff;
  transform: scale(1.1);
}


.book-card .book-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.book-card .book-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3; 
}

.book-card .book-genre { 
  font-size: 1.3rem;
  color: #555; 
  background-color: #f0f1f2; 
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 0.8rem; 
  display: inline-block;
  line-height: 1.3;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: center;
}

.book-card .book-author {
  font-size: 1.4rem;
  color: #666;
  margin-bottom: 0.8rem; 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.book-card .book-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: auto; 
  padding-top: 0.8rem; 
  border-top: 1px solid #f0f0f0; 
}

.book-card .book-date {
  font-size: 1.2rem;
  color: #777;
}

.book-card .book-progress {
  font-size: 1.2rem;
  color: #004d88;
  font-weight: 500;
}

/* Book bottom actions styling */
.book-card .book-bottom-actions {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.book-card .ler-livro-btn {
  background-color: #004d88;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 6px;
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%;
}

.book-card .ler-livro-btn:hover {
  background-color: #003b6f;
}


/* Catálogo completo */
#catalogo-completo {
  margin-top: 5rem;
}

/* Filtros adicionais */
.filtros-adicionais {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem; 
}

.search-container {
  display: flex;
  max-width: 40rem;
  flex-grow: 1; 
}

.search-container input {
  flex: 1;
  padding: 1.2rem 1.5rem;
  border: 1px solid #ddd;
  border-radius: 6px 0 0 6px;
  font-size: 1.5rem;
}

.search-container input:focus {
  outline: none;
  border-color: #004d88;
}

.btn-search {
  padding: 0 2rem;
  background-color: #004d88;
  color: #fff;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-search:hover {
  background-color: #003b6f;
}

/* Estilo para o container do filtro de gênero */
.filter-genre-container {
  display: flex;
  align-items: center;
}

.sort-container {
  display: flex;
  align-items: center;
}

.sort-select {
  padding: 1.2rem 1.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1.5rem;
  color: #333;
  background-color: #fff;
  cursor: pointer;
  min-width: 20rem; 
}

.sort-select:focus {
  outline: none;
  border-color: #004d88;
}

/* Lista de livros do catálogo */
.books-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

/* Lista de livros - Continue lendo */
.livros-lendo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}


/* Estado vazio */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
}

.empty-state-content {
  max-width: 50rem;
  margin: 0 auto;
}

.empty-state svg {
  width: 8rem;
  height: 8rem;
  color: #ccc;
  margin-bottom: 2rem;
}

.empty-state h3 {
  font-size: 2.4rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.empty-state p {
  font-size: 1.6rem;
  color: #666;
  margin-bottom: 3rem;
}

.hidden {
  display: none;
}

.btn-primary {
  background-color: #004d88;
  color: white;
  padding: 1.2rem 2.4rem;
  border-radius: 6px;
  font-size: 1.6rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
  display: inline-block;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #003b6f;
}

/* Media Queries para Responsividade */
@media (max-width: 768px) {
  .biblioteca-header .heading-primary {
    font-size: 2.8rem;
  }
  
  .tabs-container {
    flex-wrap: wrap;
  }
  
  .tab-button {
    padding: 0.8rem 1.5rem;
    font-size: 1.4rem;
  }
  
  .books-grid,
  .books-catalog,
  .livros-lendo {
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 2rem;
  }
  
  .filtros-adicionais {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem;
  }

  .search-container {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .biblioteca-header .heading-primary {
    font-size: 2.4rem;
  }
  
  .heading-secondary {
    font-size: 2rem;
  }
  
  .books-grid,
  .books-catalog,
  .livros-lendo {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}