/* 导航栏样式 */
.nav-bar-container {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-bar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    border-radius: 50%;
    color: #00ffff;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
    user-select: none;
    margin-bottom: 5px;
    position: relative;
    animation: pulseEffect 2s infinite ease-in-out;
}

.nav-bar-toggle:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.8);
}

.nav-bar-toggle:before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.1), rgba(0, 255, 255, 0.3), rgba(0, 255, 255, 0.1));
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
    animation: techGlow 4s infinite linear;
}

.nav-bar-toggle .icon {
    margin-right: 8px;
    font-size: 18px;
}

.nav-bar-items {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 0;
    width: 180px;
}

.nav-bar-items.active {
    max-height: 300px;
    opacity: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.nav-bar-item {
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.nav-bar-item:last-child {
    border-bottom: none;
}

.nav-bar-item .icon {
    margin-right: 8px;
}

.nav-bar-item:hover {
    background: rgba(0, 255, 255, 0.1);
}

/* 太极图标动画 */
.taiji-icon {
    width: 100%;
    height: 100%;
    transform-origin: center;
    animation: rotateSlowly 20s linear infinite;
}

.electric-circle {
    stroke-dasharray: 302;
    stroke-dashoffset: 302;
    animation: drawCircle 3s forwards, glowEffect 2s infinite alternate;
}

.electric-particle {
    opacity: 0;
    animation: particleMove 3s infinite;
}

.particle1 { animation-delay: 0s; }
.particle2 { animation-delay: 0.5s; }
.particle3 { animation-delay: 1s; }
.particle4 { animation-delay: 1.5s; }
.particle5 { animation-delay: 2s; }
.particle6 { animation-delay: 2.5s; }

.lightning {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    opacity: 0;
    animation: drawLightning 1s infinite;
}

.lightning1 { animation-delay: 0s; }
.lightning2 { animation-delay: 0.3s; }
.lightning3 { animation-delay: 0.6s; }
.lightning4 { animation-delay: 0.9s; }
.lightning5 { animation-delay: 1.2s; }
.lightning6 { animation-delay: 1.5s; }

/* 动画关键帧 */
@keyframes techGlow {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes pulseEffect {
    0% { box-shadow: 0 0 15px rgba(0, 255, 255, 0.5); }
    50% { box-shadow: 0 0 25px rgba(0, 255, 255, 0.8); }
    100% { box-shadow: 0 0 15px rgba(0, 255, 255, 0.5); }
}

@keyframes rotateSlowly {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes drawCircle {
    0% { stroke-dashoffset: 302; }
    100% { stroke-dashoffset: 0; }
}

@keyframes glowEffect {
    0% { stroke-opacity: 0.5; stroke-width: 2; }
    100% { stroke-opacity: 1; stroke-width: 3; }
}

@keyframes particleMove {
    0% { opacity: 0; transform: scale(0); }
    20% { opacity: 1; transform: scale(1.5); }
    40% { opacity: 0.8; transform: scale(1); }
    60% { opacity: 1; transform: scale(1.2); }
    80% { opacity: 0.6; transform: scale(0.8); }
    100% { opacity: 0; transform: scale(0); }
}

@keyframes drawLightning {
    0% { stroke-dashoffset: 50; opacity: 0; }
    20% { stroke-dashoffset: 0; opacity: 1; }
    40% { opacity: 0.8; }
    60% { opacity: 0.4; }
    100% { opacity: 0; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-bar-container {
        top: 70px;
    }
    
    .nav-bar-items {
        width: 150px;
    }
}