/* 科技感导航菜单样式 */
.main-nav {
    display: flex;
    justify-content: center;
    margin: 0 40px;
    flex: 0 1 auto; /* 允许根据内容缩放，但不应过度压缩 */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
    padding: 0;
    margin: 0;
    flex-wrap: nowrap; /* 严禁换行 */
}

.nav-item {
    position: relative;
    padding: 0 12px;
}

.nav-item a {
    display: block;
    padding: 10px 22px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    white-space: nowrap; /* 核心修复：防止文字垂直堆叠 */
    text-align: center;
}

.nav-item a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--primary-glow), transparent);
    transform: translate(-50%, -50%);
    transition: all 0.5s;
    z-index: -1;
    border-radius: 50%;
    opacity: 0;
}

.nav-item:hover a {
    color: var(--primary);
    text-shadow: 0 0 12px var(--primary-glow);
}

.nav-item:hover a::before {
    width: 150px;
    height: 150px;
    opacity: 1;
}

/* 科技感导航项活跃状态优化 */
.nav-item.active a {
    color: var(--primary) !important;
    background: rgba(0, 229, 255, 0.12) !important;
    border: 1px solid rgba(0, 229, 255, 0.45) !important;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.25), inset 0 0 10px rgba(0, 229, 255, 0.1);
    transform: translateY(-2px);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 4px;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary), 0 0 30px var(--primary);
    border-radius: 4px;
    animation: glow-pulse 1.5s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes glow-pulse {
    0% { opacity: 0.4; width: 24px; box-shadow: 0 0 10px var(--primary); }
    100% { opacity: 1; width: 40px; box-shadow: 0 0 25px var(--primary), 0 0 45px var(--primary); }
}

/* 科技感按钮样式 */
.btn {
    padding: 10px 24px;
    border: 1px solid var(--border-line);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #00b8d4);
    color: #001a1a;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.4);
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 229, 255, 0.6);
    filter: brightness(1.2);
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: 0.6s;
    pointer-events: none;
    opacity: 0;
}

.btn-primary:hover::after {
    left: 100%;
    opacity: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-bright);
    border-color: var(--border-line);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

/* 响应式导航 */
@media (max-width: 1024px) {
    .main-nav {
        margin: 0 30px;
    }
    .nav-item a {
        padding: 8px 14px;
        font-size: 13px;
    }
}
