/* Mobile bottom navigation: Apple Style Glassmorphism */
:root {
    --brand: #007AFF;
    /* Apple Blue */
    --brand-contrast: #ffffff;
    --nav-bg: rgba(22, 22, 22, 0.85);
    /* Dark Translucent */
    --inactive-color: #8E8E93;
    /* Apple Grey */
    --pill-radius: 40px;
}

/* 1. Desktop Reset: ALWAYS HIDDEN */
.bottom-nav {
    display: none !important;
}

/* 2. Mobile Styles */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 10px;
        /* Reduced margin */
        left: 50%;
        transform: translateX(-50%);
        width: 92%;
        max-width: 420px;
        background-color: var(--nav-bg);
        border-radius: var(--pill-radius);
        padding: 5px;
        /* Tight padding like iOS dock */
        justify-content: space-between;
        align-items: center;

        /* Apple Glass Effect */
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border: 0.5px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        z-index: 9999;
    }

    /* Tab Items */
    .bottom-nav .tab-item {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 14px;
        border-radius: var(--pill-radius);
        color: var(--inactive-color);
        text-decoration: none;
        transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        /* Smooth spring */
        position: relative;
        overflow: hidden;
        flex-shrink: 1;
        background: transparent;
    }

    /* Icons */
    .bottom-nav .tab-icon {
        font-size: 20px;
        margin-bottom: 0;
        line-height: 1;
        display: block;
        transition: transform 0.2s ease;
    }

    /* Text */
    .bottom-nav .tab-text {
        display: none;
        font-size: 13px;
        font-weight: 600;
        margin-left: 8px;
        white-space: nowrap;
        opacity: 0;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
        letter-spacing: -0.2px;
    }

    /* Active State */
    .bottom-nav .tab-item.is-active {
        background-color: var(--brand);
        color: var(--brand-contrast);
        flex-grow: 1;
        flex-shrink: 0;
        padding: 10px 18px;
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    }

    .bottom-nav .tab-item.is-active .tab-text {
        display: block;
        opacity: 1;
        transform: translateX(0);
    }

    /* Active Icon Animation */
    .bottom-nav .tab-item.is-active .tab-icon {
        transform: scale(1.05);
    }

    /* Tap Feedback */
    .bottom-nav .tab-item:active {
        transform: scale(0.96);
        opacity: 0.8;
    }
}