/* 移动端底部导航栏 */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    /* 为底部导航腾出空间 */
    body {
        padding-bottom: 60px;
    }

    .footer {
        padding-bottom: 80px;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #64748b;
    text-decoration: none;
    font-size: 10px;
    padding: 5px 10px;
    transition: color 0.3s;
    position: relative;
    min-width: 60px;
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-nav-item.active {
    color: #2563eb;
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #2563eb;
    border-radius: 0 0 3px 3px;
}

.mobile-nav-item:hover {
    color: #2563eb;
}

/* 徽章 */
.mobile-nav-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(calc(50% + 12px));
    background: #ef4444;
    color: white;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* 中心按钮（可选） */
.mobile-nav-center {
    margin-top: -20px;
}

.mobile-nav-center .mobile-nav-item {
    background: #2563eb;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.mobile-nav-center .mobile-nav-item i {
    font-size: 24px;
    margin: 0;
}

.mobile-nav-center .mobile-nav-item:active {
    transform: scale(0.95);
}

/* 动画 */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.mobile-bottom-nav {
    animation: slideUp 0.3s ease-out;
}

/* 隐藏在滚动时 */
.mobile-bottom-nav.hide-on-scroll {
    transform: translateY(100%);
    transition: transform 0.3s;
}

.mobile-bottom-nav.show-on-scroll {
    transform: translateY(0);
    transition: transform 0.3s;
}
