/* 图片查看器样式 */

/* 让图片区域有鼠标指针效果 */
.image-zoom-trigger {
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
}

.image-zoom-trigger::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.image-zoom-trigger:hover::after {
    opacity: 1;
}

.image-zoom-trigger img {
    transition: transform 0.3s ease;
}

.image-zoom-trigger:hover img {
    transform: scale(1.05);
}

/* 文字链接样式 */
.news-info-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-info-link:hover .news-title {
    color: #007bff;
}

/* 遮罩层样式 */
.image-viewer-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 关闭按钮 */
.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
}

.image-viewer-close:hover,
.image-viewer-close:focus {
    color: #bbb;
    text-decoration: none;
}

/* 图片内容 */
.image-viewer-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoom 0.4s ease;
    cursor: zoom-out;
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 图片说明 */
.image-viewer-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    font-size: 16px;
    animation: fadeIn 0.5s ease 0.2s both;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .image-viewer-modal {
        padding-top: 30px;
    }

    .image-viewer-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }

    .image-viewer-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .image-viewer-caption {
        width: 90%;
        font-size: 14px;
        padding: 10px 0;
    }

    .image-zoom-trigger::after {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
    }
}

/* 加载动画 */
.image-viewer-modal.loading .image-viewer-content {
    opacity: 0.5;
}

/* 滚动时固定遮罩层 */
.image-viewer-modal {
    touch-action: none;
}

body.image-viewer-open {
    overflow: hidden;
}

