.image-expand-container .image-expand-portrait {
    cursor: pointer;
    max-width: 414px; /* Set a reasonable max width to prevent oversized images */
    height: auto;
    margin: 10px;
    position: relative;
    transition: transform 0.2s ease-in-out;
}

.image-expand-container .image-expand-portrait::before {
    content: "\f00e"; /* Unicode for FontAwesome search-plus icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none; /* Ensure the icon does not interfere with mouse events */
}

.image-expand-container .image-expand-portrait:hover::before {
    opacity: 1;
}

.image-expand-modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.9);
}

.image-expand-modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    margin-top: 50px; /* Add extra margin-top to move the image down */
}

.image-expand-close {
    position: absolute;
    top: 88px; /* 确保关闭按钮不被遮挡 */
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.image-expand-close:hover,
.image-expand-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* 适配移动设备的样式 */
@media (max-width: 600px) {
    .image-expand-modal {
        padding-top: 88px; /* 为移动设备调整顶部 padding */
    }

    .image-expand-close {
        top: 88px; /* 确保关闭按钮在移动设备上不被遮挡 */
    }
}
