/**
 * 底部导航样式 - nav.css
 */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid rgba(16, 174, 255, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 5.5px 0 calc(5.5px + env(safe-area-inset-bottom));
    z-index: 999;
    box-shadow: 0 -3px 15px rgba(16, 174, 255, 0.1);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 4px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #999;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-item:hover {
    color: #10AEFF;
}

.nav-item.active {
    color: #10AEFF;
}

/* 激活状态下的背景装饰 */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 3px;
    background: linear-gradient(90deg, #10AEFF 0%, #0A8FCC 100%);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 2px 8px rgba(16, 174, 255, 0.3);
}

.nav-icon {
    font-size: 18px;
    margin-bottom: 3px;
    display: block;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
}

/* 激活状态的图标背景 */
.nav-item.active .nav-icon {
    background: linear-gradient(135deg, #10AEFF 0%, #0A8FCC 100%);
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(16, 174, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-text {
    font-size: 9px;
    font-weight: 600;
    display: block;
    transition: all 0.3s ease;
}

.nav-item.active .nav-text {
    font-weight: 700;
    color: #10AEFF;
    transform: scale(1.05);
}

/* 图标悬停效果 */
.nav-item:hover .nav-icon {
    transform: scale(1.1) translateY(-2px);
}

/* 激活状态动画 */
.nav-item.active .nav-icon {
    animation: navBounce 0.5s ease;
}

@keyframes navBounce {
    0%, 100% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.15);
    }
    60% {
        transform: scale(0.95);
    }
}

/* 点击效果 */
.nav-item:active .nav-icon {
    transform: scale(0.95);
}

.nav-item:active {
    transform: scale(0.98);
}

/* 中间发布按钮特殊样式 */
.nav-item-center {
    position: relative;
    margin-top: -15px;
}

.nav-item-center .nav-icon-center {
    width: 42px;
    height: 42px;
    line-height: 42px;
    background: linear-gradient(135deg, #10AEFF 0%, #0A8FCC 100%);
    color: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(16, 174, 255, 0.4);
    font-size: 20px;
    margin-bottom: 3px;
    border: 2.5px solid white;
    transition: all 0.3s ease;
}

.nav-item-center:hover .nav-icon-center {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 174, 255, 0.5);
}

.nav-item-center.active .nav-icon-center {
    background: linear-gradient(135deg, #10AEFF 0%, #52B6FF 100%);
    box-shadow: 0 4px 15px rgba(82, 182, 255, 0.5);
}

.nav-item-center .nav-text {
    color: #10AEFF;
    font-weight: 700;
}

/* 响应式 */
@media (min-width: 768px) {
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
        margin-bottom: 7.5px;
        box-shadow: 0 -4px 30px rgba(16, 174, 255, 0.15);
    }
}

/* iPhone X 及以上适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(7.5px + env(safe-area-inset-bottom));
    }
}
