/* ============================================
   底部浮动导航栏 - 毛玻璃风格
   yang-mdui-nav.css
   ============================================ */

.bottom-nav {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 8px 16px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    pointer-events: none;
}

.bottom-nav-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    flex-wrap: wrap;
    width: fit-content !important;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 8px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 -1px 24px rgba(0, 0, 0, 0.06),
        0 8px 40px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    pointer-events: auto;
}

/* ---- 导航按钮 ---- */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-radius: 18px;
    text-decoration: none;
    color: #555;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-width: 100px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
    transform: translateY(-3px);
}

.bottom-nav-item:active {
    transform: translateY(0) scale(0.94);
    transition-duration: 0.08s;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

/* ---- 选中态（蓝色） ---- */
.bottom-nav-item.active {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: #fff;
    border-color: rgba(26, 115, 232, 0.25);
    box-shadow:
        0 4px 18px rgba(66, 133, 244, 0.35),
        0 1px 3px rgba(66, 133, 244, 0.2);
}

.bottom-nav-item.active:hover {
    background: linear-gradient(135deg, #5a95f5 0%, #2b7de9 100%);
    box-shadow:
        0 6px 22px rgba(66, 133, 244, 0.4),
        0 2px 6px rgba(66, 133, 244, 0.25);
    transform: translateY(-3px);
}

.bottom-nav-item.active:active {
    transform: translateY(0) scale(0.94);
    transition-duration: 0.08s;
}

.bottom-nav-item.active .bottom-nav-item-icon {
    color: #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

.bottom-nav-item.active .bottom-nav-item-label {
    color: #fff;
    font-weight: 600;
}

/* ---- 图标 ---- */
.bottom-nav-item-icon {
    font-size: 32px;
    margin-bottom: 6px;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
}

.bottom-nav-item:hover .bottom-nav-item-icon {
    transform: scale(1.12);
}

/* ---- 文字标签 ---- */
.bottom-nav-item-label {
    font-size: 20px;
    line-height: 1.3;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* ---- 点击涟漪效果 ---- */
.bottom-nav-item .nav-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(66, 133, 244, 0.25);
    transform: scale(0);
    animation: navRipple 0.55s ease-out forwards;
    pointer-events: none;
}

.bottom-nav-item.active .nav-ripple {
    background: rgba(255, 255, 255, 0.35);
}

@keyframes navRipple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ---- 退出按钮特殊样式 ---- */
.bottom-nav-item.nav-logout {
    color: #e53935;
}

.bottom-nav-item.nav-logout .bottom-nav-item-icon {
    color: #e53935;
}

.bottom-nav-item.nav-logout .bottom-nav-item-label {
    color: #e53935;
}

.bottom-nav-item.nav-logout:hover {
    background: rgba(229, 57, 53, 0.06);
    box-shadow: 0 2px 14px rgba(229, 57, 53, 0.08);
}

.bottom-nav-item.nav-logout:active {
    background: rgba(229, 57, 53, 0.12);
}

/* ---- 外部链接小圆点标记 ---- */
.bottom-nav-item.nav-external::after {
    content: '';
    position: absolute;
    top: 7px;
    right: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
}

.bottom-nav-item.nav-external.active::after {
    background: rgba(255, 255, 255, 0.5);
}

/* ---- 问候语区域 ---- */
.bottom-nav-greeting {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    white-space: nowrap;
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

.bottom-nav-greeting .material-icons {
    font-size: 16px;
    color: #667eea;
}

/* ---- 响应式适配 ---- */
@media (max-width: 768px) {
    .bottom-nav {
        padding: 6px 8px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom));
    }

    .bottom-nav-inner {
        gap: 5px;
        padding: 8px 10px;
        border-radius: 18px;
    }

    .bottom-nav-item {
        padding: 12px 16px;
        min-width: 80px;
        border-radius: 14px;
    }

    .bottom-nav-item-icon {
        font-size: 26px;
    }

    .bottom-nav-item-label {
        font-size: 16px;
    }

    .bottom-nav-greeting {
        padding: 8px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .bottom-nav-item {
        padding: 10px 12px;
        min-width: 68px;
    }

    .bottom-nav-item-icon {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .bottom-nav-item-label {
        font-size: 14px;
    }
}

/* ---- body 底部留白 ---- */
body.has-bottom-nav {
    padding-bottom: 180px !important;
}

@media (max-width: 768px) {
    body.has-bottom-nav {
        padding-bottom: 150px !important;
    }
}
