/* ==========================================================================
   components-library.css
   Maggie Appleton Style: Digital Garden Reading Shelf & Library
   ========================================================================== */


.maggie-library-wrapper {
  margin-top: 15px;
  margin-bottom: 60px;
}

.bookshelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  margin-bottom: 45px;
}

@media (max-width: 640px) {
  .bookshelf-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.bookshelf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 34px 24px 28px;
  box-shadow: 0 4px 20px -3px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
  position: relative;
}

.bookshelf-item:hover {
  transform: translateY(-5px);
  border-color: var(--card-hover-border);
  box-shadow: 0 16px 36px -6px rgba(124, 58, 237, 0.16);
}

.book-3d-stage {
  perspective: 1000px;
  margin-bottom: 22px;
  display: flex;
  justify-content: center;
}

.book-cover-link {
  position: relative;
  display: inline-block;
  outline: none;
  text-decoration: none !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bookshelf-item:hover .book-cover-link {
  transform: rotateY(-8deg) scale(1.04);
}

.book-cover-img {
  width: 154px;
  height: 226px;
  object-fit: cover;
  border-radius: 3px 8px 8px 3px;
  box-shadow: -6px 8px 22px rgba(0, 0, 0, 0.32), 0 2px 5px rgba(0, 0, 0, 0.15);
  border-left: 2px solid rgba(255, 255, 255, 0.35);
  display: block;
}

.book-spine-shadow {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
}

.book-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.book-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin: 0;
  max-width: 90%;
}

.book-title a {
  color: var(--text-main);
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.bookshelf-item:hover .book-title a {
  color: var(--primary-color);
}

.book-author {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.02em;
}

.library-extensibility-note {
  margin-top: 35px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px dashed var(--primary-light);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}

.library-extensibility-note code {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary-color);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
