/* Fancybox 5 自定义现代化样式 - 参考目标网站效果 */

/* 主容器样式优化 */
.fancybox__container {
    --fancybox-bg: rgba(10, 10, 10, 0.95);
    --fancybox-accent-color: #ff6b35;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 幻灯片容器 */
.fancybox__slide {
    padding: 20px;
}

/* 内容区域 */
.fancybox__content {
    background: transparent;
    border-radius: 12px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

/* 工具栏样式 */
.fancybox__toolbar {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    padding: 24px 24px 60px;
    border-radius: 12px 12px 0 0;
}

.fancybox__toolbar .fancybox__button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    width: 44px;
    height: 44px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.fancybox__toolbar .fancybox__button:hover {
    background: var(--fancybox-accent-color);
    border-color: var(--fancybox-accent-color);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.fancybox__toolbar .fancybox__button:active {
    transform: scale(0.95);
}

/* 信息栏样式 */
.fancybox__infobar {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 缩略图容器 - 现代化设计 */
.fancybox__thumbs {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
}

/* 缩略图样式 */
.fancybox__thumb {
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.fancybox__thumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.fancybox__thumb:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.fancybox__thumb:hover::before {
    opacity: 0;
}

.fancybox__thumb.is-selected {
    border-color: var(--fancybox-accent-color);
    transform: scale(1.05);
    box-shadow: 
        0 0 0 3px rgba(255, 107, 53, 0.3),
        0 8px 25px rgba(255, 107, 53, 0.2);
}

.fancybox__thumb.is-selected::before {
    opacity: 0;
}

/* 图片样式 */
.fancybox__image {
    border-radius: 8px;
}

/* 导航箭头 */
.fancybox__nav .fancybox__button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fancybox__nav .fancybox__button:hover {
    background: var(--fancybox-accent-color);
    border-color: var(--fancybox-accent-color);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

/* 关闭按钮 */
.fancybox__button--close {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.fancybox__button--close:hover {
    background: rgba(255, 59, 48, 0.8) !important;
    border-color: rgba(255, 59, 48, 0.8) !important;
    transform: scale(1.1);
}

/* 字幕样式 */
.fancybox__caption {
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    color: white;
    padding: 60px 24px 24px;
    border-radius: 0 0 12px 12px;
}

.fancybox__caption > * {
    color: white;
}

/* 加载动画 */
.fancybox__spinner {
    background: var(--fancybox-accent-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
}

/* 各种按钮样式统一 */
.fancybox__button--slideshow,
.fancybox__button--fullscreen,
.fancybox__button--zoom,
.fancybox__button--thumbs {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fancybox__button--slideshow:hover,
.fancybox__button--fullscreen:hover,
.fancybox__button--zoom:hover,
.fancybox__button--thumbs:hover {
    background: var(--fancybox-accent-color) !important;
    border-color: var(--fancybox-accent-color) !important;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

/* 动画效果 */
.f-fadeIn {
    opacity: 1;
    animation: fancyboxFadeIn 0.3s ease-out;
}

.f-fadeOut {
    opacity: 0;
    animation: fancyboxFadeOut 0.3s ease-in;
}

@keyframes fancyboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fancyboxFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    .fancybox__slide {
        padding: 12px;
    }

    .fancybox__toolbar {
        padding: 16px 16px 40px;
    }

    .fancybox__toolbar .fancybox__button {
        width: 36px;
        height: 36px;
    }

    .fancybox__nav .fancybox__button {
        width: 44px;
        height: 44px;
    }

    .fancybox__thumbs {
        padding: 12px;
    }

    .fancybox__thumb {
        border-radius: 6px;
    }
}

/* 减少动画效果（对于喜欢简洁效果的用户） */
@media (prefers-reduced-motion: reduce) {
    .fancybox__thumb,
    .fancybox__toolbar .fancybox__button,
    .fancybox__nav .fancybox__button,
    .fancybox__button--close {
        transition: none;
    }

    .f-fadeIn,
    .f-fadeOut {
        animation: none;
    }
}

/* 深色主题优化 */
@media (prefers-color-scheme: dark) {
    .fancybox__container {
        --fancybox-bg: rgba(0, 0, 0, 0.97);
    }
}

/* 高分辨率屏幕优化 */
@media (min-resolution: 120dpi) {
    .fancybox__content {
        box-shadow: 
            0 25px 50px -12px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.08);
    }
}