/* 移动端导航栏样式 */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
    z-index: 1001;
}

/* 电脑端小屏幕、平板、移动端样式 */
@media screen and (max-width: 1200px) {
    .mobile-menu-btn {
        display: block;
    }

    .navbar {
        padding: 1rem 2rem !important;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: 80px 30px 30px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        margin: 12px 0;
        font-size: 1.2rem;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateX(0);
    }

    /* 为每个链接添加延迟动画 */
    .nav-links a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links a:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links a:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-links a:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-links a:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-links a:nth-child(6) {
        transition-delay: 0.6s;
    }

    .nav-links a:nth-child(7) {
        transition-delay: 0.7s;
    }

    .nav-links a:nth-child(8) {
        transition-delay: 0.8s;
    }

    .nav-links a:nth-child(9) {
        transition-delay: 0.9s;
    }

    .nav-links a:nth-child(10) {
        transition-delay: 1s;
    }
}

/* 移动端特定样式 */
@media screen and (max-width: 768px) {
    .nav-links {
        width: 90%;
        padding: 70px 20px 20px;
    }

    .nav-links a {
        font-size: 1.1rem;
        margin: 8px 0;
        padding: 8px 0;
    }
}

/* 添加遮罩层 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* 优化导航栏在不同状态下的显示 */
.navbar {
    transition: all 0.3s ease;
}

@media screen and (max-width: 1024px) {

    .navbar.scroll-up,
    .navbar.scroll-down {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
    }
}