/* ========== 现代化顶栏设计 ========== */

/* 移除旧的彩虹条效果 */
.rainbow-border {
    display: none !important;
}

/* 现代化顶栏容器 */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 10000;
    background: transparent;
    pointer-events: none;
}

/* 优雅的渐变顶栏 - 方案1：现代蓝紫渐变 */
.elegant-top-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(79, 70, 229, 0.8) 0%,
        rgba(99, 102, 241, 0.7) 25%,
        rgba(139, 92, 246, 0.7) 50%,
        rgba(168, 85, 247, 0.7) 75%,
        rgba(192, 132, 252, 0.8) 100%
    );
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* 现代化顶栏 - 方案2：毛玻璃效果 */
.glass-top-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
}

/* 现代化顶栏 - 方案3：优雅紫蓝渐变 */
.dynamic-glow-bar {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        #6366f1 0%, 
        #8b5cf6 50%, 
        #6366f1 100%
    );
    background-size: 200% 100%;
    animation: gentleFlow 8s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

@keyframes gentleFlow {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.6;
    }
    50% {
        background-position: 100% 50%;
        opacity: 0.9;
    }
}

/* 现代化顶栏 - 方案4：极简线条 */
.minimal-line-bar {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(59, 130, 246, 0.8) 20%,
        rgba(59, 130, 246, 1) 50%,
        rgba(59, 130, 246, 0.8) 80%,
        transparent 100%
    );
    transition: all 0.4s ease;
}

/* 现代化顶栏 - 方案5：现代薄荷蓝渐变 */
.breathing-bar {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(20, 184, 166, 0.7) 0%,
        rgba(59, 130, 246, 0.7) 50%,
        rgba(99, 102, 241, 0.7) 100%
    );
    animation: breathingGlow 4s ease-in-out infinite;
}

@keyframes breathingGlow {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    }
    50% {
        opacity: 0.8;
        transform: scaleY(1.5);
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
    }
}

/* 现代化顶栏 - 方案6：现代科技渐变 */
.tech-line-bar {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(14, 165, 233, 0) 0%,
        rgba(14, 165, 233, 0.8) 10%,
        rgba(59, 130, 246, 1) 30%,
        rgba(99, 102, 241, 1) 70%,
        rgba(129, 140, 248, 0.8) 90%,
        rgba(129, 140, 248, 0) 100%
    );
    position: relative;
    overflow: hidden;
}

.tech-line-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    animation: techSweep 3s ease-in-out infinite;
}

@keyframes techSweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 现代化顶栏 - 方案7：优雅蓝灰渐变 */
.wave-gradient-bar {
    width: 100%;
    height: 5px;
    background: linear-gradient(45deg, 
        #3b82f6 0%,
        #6366f1 25%,
        #8b5cf6 50%,
        #a855f7 75%,
        #c084fc 100%
    );
    background-size: 400% 400%;
    animation: waveGradient 6s ease infinite;
    border-radius: 0 0 2px 2px;
}

@keyframes waveGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 现代化顶栏 - 方案8：极简蓝调 */
.minimal-blue-bar {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0) 0%,
        rgba(59, 130, 246, 0.3) 25%,
        rgba(59, 130, 246, 0.8) 50%,
        rgba(59, 130, 246, 0.3) 75%,
        rgba(59, 130, 246, 0) 100%
    );
    transition: all 0.3s ease;
}

/* 悬浮时的增强效果 */
.modern-header:hover .elegant-top-bar {
    opacity: 1;
    height: 5px;
}

.modern-header:hover .minimal-line-bar {
    height: 3px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.modern-header:hover .minimal-blue-bar {
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.2) 0%,
        rgba(59, 130, 246, 0.6) 25%,
        rgba(59, 130, 246, 1) 50%,
        rgba(59, 130, 246, 0.6) 75%,
        rgba(59, 130, 246, 0.2) 100%
    );
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modern-header {
        height: 3px;
    }
    
    .glass-top-bar {
        height: 4px;
    }
    
    .wave-gradient-bar {
        height: 3px;
    }
}

/* 暗色主题适配 */
html[data-theme="Dark"] .glass-top-bar {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="Dark"] .minimal-blue-bar {
    background: linear-gradient(90deg, 
        rgba(96, 165, 250, 0) 0%,
        rgba(96, 165, 250, 0.4) 25%,
        rgba(96, 165, 250, 0.9) 50%,
        rgba(96, 165, 250, 0.4) 75%,
        rgba(96, 165, 250, 0) 100%
    );
}

/* 页面加载动画 */
.header-loading {
    animation: headerFadeIn 1.5s ease-out;
}

@keyframes headerFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动时的动态效果 */
.header-scrolled .dynamic-glow-bar {
    animation-duration: 4s;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.header-scrolled .breathing-bar {
    animation-duration: 2s;
}

/* 性能优化 */
.modern-header * {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* 禁用旧的彩虹效果 */
.gradient-border,
.rainbow-border,
[class*="rainbow"] {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* 替换原有的渐变边框效果 */
.modern-border {
    border: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.modern-border:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
}