/*
 * Bottom Navigation - V4.1 (Robust Centering & Desktop Filter Hide)
 */
:root {
    --nav-height: 65px;
    --nav-background: #ffffff;
    --nav-shadow-color: rgba(44, 62, 80, 0.15);
    --indicator-bg: #009a77;
    --icon-inactive: #8e8e93;
    --text-inactive: #8e8e93;
    --icon-active: #ffffff;
    --text-active: #ffffff;
    --transition-pill: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body {
    padding-bottom: calc(var(--nav-height) + 20px);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--nav-background);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.07);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    position: relative;
}

.nav-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    z-index: 2;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    height: 100%;
    color: var(--text-inactive);
    background-color: transparent;
    border: none;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.nav-link .icon {
    width: 26px;
    height: 26px;
    fill: var(--icon-inactive);
    transition: all var(--transition-pill);
}

.nav-link .text {
    font-size: 10px;
    margin-top: 2px;
    font-weight: 500;
    transition: all var(--transition-pill);
}

.nav-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 42px;
    background-color: var(--indicator-bg);
    border-radius: 21px;
    box-shadow: 0 4px 12px rgba(0, 154, 119, 0.3);
    z-index: 1;
    transition: left var(--transition-pill), width var(--transition-pill);
}

.nav-link.active .icon {
    fill: var(--icon-active);
}

.nav-link.active .text {
    color: var(--text-active);
    font-weight: 600;
}

#install-item {
    display: none;
}

#install-item.visible {
    display: flex;
}

/* --- Desktop Styles --- */
@media (min-width: 769px) {
    body {
        padding-bottom: 0;
    }

    .bottom-nav {
        /* **THE FIX IS HERE: Robust centering using margin auto** */
        width: 480px;
        left: 0;  /* Reset left */
        right: 0; /* Reset right */
        margin-left: auto;
        margin-right: auto;
        bottom: 20px;
        border-radius: 32.5px;
        box-shadow: 0 8px 25px var(--nav-shadow-color);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    li#footer-filter-item {
        display: none !important;
    }
}