/* Book Modal Styles */
.book-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

.book-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #088bd4 0%, #066ba3 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-book-cover {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.modal-book-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-book-author {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

.modal-body {
    padding: 2rem;
}

.modal-description {
    color: #333;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: justify;
    font-size: 1rem;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.modal-stat {
    text-align: center;
}

.modal-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #088bd4;
    display: block;
}

.modal-stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-download-btn {
    flex: 1;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 200px;
}

.modal-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.modal-download-btn i {
    font-size: 1.2rem;
}

.modal-preview-btn {
    background: linear-gradient(135deg, #088bd4 0%, #066ba3 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 150px;
}

.modal-preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(8, 139, 212, 0.3);
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-book-cover {
        width: 100px;
        height: 100px;
    }
    
    .modal-book-title {
        font-size: 1.3rem;
    }
    
    .modal-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-download-btn,
    .modal-preview-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-book-cover {
        width: 80px;
        height: 80px;
    }
    
    .modal-book-title {
        font-size: 1.2rem;
    }
    
    .modal-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .modal-stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        background: white;
        border-radius: 10px;
    }
    
    .modal-stat-number {
        font-size: 1.2rem;
    }
} 