﻿/* jQuery Image Viewer Plugin 样式 */
.image-viewer-modal .modal-dialog {
    max-width: 95%;
    height: 95vh;
    margin: 10px auto;
}

.image-viewer-modal .modal-content {
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    border: none;
    border-radius: 8px;
}

.image-viewer-modal .modal-body {
    position: relative;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-viewer-modal .viewer-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

    .image-viewer-modal .viewer-image-container img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 4px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        transition: transform 0.3s ease;
    }

/* 导航按钮 */
.image-viewer-modal .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 64px;
    z-index: 2001;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .image-viewer-modal .nav-btn:hover {
        background-color: #3498db;
        transform: translateY(-50%) scale(1.1);
    }

    .image-viewer-modal .nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

        .image-viewer-modal .nav-btn:disabled:hover {
            background-color: rgba(0, 0, 0, 0.5);
            transform: translateY(-50%) scale(1);
        }

.image-viewer-modal .prev-btn {
    left: 20px;
}

.image-viewer-modal .next-btn {
    right: 20px;
}

/* 关闭按钮 */
.image-viewer-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    z-index: 2000;
    transition: all 0.2s ease;
}

    .image-viewer-modal .close-btn:hover {
        color: #3498db;
        transform: scale(1.1);
    }

/* 图片信息 */
.image-viewer-modal .image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px;
    padding-top: 40px;
}

.image-viewer-modal .image-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.image-viewer-modal .image-description {
    font-size: 1rem;
    opacity: 0.8;
}

/* 缩略图导航 */
.image-viewer-modal .thumbnails-container {
    position: absolute;
    bottom: 140px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.image-viewer-modal .thumbnail-item {
    width: 80px;
    height: 60px;
    margin: 0 5px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border: 2px solid transparent;
}

    .image-viewer-modal .thumbnail-item:hover {
        opacity: 0.8;
        transform: scale(1.05);
    }

    .image-viewer-modal .thumbnail-item.active {
        opacity: 1;
        border-color: #3498db;
        transform: scale(1.05);
    }

    .image-viewer-modal .thumbnail-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* 计数器 */
.image-viewer-modal .image-counter {
    position: absolute;
    top: 25px;
    left: 25px;
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

/* 触摸提示 */
.image-viewer-modal .touch-hint {
    position: absolute;
    bottom: 100px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    display: none;
}

/* 加载动画 */
.image-viewer-modal .loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: imageViewerSpin 1s ease-in-out infinite;
    z-index: 5;
}

@keyframes imageViewerSpin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 控制面板 */
.image-viewer-modal .controls {
    position: absolute;
    top: 20px;
    right: 80px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.image-viewer-modal .control-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .image-viewer-modal .control-btn:hover {
        background-color: #3498db;
        transform: scale(1.1);
    }

    .image-viewer-modal .control-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

        .image-viewer-modal .control-btn:disabled:hover {
            background-color: rgba(0, 0, 0, 0.5);
            transform: scale(1);
        }

/* 响应式调整 */
@media (max-width: 768px) {
    .image-viewer-modal .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .image-viewer-modal .prev-btn {
        left: 10px;
    }

    .image-viewer-modal .next-btn {
        right: 10px;
    }

    .image-viewer-modal .thumbnail-item {
        width: 60px;
        height: 45px;
    }

    .image-viewer-modal .touch-hint {
        display: block;
    }

    .image-viewer-modal .controls {
        top: 15px;
        right: 65px;
    }
}

@media (max-width: 576px) {
    .image-viewer-modal .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .image-viewer-modal .image-title {
        font-size: 1.2rem;
    }

    .image-viewer-modal .controls {
        top: 10px;
        right: 60px;
    }

    .image-viewer-modal .control-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}
