
    /* Popup Styles - Enhanced for Mobile */
    .popup-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        z-index: 2000;
        justify-content: center;
        align-items: center;
        padding: 15px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .popup-container {
        position: relative;
        background: var(--dark-bg);
        border: 2px solid var(--gold);
        border-radius: 12px;
        padding: 20px;
        max-width: 95%;
        max-height: 95%;
        text-align: center;
        margin: auto;
    }
    
    .popup-gif {
        max-width: 100%;
        max-height: 65vh;
        border-radius: 8px;
        display: block;
        height: auto;
    }
    
    .close-popup {
        position: absolute;
        top: 20px;
        right: 15px;
        color: black;
        font-size: 1.8rem;
        cursor: pointer;
        transition: color 0.3s;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2001;
    }
    
    .close-popup:hover {
        color: white;
    }
    
    /* Popup Link Styles */
    #popupLink {
        display: block;
        text-decoration: none;
        transition: transform 0.3s;
    }
    
    #popupLink:hover {
        transform: scale(1.02);
    }

    /* Mobile-Specific Optimizations */
    @media (max-width: 768px) {
        .popup-container {
            padding: 15px;
            max-width: 90%;
            border-width: 1px;
        }
        
        .close-popup {
            top: 3px;
            right: 8px;
            font-size: 1.5rem;
            width: 35px;
            height: 35px;
        }
        
        .popup-gif {
            max-height: 60vh;
        }
    }

    @media (max-width: 480px) {
        .popup-container {
            padding: 12px;
            max-width: 95%;
            border-radius: 8px;
        }
        
        .close-popup {
            top: 2px;
            right: 6px;
            font-size: 1.3rem;
            width: 30px;
            height: 30px;
        }
        
        .popup-gif {
            max-height: 55vh;
            border-radius: 6px;
        }
        
        .popup-overlay {
            padding: 10px;
        }
    }

    /* Touch Device Optimizations */
    @media (hover: none) and (pointer: coarse) {
        .close-popup {
            min-width: 44px; /* Minimum touch target size */
            min-height: 44px;
        }
        
        #popupLink:active {
            transform: scale(0.98);
        }
    }

    /* Prevent zoom on iOS when tapping */
    @media (max-width: 768px) {
        .close-popup {
            touch-action: manipulation;
        }
    }

