/* ============================================
   📱 BOTTOM NAVIGATION BAR - MOBILE ONLY
   ============================================ */

/* Hide bottom nav on desktop */
.bottom-navigation {
    display: none;
}

/* Hide bottom nav when modal or chat is open on mobile */
body.modal-open .bottom-navigation,
body.chat-open .bottom-navigation {
    display: none !important;
}

/* Show only on mobile */
@media (max-width: 768px) {
    .bottom-navigation {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
        border-radius: 25px 25px 0 0;
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
    }

    .bottom-navigation::before {
        content: '';
        position: absolute;
        top: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg,
                transparent,
                var(--primary),
                var(--accent),
                var(--primary),
                transparent);
    }

    .bottom-nav-item {
        position: relative;
        list-style: none;
        width: 70px;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    /* Active indicator dot */
    .bottom-nav-item::before {
        content: '';
        position: absolute;
        top: 8px;
        width: 5px;
        height: 5px;
        background: #333;
        border-radius: 50%;
        transition: all 0.5s ease;
        opacity: 0;
    }

    .bottom-nav-item.active::before {
        opacity: 1;
        background: var(--primary);
        box-shadow: 0 0 5px var(--primary),
            0 0 10px var(--primary),
            0 0 20px var(--primary);
    }

    .bottom-nav-item a {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-decoration: none;
        width: 100%;
        height: 100%;
        position: relative;
    }

    .bottom-nav-icon {
        position: relative;
        font-size: 1.5em;
        width: 55px;
        height: 55px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #aaa;
        border-radius: 50%;
        transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1;
    }

    /* Active state - icon pops up */
    .bottom-nav-item.active .bottom-nav-icon {
        background: linear-gradient(135deg, var(--primary) 0%, #ff8787 100%);
        color: #fff;
        transform: translateY(-32px);
        box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4),
            inset 2px 2px 5px rgba(255, 255, 255, 0.2),
            inset -3px -3px 7px rgba(0, 0, 0, 0.3);
    }

    /* Inner circle effect */
    .bottom-nav-icon::before {
        content: '';
        position: absolute;
        inset: 8px;
        background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
        border-radius: 50%;
        box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5),
            inset 2px 2px 3px rgba(255, 255, 255, 0.1),
            inset -2px -2px 5px rgba(0, 0, 0, 0.5);
        transform: scale(0);
        transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .bottom-nav-item.active .bottom-nav-icon::before {
        transform: scale(1);
    }

    /* Text label */
    .bottom-nav-text {
        position: absolute;
        bottom: 8px;
        font-size: 0.7em;
        color: #fff;
        font-weight: 600;
        opacity: 0;
        transform: translateY(10px);
        padding: 3px 12px;
        background: linear-gradient(135deg, var(--primary) 0%, #ff8787 100%);
        border-radius: 12px;
        box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
        transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        white-space: nowrap;
        pointer-events: none;
    }

    .bottom-nav-item.active .bottom-nav-text {
        opacity: 1;
        transform: translateY(0);
    }

    /* Badge for notifications */
    .bottom-nav-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        background: var(--error);
        color: white;
        font-size: 0.65em;
        font-weight: bold;
        min-width: 18px;
        height: 18px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        box-shadow: 0 2px 8px rgba(255, 71, 87, 0.5);
        animation: pulse 2s infinite;
    }

    @keyframes pulse {

        0%,
        100% {
            transform: scale(1);
            box-shadow: 0 2px 8px rgba(255, 71, 87, 0.5);
        }

        50% {
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(255, 71, 87, 0.8);
        }
    }

    /* Add bottom padding to main content to prevent overlap */
    .main-content {
        padding-bottom: 85px !important;
    }

    /* Hide desktop sidebar completely on mobile */
    #sidebar {
        display: none !important;
    }

    /* Hide sidebar toggle button */
    #sidebarToggle {
        display: none !important;
    }

    /* Adjust main content to full width */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* Top search bar improvements */
    .top-navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-brand {
        display: none;
        /* Hide logo on mobile to save space */
    }

    .nav-search {
        flex: 1;
        max-width: 100%;
        margin: 0 10px;
    }

    .nav-search form {
        width: 100%;
    }

    .nav-search input {
        width: 100%;
        padding: 10px 15px;
        border-radius: 25px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.05);
        color: var(--text);
        font-size: 0.9em;
    }

    .nav-actions {
        display: flex;
        gap: 8px;
    }

    .nav-action-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text);
        font-size: 1.1em;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .nav-action-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.1);
    }

    /* Adjust content sections for better mobile view */
    .content-section {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Welcome section adjustments */
    .welcome-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .welcome-section h2 {
        font-size: 1.3em;
        margin-bottom: 8px;
    }

    .welcome-section p {
        font-size: 0.9em;
        opacity: 0.8;
    }



    /* --- More Menu Content Styles --- */
    .more-menu-content {
        padding: 20px;
    }

    .more-menu-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .more-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 15px;
        transition: all 0.3s ease;
        cursor: pointer;
        text-align: center;
    }

    .more-item i {
        font-size: 1.8rem;
        margin-bottom: 10px;
        color: var(--primary);
    }

    .more-item span {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text);
    }

    .more-item:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.1);
    }

    .more-item.logout i {
        color: var(--error);
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .bottom-navigation {
        height: 65px;
    }

    .bottom-nav-item {
        width: 60px;
        height: 65px;
    }

    .bottom-nav-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3em;
    }

    .bottom-nav-text {
        font-size: 0.65em;
        padding: 2px 8px;
    }

    /* Store Page Mobile Adjustments */
    .store-page-header {
        padding: 20px 15px !important;
        margin-bottom: 20px !important;
    }

    .store-page-header h1 {
        font-size: 1.5rem !important;
    }

    .store-info-box {
        padding: 15px !important;
        margin-bottom: 20px !important;
        flex-direction: column;
        text-align: center;
    }
}