/* --- Styles for the Library Feature --- */

/* Bookshelf Container */
.bookshelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 40px 20px;
    padding: 20px;
    justify-items: center;
}

/* Individual Book Styling */
.book {
    width: 180px;
    height: 240px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-30deg);
    transition: transform 0.5s ease;
    cursor: pointer;
}

.book:hover {
    transform: rotateY(0deg) scale(1.05);
}

/* Book Cover Image */
.book img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px 4px 4px 2px;
    box-shadow: 
        inset 4px 0 10px -2px rgba(0,0,0,0.3), /* Inner spine shadow */
        -10px 10px 15px -5px rgba(0,0,0,0.4); /* Drop shadow */
}

/* Book Title on the Shelf */
.book-title {
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
