/**
 * 图片放大查看样式
 */

/* 模态框容器 */
.image-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-zoom-modal.show {
    display: block;
    opacity: 1;
}

/* 背景遮罩 */
.image-zoom-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

/* 内容容器 */
.image-zoom-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* 图片内容 */
.image-zoom-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-zoom-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
}

/* 图片说明 */
.image-zoom-caption {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 6px;
    font-size: 0.9rem;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.image-zoom-caption:empty {
    display: none;
}

/* 关闭按钮 */
.image-zoom-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.image-zoom-close:hover {
    background: white;
    transform: scale(1.1);
}

/* 导航按钮 */
.image-zoom-prev,
.image-zoom-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.image-zoom-prev {
    left: 1.5rem;
}

.image-zoom-next {
    right: 1.5rem;
}

.image-zoom-prev:hover,
.image-zoom-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

/* 计数器 */
.image-zoom-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 内容区域图片样式 */
.ck-content img,
.article-body img,
.detail-content-section img,
.plugin-content img,
.node-content img {
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.ck-content img:hover,
.article-body img:hover,
.detail-content-section img:hover,
.plugin-content img:hover,
.node-content img:hover {
    opacity: 0.9;
}

/* 不需要放大的图片 */
img.no-zoom {
    cursor: default !important;
}

img.no-zoom:hover {
    opacity: 1 !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .image-zoom-container {
        padding: 1rem;
    }
    
    .image-zoom-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .image-zoom-content img {
        max-height: 80vh;
    }
    
    .image-zoom-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .image-zoom-prev,
    .image-zoom-next {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .image-zoom-prev {
        left: 1rem;
    }
    
    .image-zoom-next {
        right: 1rem;
    }
    
    .image-zoom-caption {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        max-width: 90%;
    }
    
    .image-zoom-counter {
        bottom: 1rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 576px) {
    .image-zoom-container {
        padding: 0.5rem;
    }
    
    .image-zoom-content img {
        max-height: 75vh;
        border-radius: 4px;
    }
    
    .image-zoom-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .image-zoom-prev,
    .image-zoom-next {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .image-zoom-prev {
        left: 0.75rem;
    }
    
    .image-zoom-next {
        right: 0.75rem;
    }
    
    .image-zoom-caption {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

