/* 图片查看器遮罩层 */
.image-viewer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.image-viewer-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* 图片容器 */
.image-viewer-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 查看器中的图片 */
.image-viewer-img {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-out;
}

/* 关闭按钮 */
.image-viewer-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffd54f 0%, #ffeb3b 100%);
    color: #333;
    border: none;
    border-radius: 50%;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 235, 59, 0.5);
    z-index: 10000;
}

.image-viewer-close:hover {
    transform: rotate(90deg) scale(1.15);
    box-shadow: 0 6px 20px rgba(255, 235, 59, 0.7);
}

/* 图片信息 */
.image-viewer-info {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    font-size: 18px;
    padding: 12px 30px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 25px;
    max-width: 80%;
    z-index: 10000;
}

/* 加载动画 */
.image-viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffd54f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-viewer-close {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 28px;
    }

    .image-viewer-info {
        bottom: 20px;
        font-size: 16px;
        padding: 10px 20px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .image-viewer-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .image-viewer-info {
        bottom: 15px;
        font-size: 14px;
        padding: 8px 16px;
        max-width: 95%;
    }
}
