html, body {
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none; /* Completely prevent horizontal scrolling */
}

/* Hide scrollbars globally while preserving scroll functionality */
html, body, .container, .item-shop-modal, .item-shop-overlay, .armor-shop-overlay, .minecraft-inventory-modal {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

/* Webkit browsers */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.container::-webkit-scrollbar,
.item-shop-modal::-webkit-scrollbar,
.item-shop-overlay::-webkit-scrollbar,
.armor-shop-overlay::-webkit-scrollbar,
.minecraft-inventory-modal::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overscroll-behavior-y: contain; /* Prevent bounce effect on some browsers */
}

/* Keep container scrollable but without visible scrollbar */
.container {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: none; /* Prevent horizontal scrolling for container */
}

/* Ensure no horizontal scrolling for specific elements */
.container > * {
    max-width: 100%;
    overflow-x: hidden;
}

/* Prevent pinch-zoom and horizontal scroll on mobile */
html {
    touch-action: pan-y;
}