

        /* Popup overlay */
        .popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 50;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.4s;
            padding: 1rem;
        }

        .popup-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* Popup container */
        .popup {
            position: relative;
            width: 100%;
            max-width: 500px; /* Max width for larger screens */
            aspect-ratio: 1/1; /* Maintain square aspect ratio */
            border-radius: 1rem;
            overflow: hidden;
            opacity: 0;
            transform: scale(0.8) translateY(20px);
            transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.5);
            animation: pulse 2s infinite;
        }

        .popup-overlay.active .popup {
            opacity: 1;
            transform: scale(1) translateY(0);
        }

        /* Pulse animation for the popup */
        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
            }
            70% {
                box-shadow: 0 0 0 15px rgba(168, 85, 247, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
            }
        }

        /* Close button */
        .close-button {
            position: absolute;
            top: 1rem;
            right: 1rem;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(4px);
            border: 2px solid rgba(255, 255, 255, 0.5);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            transition: all 0.3s ease;
            animation: fadeIn 0.5s 0.3s both;
        }

        .close-button:hover {
            background-color: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .close-button svg {
            width: 1.25rem;
            height: 1.25rem;
            color: white;
            stroke-width: 3;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        /* Image container */
        .image-container {
            width: 100%;
            height: 100%;
            position: relative;
            overflow: hidden;
        }

        .image-link {
            display: block;
            width: 100%;
            height: 100%;
            position: relative;
            overflow: hidden;
            cursor: pointer;
        }

        .image-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.7s ease, filter 0.7s ease;
        }

        .image-link:hover img {
            transform: scale(1.05) rotate(1deg);
            filter: saturate(1.2) contrast(1.1);
        }

        /* Image overlay with animation */
        .image-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
            opacity: 0;
            transition: opacity 0.4s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .image-link:hover .image-overlay {
            opacity: 1;
        }

        /* Overlay icon animation */
        .overlay-icon {
            transform: scale(0.7);
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .image-link:hover .overlay-icon {
            transform: scale(1);
            opacity: 1;
        }

        /* Loading animation for image */
        @keyframes shimmer {
            0% {
                background-position: -468px 0;
            }
            100% {
                background-position: 468px 0;
            }
        }

        .loading {
            background: linear-gradient(to right, #f6f7f8 8%, #edeef1 18%, #f6f7f8 33%);
            background-size: 800px 104px;
            animation: shimmer 1.5s infinite linear;
        }

        /* Floating animation for the link icon */
        @keyframes float {
            0% {
                transform: translateY(0px);
            }
            50% {
                transform: translateY(-10px);
            }
            100% {
                transform: translateY(0px);
            }
        }

        .float {
            animation: float 3s ease-in-out infinite;
        }

        /* Media Queries for Responsiveness */
        @media (max-width: 480px) {
            .close-button {
                width: 2rem;
                height: 2rem;
                top: 0.75rem;
                right: 0.75rem;
            }
            
            .close-button svg {
                width: 1rem;
                height: 1rem;
            }
        }