* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #050608 0%, #465058 100%);
    min-height: 100vh;
}

.primary-gradient {
    background: linear-gradient(135deg, #228fc3 0%, #1a6b8f 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.mining-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Animation for the mobile menu */
@keyframes slide-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slide-up 0.3s ease-out;
}

/* --- Chatbase Widget Fixes --- */
/* Fix Chatbase widget positioning on mobile - AGGRESSIVE APPROACH */

/* Global override for all Chatbase elements */
div[class*="chatbase"],
.chatbase-chat-window,
.chatbase-bubble-button,
[class*="chatbase"] {
    bottom: 140px !important;
    right: 16px !important;
    z-index: 9999 !important;
}

@media (max-width: 767px) {
    /* Ultra-specific targeting to override Chatbase styles */
    div[class*="chatbase"],
    .chatbase-chat-window,
    .chatbase-bubble-button,
    [class*="chatbase"],
    div[class*="chatbase"] div,
    div[class*="chatbase"] button {
        bottom: 140px !important;
        right: 16px !important;
        left: auto !important;
        top: auto !important;
        z-index: 9999 !important;
        position: fixed !important;
    }
    
    /* Force chat window position */
    .chatbase-chat-window {
        bottom: 140px !important;
        right: 16px !important;
        left: auto !important;
        max-height: calc(100vh - 160px) !important;
        height: auto !important;
        width: calc(100vw - 32px) !important;
        max-width: 400px !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
        position: fixed !important;
    }
    
    /* Force bubble button position */
    .chatbase-bubble-button {
        bottom: 140px !important;
        right: 16px !important;
        left: auto !important;
        top: auto !important;
        position: fixed !important;
    }
}
    
    /* Fix chat input disappearing issue */
    .chatbase-chat-input,
    .chatbase-input-container,
    [class*="input"] {
        position: relative !important;
        z-index: 1001 !important;
        background: white !important;
        border: 1px solid #e5e7eb !important;
        padding: 12px !important;
        margin: 8px !important;
        border-radius: 8px !important;
    }
    
    /* Ensure chat content stays visible when typing */
    .chatbase-chat-messages,
    .chatbase-message-container {
        max-height: calc(100vh - 200px) !important;
        overflow-y: auto !important;
        background: white !important;
    }
    
    /* Fix mobile keyboard issues */
    .chatbase-chat-window {
        position: fixed !important;
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        max-width: calc(100vw - 32px) !important;
    }

/* Additional fixes for all screen sizes */
.chatbase-chat-window {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.chatbase-bubble-button {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
}

.chatbase-bubble-button:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}
    /* Target product card grid in MarketplacePage.js and add a clear gap */
    .product-grid-mobile {
        gap: 0.75rem !important; /* 12px gap between cards */
    }

    /* Target ProductCard component. 
       This selector assumes direct child of grid is card's root element. */
    .product-grid-mobile > * {
        box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.05) !important; /* Subtle shadow for separation */
        border-radius: 0.5rem !important; /* Restore some radius for card look */
    }

    /* Target CategoryFilter component. 
       This assumes filter has a container element we can style. 
       Add class "category-filter-container" to its root div. */
    .category-filter-container {
        background-color: transparent !important;
        box-shadow: none !important;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
        margin-left: -1rem; /* Counteract container padding */
        margin-right: -1rem; /* Counteract container padding */
    }

    /* Target product grid container to make it full width */
    .product-grid-container-mobile {
        border-radius: 0 !important;
        /* Use negative margins to break out of parent container's padding */
        margin-left: -1rem; /* This should match parent's px-4 padding */
        margin-right: -1rem; /* This should match parent's px-4 padding */
        width: calc(100% + 2rem); /* Expand to fill new space */
        padding: 0.75rem !important; /* 12px padding around grid */
    }
}
