﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', sans-serif;
}

.book-cover-container {
    perspective: 1000px;
}

.book-cover {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
}

    .book-cover:hover {
        transform: translateY(-8px) rotateX(5deg);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .book-cover::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
        pointer-events: none;
        z-index: 1;
    }

.action-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border: none;
    box-shadow: 0 4px 15px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8px);
}

    .action-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.5s;
    }

    .action-button:hover::before {
        left: 100%;
    }

    .action-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px 0 rgba(31, 38, 135, 0.5);
    }

    .action-button:active {
        transform: translateY(0);
    }

.favorite-btn {
    position: absolute;
    top: 16px;  
    right: 16px; 
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;  
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    .favorite-btn:hover {
        background: rgba(255, 255, 255, 1);
        border-color: rgba(239, 68, 68, 0.2);
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    }

    .favorite-btn:active {
        transform: scale(0.95);
    }

    /* Heart icon default state */
    .favorite-btn i {
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        color: #9ca3af; /* gray-400 */
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
        font-size: 20px;
    }

    /* Heart icon hover state */
    .favorite-btn:hover i {
        color: #f87171; /* red-400 */
        transform: scale(1.1);
        filter: drop-shadow(0 4px 8px rgba(239, 68, 68, 0.3));
    }

    /* Heart icon active/favorited state - FIXED */
    .favorite-btn.active {
        background: #ef4444 !important; /* Red background */
        border-color: rgba(239, 68, 68, 0.3);
        box-shadow: 0 6px 25px rgba(239, 68, 68, 0.2);
    }

        .favorite-btn.active i {
            color: #ffffff !important; /* White heart */
            transform: scale(1.1);
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
            animation: heartBeat 0.6s ease-in-out;
        }

        /* Ensure active state overrides hover */
        .favorite-btn.active:hover {
            background: #dc2626 !important; /* Slightly darker red on hover */
        }

            .favorite-btn.active:hover i {
                color: #ffffff !important; /* Keep white on hover when active */
            }

/* Heart beat animation when favorited */
@keyframes heartBeat {
    0% {
        transform: scale(1.1);
    }

    25% {
        transform: scale(1.3);
    }

    40% {
        transform: scale(1.1);
    }

    60% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1.1);
    }
}

/* Pulse effect for active state */
.favorite-btn.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
    animation: heartPulse 2s infinite;
    pointer-events: none;
}

@keyframes heartPulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* Prevent child elements from interfering with clicks */
.favorite-btn * {
    pointer-events: none;
}

/* Focus state for accessibility */
.favorite-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}








.price-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: priceGlow 3s ease-in-out infinite alternate;
}

@keyframes priceGlow {
    0% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }

    100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 30px rgba(118, 75, 162, 0.6);
    }
}

.info-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

    .info-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.9);
    }

.genre-tag {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

    .genre-tag:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        background: linear-gradient(135deg, #fed6e3 0%, #a8edea 100%);
    }

.toast-enter {
    animation: toastSlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.hero-gradient {
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
}

.card-hover-effect {
    transition: all 0.3s ease;
}

    .card-hover-effect:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    }

.rating-stars {
    filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.3));
}
