/**
 * Book Card Styles
 * Special effects and animations for book cards
 */

/* Base card styles */
.book-card {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover lift effect */
.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Cover wrapper */
.book-card .book-cover-wrapper {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shine effect overlay */
.book-card .shine-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: left 0.6s ease-in-out;
    pointer-events: none;
    z-index: 10;
}

.book-card:hover .shine-effect {
    left: 150%;
}

/* Glass reflection effect */
.book-card .glass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.02) 75%,
        rgba(0, 0, 0, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.book-card:hover .glass-overlay {
    opacity: 1;
}

/* Subtle border glow on hover */
.book-card:hover .book-cover-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: inherit;
    pointer-events: none;
    z-index: 15;
}

/* Bookmark button with backdrop filter */
.book-card .bookmark-btn {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

.book-card:hover .bookmark-btn {
    background: rgba(255, 255, 255, 1);
}

/* Sparkle effect */
@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.book-card .sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.book-card:hover .sparkle {
    animation: sparkle 1.5s ease-in-out infinite;
}

.book-card .sparkle:nth-child(1) {
    top: 20%;
    right: 30%;
    animation-delay: 0s;
}

.book-card .sparkle:nth-child(2) {
    top: 50%;
    right: 20%;
    animation-delay: 0.3s;
}

.book-card .sparkle:nth-child(3) {
    top: 70%;
    right: 40%;
    animation-delay: 0.6s;
}

/* Glossy finish */
.book-card .glossy-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 8;
}

.book-card:hover .glossy-overlay {
    opacity: 1;
}

/* Prevent text selection during animation */
.book-card:hover * {
    -webkit-user-select: none;
    user-select: none;
}
