/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  background: #1E1E1E;
  
  /* Prevent scrolling and bouncing */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  
  /* Support for safe areas on notched devices */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#app {
  width: 100vw;
  height: 100vh;
  /* Use dvh if supported (dynamic viewport height) */
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
}

#pixi-container {
  width: 100%;
  height: 100%;
  position: relative;
  touch-action: manipulation;
}

/* Prevent text selection and highlighting */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Force hardware acceleration */
#app, #pixi-container {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/* Hide address bar on mobile browsers */
@media screen and (max-width: 768px) {
  html {
    height: -webkit-fill-available;
  }
  
  body {
    height: -webkit-fill-available;
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
  
  #app {
    height: -webkit-fill-available;
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
}

/* Additional styles for better mobile experience */
@supports (height: 100dvh) {
  #app {
    height: 100dvh;
  }
}

@supports (height: 100svh) {
  #app {
    height: 100svh;
  }
}
