/* 模态框覆盖层 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

/* 激活状态 */
.modal-overlay.active {
    opacity: 1;
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: #ff6b6b;
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* 模态框内容容器 */
.modal-content {
    background: transparent;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 模态框中的图片 */
.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 图片信息 */
.modal-info {
    color: white;
    text-align: center;
    /* margin-top: 20px; */
    font-size: 20px;
    padding: 15px 30px;
    /* background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); */
    /* border-radius: 10px; */
    max-width: 80%;
    /* backdrop-filter: blur(10px); */
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 导航按钮 */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    user-select: none;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

#prevImage {
    left: 30px;
}

#nextImage {
    right: 30px;
}

/* 缩略图指示器 */
.thumbnail-indicator {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    z-index: 1001;
    display: none;
}

.thumb-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumb-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.thumb-dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* 加载动画 */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    z-index: 1002;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 图片计数 */
.image-counter {
    position: absolute;
    top: 20px;
    left: 30px;
    color: white;
    font-size: 18px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    z-index: 1001;
}

/* 下载按钮 */
.download-btn {
    position: absolute;
    top: 20px;
    right: 90px;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    font-size: 24px;
    text-decoration: none;
    display: none;
}

.download-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-image {
        max-height: 60vh;
    }
    
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .modal-info {
        font-size: 16px;
        padding: 10px 20px;
        max-width: 90%;
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    #prevImage {
        left: 10px;
    }
    
    #nextImage {
        right: 10px;
    }
    
    .image-counter {
        top: 10px;
        left: 10px;
        font-size: 14px;
        padding: 5px 10px;
    }
    
    .download-btn {
        top: 10px;
        right: 60px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .thumbnail-indicator {
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .modal-info {
        font-size: 14px;
    }
}