/**
 * Mobile Bottom Navigation - Enhanced Edition
 * Modern, colorful, and animated bottom navigation bar
 */

/* ========== MOBILE NAV BASE ========== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Glassmorphism effect */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.75rem 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 1000;
    /* Enhanced shadow for prominence */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08), 0 -2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .mobile-nav {
    background: rgba(31, 41, 55, 0.95);
    border-top: 1px solid rgba(75, 85, 99, 0.6);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3), 0 -2px 8px rgba(0, 0, 0, 0.2);
}

/* Hide on desktop */
@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
}

/* ========== NAV ITEMS ========== */
.mobile-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
    max-width: 80px;
    border: none;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border-radius: 12px;
}

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

/* Individual Icon Colors */
.mobile-nav .nav-item:nth-child(1) svg {
    color: #10b981;
    /* Home - Green */
}

.mobile-nav .nav-item:nth-child(2) svg {
    color: #f59e0b;
    /* Gundem - Amber */
}

.mobile-nav .nav-item:nth-child(3) svg {
    color: #3b82f6;
    /* Notifications - Blue */
}

.mobile-nav .nav-item:nth-child(4) svg {
    color: #8b5cf6;
    /* Messages - Purple */
}

.mobile-nav .nav-item:nth-child(5) svg {
    color: #ec4899;
    /* Profile - Pink */
}

.mobile-nav .nav-item:nth-child(6) svg {
    color: #6366f1;
    /* Settings - Indigo */
}

/* Icons */
.mobile-nav .nav-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Icon hover animation */
.mobile-nav .nav-item:active svg {
    transform: scale(1.1);
}

/* Labels */
.mobile-nav .nav-item span:not(.badge) {
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.dark .mobile-nav .nav-item {
    color: #9ca3af;
}

/* ========== ACTIVE STATE ========== */
.mobile-nav .nav-item.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.1));
    transform: translateY(-2px);
}

.mobile-nav .nav-item.active svg {
    stroke-width: 2.5;
    transform: scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(34, 197, 94, 0.3));
}

/* Individual active colors */
.mobile-nav .nav-item.active:nth-child(1) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    color: #10b981;
}

.mobile-nav .nav-item.active:nth-child(2) {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
    color: #f59e0b;
}

.mobile-nav .nav-item.active:nth-child(3) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
    color: #3b82f6;
}

.mobile-nav .nav-item.active:nth-child(4) {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.1));
    color: #8b5cf6;
}

.mobile-nav .nav-item.active:nth-child(5) {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(219, 39, 119, 0.1));
    color: #ec4899;
}

.mobile-nav .nav-item.active:nth-child(6) {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(79, 70, 229, 0.1));
    color: #6366f1;
}

.dark .mobile-nav .nav-item.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.15));
}

/* ========== BADGE (Notification count) ========== */
.mobile-nav .nav-item .badge {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 1.125rem;
    height: 1.125rem;
    border-radius: 0.563rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
    }
}

.dark .mobile-nav .nav-item .badge {
    border-color: #1f2937;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

/* ========== HOVER EFFECTS (Desktop fallback) ========== */
@media (min-width: 769px) {
    .mobile-nav .nav-item:hover {
        background: rgba(34, 197, 94, 0.1);
        transform: translateY(-2px);
    }

    .mobile-nav .nav-item:hover svg {
        transform: scale(1.1);
    }
}

/* ========== SAFE AREA SUPPORT (iPhone) ========== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-nav {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }
}

/* ========== RIPPLE EFFECT ========== */
.mobile-nav .nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
}

.mobile-nav .nav-item:active::before {
    width: 120%;
    height: 120%;
}

/* ========== SLIDE ANIMATIONS ========== */
@keyframes slideUpNav {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDownNav {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.mobile-nav.slide-up {
    animation: slideUpNav 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.slide-down {
    animation: slideDownNav 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== ICON ENTRANCE ANIMATION ========== */
.mobile-nav .nav-item {
    animation: navItemFadeIn 0.5s ease backwards;
}

.mobile-nav .nav-item:nth-child(1) {
    animation-delay: 0.05s;
}

.mobile-nav .nav-item:nth-child(2) {
    animation-delay: 0.1s;
}

.mobile-nav .nav-item:nth-child(3) {
    animation-delay: 0.15s;
}

.mobile-nav .nav-item:nth-child(4) {
    animation-delay: 0.2s;
}

.mobile-nav .nav-item:nth-child(5) {
    animation-delay: 0.25s;
}

.mobile-nav .nav-item:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes navItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}