/* 图片预览模态框样式 */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.image-preview-overlay {
    background: rgba(0, 0, 0, 0.95);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-preview-container {
    width: 90%;
    height: 90%;
    max-width: 1200px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 头部样式 */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
}

.image-counter {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.preview-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.preview-btn {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.btn-primary {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

.btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
    color: white;
}

.btn-close {
    padding: 8px;
    border: none;
    background: transparent;
    font-size: 18px;
}

/* 内容区域样式 */
.preview-content {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    background: #000;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

.image-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.image-slider {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.image-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 底部缩略图样式 */
.preview-footer {
    padding: 16px;
    background: #fafafa;
    border-top: 1px solid #e8e8e8;
}

.thumbnail-track {
    display: flex;
    gap: 8px;
    justify-content: center;
    overflow-x: auto;
    padding: 8px 0;
}

.thumbnail-item {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s;
    flex-shrink: 0;
}

.thumbnail-item.active {
    border-color: #1890ff;
    opacity: 1;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .image-preview-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .preview-header {
        padding: 12px 16px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .nav-prev {
        left: 10px;
    }
    
    .nav-next {
        right: 10px;
    }
    
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
}