/* =================================
   Mobile Navigation Styles
   移动端导航栏专用样式
   ================================= */

/* 移动端导航栏 */
@media (max-width: 768px) {
    
    /* 导航栏基础样式 */
    nav {
        padding: 0.75rem 1rem !important;
        height: auto !important;
        min-height: 60px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative !important;
        z-index: 1000 !important;
    }
    
    /* Logo容器 */
    nav > div:first-child {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    
    /* Logo图片 */
    nav > div:first-child img {
        height: 2rem !important;
        width: auto !important;
    }
    
    /* Logo文字 */
    nav > div:first-child .text-xl {
        font-size: 1.25rem !important;
    }
    
    nav > div:first-child .text-xs {
        font-size: 0.75rem !important;
    }
    
    /* 移动端菜单按钮 */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
        background: none !important;
        border: none !important;
        color: #4299E1 !important;
        font-size: 1.25rem !important;
        cursor: pointer !important;
        border-radius: 0.375rem !important;
        transition: all 0.2s ease !important;
        z-index: 1001 !important;
    }
    
    .mobile-menu-btn:hover {
        background: rgba(66, 153, 225, 0.1) !important;
    }
    
    /* 桌面端菜单在移动端的处理 */
    #desktop-menu {
        display: none !important;
        position: absolute !important;
        top: calc(100% + 0.5rem) !important;
        left: 1rem !important;
        right: 1rem !important;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95)) !important;
        backdrop-filter: blur(20px) !important;
        border-radius: 1rem !important;
        padding: 1.5rem !important;
        box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        z-index: 999 !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
        transform: translateY(-10px) scale(0.95) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }
    
    /* 菜单显示状态 */
    #desktop-menu.show {
        display: flex !important;
        transform: translateY(0) scale(1) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* 菜单项样式 */
    #desktop-menu a {
        padding: 0.875rem 1rem !important;
        border-radius: 0.75rem !important;
        text-align: left !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        font-size: 1.125rem !important;
        font-weight: 500 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        position: relative !important;
        overflow: hidden !important;
        color: #374151 !important;
        background: transparent !important;
        border: 1px solid transparent !important;
    }
    
    #desktop-menu a::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: linear-gradient(135deg, rgba(66, 153, 225, 0.08), rgba(79, 172, 254, 0.08)) !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
        z-index: -1 !important;
    }
    
    #desktop-menu a:hover::before {
        opacity: 1 !important;
    }
    
    #desktop-menu a:hover {
        color: #4299E1 !important;
        border-color: rgba(66, 153, 225, 0.2) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(66, 153, 225, 0.15) !important;
    }
    
    /* 当前页面链接高亮 */
    #desktop-menu a.text-secondary {
        background: linear-gradient(135deg, rgba(66, 153, 225, 0.15), rgba(79, 172, 254, 0.15)) !important;
        color: #4299E1 !important;
        border-color: rgba(66, 153, 225, 0.3) !important;
        font-weight: 600 !important;
    }
    
    /* 移动端按钮样式 */
    #desktop-menu button {
        width: 100% !important;
        margin-top: 1rem !important;
        padding: 0.875rem 1rem !important;
        font-size: 1.125rem !important;
        font-weight: 600 !important;
        justify-content: center !important;
        border-radius: 0.75rem !important;
        background: linear-gradient(135deg, #4299E1, #3B82F6) !important;
        border: none !important;
        color: white !important;
        box-shadow: 0 4px 16px rgba(66, 153, 225, 0.3) !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    #desktop-menu button::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
        transition: left 0.5s ease !important;
    }
    
    #desktop-menu button:hover::before {
        left: 100% !important;
    }
    
    #desktop-menu button:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4) !important;
    }
    
    /* 菜单背景遮罩 */
    .mobile-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.2) !important;
        backdrop-filter: blur(4px) !important;
        z-index: 998 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .mobile-menu-overlay.show {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* 桌面端确保移动端菜单按钮隐藏 */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    nav {
        padding: 0.5rem 0.75rem !important;
    }
    
    #desktop-menu {
        left: 0.75rem !important;
        right: 0.75rem !important;
        padding: 0.875rem !important;
    }
    
    nav > div:first-child img {
        height: 1.75rem !important;
    }
    
    nav > div:first-child .text-xl {
        font-size: 1.125rem !important;
    }
    
    nav > div:first-child .text-xs {
        font-size: 0.625rem !important;
    }
}
