* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
}

#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  font-family: 'Arial', sans-serif;
  font-size: 18px;
  text-align: center;
  flex-direction: column;
}

/* Loader animado */
.loader {
  width: 40px;
  height: 40px;
  border: 4px solid white;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Para debugging en caso necesario */
.interaction-area {
  /* Esta clase puede hacerse visible en versión debug */
  /* background-color: rgba(255, 0, 0, 0.3); */ /* Descomenta para debug */
}

/* Soporte para debug mode con clase en el body */
body.debug .interaction-area {
  background-color: rgba(255, 0, 0, 0.5) !important;
  opacity: 0.7 !important;
}

/* Mejorar el rendimiento en dispositivos móviles */
a-scene {
  touch-action: pan-x pan-y;
}