/* 图片预览组件样式 */

/* 全屏预览模态框 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    width: 80vw;
    height: 80vh;
    animation: zoomIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    cursor: grab;
    transition: transform 0.3s ease;
    user-select: none;
}

.modal-image:active {
    cursor: grabbing;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: -10px;
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.modal-controls {
    position: absolute;
    top: -50px;
    left: 0;
    display: flex;
    gap: 8px;
    z-index: 10001;
}

.modal-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.modal-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95vw;
        height: 70vh;
    }
    
    .modal-close {
        top: -40px;
        right: -5px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
    
    .modal-info {
        bottom: -50px;
        font-size: 12px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98vw;
        height: 60vh;
    }
    
    .modal-close {
        top: -35px;
        right: 0;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}
