/* 时光相册 - 图片/视频查看器样式 */
/* 毛玻璃效果，大尺寸按钮 */

.viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    outline: none;
}

/* 关闭按钮 */
.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.viewer-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* 导航按钮 */
.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.viewer-nav svg {
    width: 28px;
    height: 28px;
    color: white;
}

.viewer-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.viewer-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.viewer-prev {
    left: 24px;
}

.viewer-next {
    right: 24px;
}

/* 内容区域 */
.viewer-content {
    max-width: calc(100% - 160px);
    max-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-content img {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.viewer-content video {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 信息栏 - 固定在底部居中 */
.viewer-info {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90%;
    padding: 10px 28px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    text-align: center;
    z-index: 10;
}

.viewer-filename {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewer-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    display: inline;
    margin-right: 12px;
}

.viewer-meta:last-child {
    margin-right: 0;
}

/* 键盘提示 */
.viewer-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

/* 过渡动画 */
.viewer-content img,
.viewer-content video {
    animation: viewerFadeIn 0.2s ease;
}

@keyframes viewerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .viewer-nav {
        width: 44px;
        height: 44px;
    }
    
    .viewer-nav svg {
        width: 22px;
        height: 22px;
    }
    
    .viewer-prev {
        left: 12px;
    }
    
    .viewer-next {
        right: 12px;
    }
    
    .viewer-content {
        max-width: calc(100% - 80px);
        max-height: calc(100vh - 100px);
    }
    
    .viewer-content img,
    .viewer-content video {
        max-height: calc(100vh - 120px);
    }
    
    .viewer-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: 12px;
        right: 12px;
    }
    
    .viewer-info {
        padding: 8px 16px 10px;
    }
    
    .viewer-filename {
        font-size: 12px;
    }
    
    .viewer-meta {
        font-size: 10px;
        margin-right: 8px;
    }
    
    .viewer-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .viewer-nav {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }
    
    .viewer-prev {
        left: 8px;
    }
    
    .viewer-next {
        right: 8px;
    }
}
