.page-books { padding: 60px 0; background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); min-height: 100vh; }
.library-container {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}
.library-header h2 { 
    font-weight: 800; 
    margin-bottom: 8px; 
    letter-spacing: -0.5px; 
    background: -webkit-linear-gradient(45deg, #134361, #87C4D5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.library-header p { color: #666; margin-bottom: 20px; font-size: 15px; font-weight: 500; }
.library-divider { 
    width: 80px; height: 5px; 
    background: linear-gradient(90deg, #FFCC00, #ff9900); 
    margin-bottom: 50px; 
    border-radius: 5px; 
}

.book-card {
    background: #fff;
    border-radius: 10px;
    padding: 0;
    border: none;
    position: relative;
    padding-top: 89%; /* Increased further to add ~20px more height */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    overflow: hidden;
}
.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.book-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0; /* FILL THE SQUARE CARD */
    overflow: hidden;
    border-radius: 0;
    background: #f8f9fa;
}
.book-image img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: fill; /* Restored to fill to ensure images fit the entire square */
    display: block;
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.book-card:hover .book-image img {
    transform: scale(1.08);
}

.image-title-overlay {
    position: absolute;
    bottom: 34px;
    left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    color: #fff;
    padding: 35px 12px 8px 12px;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.image-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    background: #134361;
    color: #fff;
    padding: 0 15px;
    height: 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.image-info-overlay i {
    margin-right: 4px;
    opacity: 0.8;
}
.image-info-overlay .rating {
    background: #FFCC00;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
}

.full-link {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10;
}

.library-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
    gap: 10px;
}
.library-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px; /* Modern rounded squares instead of circles */
    color: #4a5568;
    background: #fff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}
.library-pagination a:hover { 
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1a202c; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.library-pagination a.active {
    background: #134361; /* Dark blue */
    border-color: #134361;
    color: #fff;
    box-shadow: 0 6px 16px rgba(19, 67, 97, 0.25);
    transform: translateY(-2px);
}
.library-pagination a.disabled {
    pointer-events: none;
    opacity: 0.5;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
}

.library-sidebar {
    background: #fff;
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.02);
    font-size: 13px;
    transition: transform 0.3s ease;
}
.library-sidebar:hover {
    transform: translateY(-5px);
}
.library-sidebar h5 {
    margin-top: 15px;
    margin-bottom: 15px;
    font-weight: 700;
    border-bottom: 2px solid #FFCC00;
    padding-bottom: 8px;
    display: inline-block;
    font-size: 13px;
    color: #222;
    text-transform: uppercase;
}
.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { margin-bottom: 4px; }
.category-list label { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 8px 12px; 
    border-radius: 8px; 
    cursor: pointer; 
    color: #555; 
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1); 
    font-size: 13px; 
    font-weight: 500;
}
.category-list label:hover { 
    color: #134361; 
    background: #f4f6f8; 
    transform: translateX(4px); 
}
.sidebar-stat {
    background: #fcfcfc;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    border-left: 4px solid #FFCC00;
    color: #333;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.sidebar-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent); margin: 25px 0; }

.sidebar-btn-group { display: flex; gap: 10px; margin-top: 20px; }
.sidebar-btn-group .btn { 
    font-size: 13px; 
    border-radius: 8px; 
    padding: 10px 15px; 
    font-weight: 600; 
    transition: all 0.3s ease; 
    flex: 1;
}

.library-sidebar select.form-control { 
    font-size: 13px; 
    padding-right: 25px; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    overflow: hidden; 
}
.library-sidebar select.form-control option { 
    font-size: 13px; 
}
