/* ========================================
   BOTTOM NAVIGATION BAR - Premium Mobile App Style
   iOS + Android Compatible
   ======================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(56, 239, 125, 0.1);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 99999;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

/* Show on mobile only */
@media (max-width: 991px) {
    .bottom-nav {
        display: flex;
    }
}

/* Hide on scroll down (optional - uncomment if needed) */
.bottom-nav.hidden {
    transform: translateY(100%);
}

/* Navigation Item */
.nav-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    padding: 6px 4px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

/* Icon */
.nav-item i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Label */
.nav-item span {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Active State */
.nav-item.active {
    color: #38ef7d;
}

.nav-item.active i {
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 0 12px rgba(56, 239, 125, 0.6));
}

.nav-item.active span {
    font-weight: 700;
}

/* Active Indicator */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #11998e, #38ef7d);
    border-radius: 0 0 3px 3px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Hover State (for desktop testing) */
.nav-item:hover {
    color: #ffffff;
}

.nav-item:hover i {
    transform: translateY(-2px);
}

/* Floating Action Button (Center Button) */
.fab-nav {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -25px;
    border: 3px solid #020617 !important;
    color: #000 !important;
    box-shadow:
        0 8px 15px rgba(56, 239, 125, 0.3);
    animation: pulse 2s infinite;
    position: relative;
    overflow: hidden;
    z-index: 10;
    flex: none !important;
    /* Forces perfect circle, prevents oval stretch */
}

.fab-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.fab-nav:active::before {
    width: 100px;
    height: 100px;
}

@keyframes pulse {
    0% {
        box-shadow:
            0 8px 20px rgba(56, 239, 125, 0.4),
            0 0 0 0 rgba(56, 239, 125, 0.4);
    }

    50% {
        box-shadow:
            0 8px 20px rgba(56, 239, 125, 0.4),
            0 0 0 10px rgba(56, 239, 125, 0);
    }

    100% {
        box-shadow:
            0 8px 20px rgba(56, 239, 125, 0.4),
            0 0 0 0 rgba(56, 239, 125, 0);
    }
}

.fab-nav i {
    font-size: 1.3rem;
    font-weight: 700;
    z-index: 1;
}

.fab-nav span {
    display: none;
}

/* Ripple Effect on Click */
.nav-item:active {
    transform: scale(0.95);
}

/* iOS Safe Area Support */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(15, 23, 42, 0.98);
        border-top-color: rgba(56, 239, 125, 0.15);
    }
}

/* Light Mode Support */
@media (prefers-color-scheme: light) {
    .bottom-nav {
        background: rgba(255, 255, 255, 0.95);
        border-top-color: rgba(0, 0, 0, 0.1);
    }

    .nav-item {
        color: #64748b;
    }

    .nav-item.active {
        color: #11998e;
    }

    .fab-nav {
        border-color: rgba(255, 255, 255, 1);
    }
}

/* Notification Badge (for future use) */
.nav-item .badge {
    position: absolute;
    top: 4px;
    right: 20%;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    border: 2px solid rgba(15, 23, 42, 1);
}

/* Smooth Transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Accessibility */
.nav-item:focus {
    outline: 2px solid #38ef7d;
    outline-offset: 2px;
}

/* Animation on Load */
.bottom-nav {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Prevent content from being hidden behind nav */
@media (max-width: 991px) {
    body {
        padding-bottom: 70px;
    }
}

/* Premium Glow Effect on Active */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(56, 239, 125, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.2);
    }
}