/* 底栏灵动动画效果 - 完全重写 */

/* 文字闪烁动画 */
@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.6),
                     0 0 25px rgba(100, 200, 255, 0.4);
    }
}

/* 重置原有footer样式并重新定义 */
footer {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 20px !important;
    z-index: 1000 !important;
    
    /* 固定初始尺寸 */
    padding: 0 !important;
    margin: 0 !important;
    width: 400px !important;
    height: 50px !important;
    
    /* 新的背景和边框 */
    backdrop-filter: blur(var(--card_filter)) !important;
    -webkit-backdrop-filter: blur(var(--card_filter)) !important;
    background: var(--item_bg_color) !important;
    border-radius: 25px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    
    /* Flex布局 */
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    
    /* 平滑扩展动画 */
    transition: height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* 主要内容区域 */
.footer-main {
    /* 完全重置 */
    padding: 0 20px !important;
    margin: 0 !important;
    
    /* 自适应宽度 */
    width: 100% !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    
    /* Flex布局实现完美居中 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    
    /* 文字样式 */
    text-align: center !important;
    color: var(--footer_text_color) !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    
    /* 其他 */
    position: relative !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
    
    /* 平滑过渡 */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* 导航标签容器 - 默认完全隐藏 */
.footer-nav {
    display: none !important;
    justify-content: center;
    gap: 8px;
    padding: 0 15px 15px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s,
                transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s;
    pointer-events: none;
    z-index: 1;
    flex: 1;
    align-items: center;
}

/* 单个导航标签 */
.nav-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--footer_text_color);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    transform: translateY(10px);
}

/* 标签图标 */
.nav-tag i {
    font-size: 14px;
    color: #64c8ff;
}

/* 悬停效果 - 底栏智能扩展 */
footer:hover {
    transform: translateX(-50%) translateY(-8px) !important;
    height: 100px !important;
    width: 700px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
                0 10px 30px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(100, 200, 255, 0.3) !important;
    border-color: rgba(100, 200, 255, 0.6) !important;
}

/* 悬停时主内容区域保持在顶部 */
footer:hover .footer-main {
    height: 50px !important;
    flex-shrink: 0 !important;
}

/* 悬停时显示导航标签 */
footer:hover .footer-nav {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: all !important;
}

footer:hover .nav-tag {
    transform: translateY(0);
}

/* 标签悬停效果 */
.nav-tag:hover {
    transform: translateY(-3px) scale(1.05);
    background: var(--item_hover_color);
    box-shadow: 0 8px 25px rgba(100, 200, 255, 0.3);
    border-color: rgba(100, 200, 255, 0.5);
}

/* 活跃标签样式 */
.nav-tag.active {
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.2), rgba(255, 100, 200, 0.2));
    border-color: rgba(100, 200, 255, 0.8);
    color: #64c8ff;
    box-shadow: 0 6px 20px rgba(100, 200, 255, 0.4);
}

/* 目标高亮效果 - 优化模糊效果 */
.highlight-target {
    position: relative;
    /* 背景高亮 */
    background: rgba(100, 200, 255, 0.15) !important;
    border: 2px solid rgba(100, 200, 255, 0.5) !important;
    border-radius: 10px !important;
    /* 阴影效果 */
    box-shadow: 0 0 25px rgba(100, 200, 255, 0.3), 
                0 4px 15px rgba(100, 200, 255, 0.2) !important;
    /* 位移和缩放 */
    transform: translateY(-3px) scale(1.01) !important;
    z-index: 8 !important;
    /* 平滑过渡 */
    transition: all 0.6s ease !important;
    /* 添加轻微的脉冲动画 */
    animation: gentleHighlight 2s ease-in-out infinite !important;
    /* 轻微的整体模糊 */
    backdrop-filter: blur(2px) !important;
    -webkit-backdrop-filter: blur(2px) !important;
}

/* 对目标元素内部内容进行轻微模糊 */
.highlight-target h1,
.highlight-target p {
    filter: blur(1px) !important;
    -webkit-filter: blur(1px) !important;
    transition: filter 0.6s ease !important;
    opacity: 0.8 !important;
}

.highlight-target img {
    filter: blur(1.5px) !important;
    -webkit-filter: blur(1.5px) !important;
    transition: filter 0.6s ease !important;
    opacity: 0.9 !important;
}

/* 温和的高亮脉冲动画 - 优化模糊效果 */
@keyframes gentleHighlight {
    0%, 100% {
        box-shadow: 0 0 25px rgba(100, 200, 255, 0.3), 
                    0 4px 15px rgba(100, 200, 255, 0.2);
        border-color: rgba(100, 200, 255, 0.5);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    50% {
        box-shadow: 0 0 35px rgba(100, 200, 255, 0.5), 
                    0 4px 20px rgba(100, 200, 255, 0.3);
        border-color: rgba(100, 200, 255, 0.7);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }
}



/* 文字动画 */
footer span {
    animation: textGlow 2s ease-in-out infinite;
    display: inline-block;
}

/* 时间数字特殊效果 */
footer #timeDate,
footer #times,
footer #show_time {
    color: #64c8ff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(100, 200, 255, 0.5);
    animation: textGlow 1.5s ease-in-out infinite alternate;
}

/* 标签逐个出现动画 */
.nav-tag:nth-child(1) { transition-delay: 0.1s; }
.nav-tag:nth-child(2) { transition-delay: 0.15s; }
.nav-tag:nth-child(3) { transition-delay: 0.2s; }
.nav-tag:nth-child(4) { transition-delay: 0.25s; }
.nav-tag:nth-child(5) { transition-delay: 0.3s; }

/* 响应式调整 */
@media (max-width: 768px) {
    footer {
        width: 300px !important;
        height: 45px !important;
    }
    
    footer:hover {
        height: 90px !important;
        width: 500px !important;
        transform: translateX(-50%) translateY(-5px) !important;
    }
    
    .footer-main {
        font-size: 11px !important;
        padding: 0 15px !important;
        height: 45px !important;
        min-height: 45px !important;
        max-height: 45px !important;
    }
    
    footer:hover .footer-main {
        height: 45px !important;
    }
    
    .footer-nav {
        flex-wrap: wrap;
        gap: 6px;
        padding: 0 12px 12px;
        transition: opacity 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.08s,
                    transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.08s;
    }
    
    .nav-tag {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .nav-tag i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    footer {
        width: 280px !important;
        height: 40px !important;
    }
    
    footer:hover {
        height: 75px !important;
        width: 380px !important;
    }
    
    .footer-main {
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
    }
    
    footer:hover .footer-main {
        height: 40px !important;
    }
    
    .footer-nav {
        gap: 4px;
        padding: 0 10px 10px;
        transition: opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.05s,
                    transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.05s;
    }
    
    .nav-tag {
        padding: 4px 6px;
        font-size: 9px;
    }
    
    .nav-tag span {
        display: none;
    }
    
    .nav-tag i {
        font-size: 14px;
    }
}