/* Mobile-specific optimizations for Sarro Reloaded - Portrait Only */

/* Prevent all touch behaviors that could interfere */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

/* Ensure full screen coverage */
html, body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #000;
}

/* Canvas positioning for mobile */
canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover;
  background: #000;
  transform: translateZ(0);
}

/* iPhone specific adjustments */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-top: max(0px, env(safe-area-inset-top));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
}

/* Prevent zoom on double tap */
@media screen and (max-width: 768px) {
  html {
    touch-action: manipulation;
  }
  
  body {
    touch-action: none;
  }
}

/* Force portrait orientation */
@media screen and (orientation: landscape) {
  body::before {
    content: "Por favor, gire seu dispositivo para a posição vertical";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    text-align: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
  }
  
  canvas {
    display: none !important;
  }
}

/* Portrait orientation optimizations */
@media screen and (orientation: portrait) {
  canvas {
    width: 100vw !important;
    height: 100vh !important;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  canvas {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Mobile devices only */
@media screen and (max-width: 768px) {
  /* Ensure portrait lock */
  html {
    transform: rotate(0deg);
  }
  
  body {
    transform: rotate(0deg);
  }
} 