.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom, 0));
    z-index: 998;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 0.3rem;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.4rem 0.2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.6rem;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    border-radius: var(--radius);
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.92);
}

.mobile-bottom-nav .nav-item .nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
}

.mobile-bottom-nav .nav-item .nav-icon i {
    font-size: 1.05rem;
    transition: all 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mobile-bottom-nav .nav-item .nav-label {
    font-size: 0.58rem;
    line-height: 1.2;
    transition: all 0.25s ease;
    white-space: nowrap;
}

/* ===== Active State ===== */
.mobile-bottom-nav .nav-item.active {
    color: var(--accent-light);
}

.mobile-bottom-nav .nav-item.active .nav-icon {
    background: var(--accent-glow);
    color: var(--accent-light);
}

.mobile-bottom-nav .nav-item.active .nav-icon i {
    transform: translateY(-1px);
}

.mobile-bottom-nav .nav-item.active .nav-label {
    font-weight: 800;
}

.mobile-bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: -0.4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 0 0 4px 4px;
}

.mobile-bottom-nav .nav-item .nav-badge {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: white;
    border-radius: 50px;
    font-size: 0.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
    box-sizing: content-box;
}

[data-theme="light"] .mobile-bottom-nav .nav-item .nav-badge {
    border-color: #ffffff;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: block;
    }

    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0)) !important;
    }

    .back-to-top {
        bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
        right: 16px !important;
    }

    .welcome-toast {
        bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
    }

    .toast {
        bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
    }

    .footer {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
    }
}

@media (max-width: 360px) {
    .mobile-bottom-nav .nav-item .nav-icon {
        width: 28px;
        height: 28px;
    }

    .mobile-bottom-nav .nav-item .nav-icon i {
        font-size: 0.95rem;
    }

    .mobile-bottom-nav .nav-item .nav-label {
        font-size: 0.52rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .mobile-bottom-nav {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}