

.books-body {
  margin: 0;
  font-family: sans-serif;
  background-image: url('images/bg3.png');
  background-repeat: repeat;
  background-size: auto;
  min-height: 100vh;
  padding-bottom: 3rem;
}

.page-layout {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  padding: 4rem 3rem 0;
  justify-content: center;
  width: 100%;           
  box-sizing: border-box;
  margin: 0 auto;
}

.currently-reading {
  flex: 0 0 auto;
  width: 220px;         
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 15rem;
}

.currently-reading h2 {
  color: pink;
  text-shadow: 1px 1px red;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  white-space: nowrap;
}

.currently-reading img {
  width: 220px;
  height: 330px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.4);
  display: block;
}

.current-title {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: pink;
  text-align: center;
  max-width: 180px;
}

.right-column {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.back-home {
  position: fixed;
  top: 1rem;
  left: 1rem;
  font-size: 0.85rem;
  color: pink;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.back-home:hover {
  opacity: 1;
}

.books-header {
  margin-top: 2rem;
  text-align: center;
}

.books-header h1 {
  font-size: 2rem;
  color: orange;
  text-shadow: 1px 1px blue;
}

.bookcase {
  background-image: url('images/books/wood.jpg');
  background-size: cover;
  background-position: center;
  border: 2px solid #5c3a1e;
  border-radius: 12px;
  padding: 1.5rem 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: fit-content;
  max-width: 90vw;
  margin-top: 1.5rem;
}

.shelf {
  background-color: rgba(193, 154, 107, 0.6);
  border-top: 6px solid #8B5E3C;
  border-radius: 4px;
  display: flex;
  gap: 1rem;
  padding: 1rem 1rem 0.5rem;
  justify-content: center;
}

.book {
  position: relative;
  width: 120px;
  flex-shrink: 0;
  cursor: pointer;
}

.book img {
  width: 120px;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}

.book:hover img {
  transform: scale(1.08) translateY(-6px);
}

.book-title {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 0.75rem;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  margin-bottom: 6px;
}

.book:hover .book-title {
  opacity: 1;
}

@media (max-width: 700px) {
  .page-layout {
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem 0;
    gap: 1.5rem;
  }

  .currently-reading {
    width: 160px;
    padding-top: 1rem;   /* no longer needs to align with bookcase */
  }

  .currently-reading img {
    width: 160px;
    height: 240px;
  }

  .bookcase {
    max-width: 95vw;
  }

  .shelf {
    flex-wrap: wrap;     /* books wrap to next line instead of overflowing */
    justify-content: center;
  }

  .book {
    width: 80px;
  }

  .book img {
    width: 80px;
    height: 120px;
  }
}

@media (max-width: 400px) {
  .book {
    width: 60px;
  }

  .book img {
    width: 60px;
    height: 90px;
  }

  .books-header h1 {
    font-size: 1.4rem;
  }
}