/* 底部导航栏 - 简洁毛玻璃风格 */

/* 本版本暂不提供「模板」底栏入口（保留 DOM 便于后续恢复） */
.bottom-navigation .nav-item[data-page="template"] {
    display: none !important;
}

.bottom-navigation {
    position: fixed !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 12px;
    z-index: 9999 !important;
    box-sizing: border-box;
    box-shadow: 0 -14px 28px rgba(15, 23, 42, 0.08);
}

/* 导航项 */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
    position: relative;
    min-width: 56px;
    -webkit-tap-highlight-color: transparent;
}

.nav-item::after {
    display: none;
}

/* 导航图标容器 */
.nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.nav-icon::before {
    display: none;
}

/* 导航图片 */
.nav-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: filter 0.2s ease;
}

/* 导航标签 */
.nav-label {
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
    transition: color 0.2s ease;
}

/* 底部活跃指示条 */
.nav-active-indicator {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2.5px;
    background: linear-gradient(90deg, #3b82f6, #0ea5e9);
    border-radius: 2px;
    transition: transform 0.25s ease;
}

/* 活跃状态 */
.nav-item.active .nav-icon {
    background: linear-gradient(135deg, #0f172a, #334155);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.nav-item.active .nav-img {
    filter: brightness(0) invert(1);
}

.nav-item.active .nav-label {
    color: #0f172a;
    font-weight: 600;
}

.nav-item.active .nav-active-indicator {
    transform: translateX(-50%) scaleX(1);
}

/* 悬停效果 */
.nav-item:hover:not(.active) .nav-icon {
    background: rgba(59, 130, 246, 0.08);
}

.nav-item:hover:not(.active) .nav-label {
    color: #6b7280;
}

/* 点击效果 */
.nav-item:active {
    opacity: 0.7;
}

/* 页面个性化颜色 */
.nav-item[data-page="create"].active .nav-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.nav-item[data-page="create"].active .nav-label {
    color: #10b981;
}

.nav-item[data-page="create"].active .nav-active-indicator {
    background: linear-gradient(90deg, #34d399, #10b981);
}

.nav-item[data-page="ai"].active .nav-icon {
    background: linear-gradient(135deg, #3b82f6, #0ea5e9);
}

.nav-item[data-page="ai"].active .nav-label {
    color: #3b82f6;
}

.nav-item[data-page="ai"].active .nav-active-indicator {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.nav-item[data-page="template"].active .nav-icon {
    background: linear-gradient(135deg, #f59e0b, #fb7185);
}

.nav-item[data-page="template"].active .nav-label {
    color: #f59e0b;
}

.nav-item[data-page="template"].active .nav-active-indicator {
    background: linear-gradient(90deg, #f59e0b, #fb7185);
}

.nav-item[data-page="profile"].active .nav-icon {
    background: linear-gradient(135deg, #ef4444, #fb7185);
}

.nav-item[data-page="profile"].active .nav-label {
    color: #ef4444;
}

.nav-item[data-page="profile"].active .nav-active-indicator {
    background: linear-gradient(90deg, #ef4444, #fb7185);
}

/* 大屏居中 */
@media (min-width: 431px) {
    .bottom-navigation {
        max-width: 460px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
    }
}

/* 内容容器底部留白 */
.main-content,
.page-container,
.container,
.app-container {
    padding-bottom: 60px;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    .bottom-navigation {
        background: rgba(15, 17, 23, 0.92);
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    .nav-label {
        color: #6b7280;
    }

    .nav-item:hover:not(.active) .nav-icon {
        background: rgba(255, 255, 255, 0.06);
    }

    .nav-item:hover:not(.active) .nav-label {
        color: #9ca3af;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .nav-item,
    .nav-icon,
    .nav-img,
    .nav-label,
    .nav-active-indicator {
        transition: none;
    }
}

/* 触摸设备 */
@media (hover: none) and (pointer: coarse) {
    .nav-item:hover:not(.active) .nav-icon {
        background: transparent;
    }

    .nav-item:hover:not(.active) .nav-label {
        color: #9ca3af;
    }
}
