/* ====== RESET BÁSICO ====== */
:root{
  --ink:#fff;
  --accent:#95C11F;
}
*{
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-family:system-ui;
}
html, body{
  height:100%;
  overflow:hidden;
  background:#000;
}

/* ====== AR AL FONDO ====== */
#ar-container{
  position:fixed;
  inset:0;
  z-index:1;
}
a-scene,
canvas.a-canvas,
video.mindar-video{
  position:fixed !important;
  top:0;
  left:0;
  width:100vw !important;
  height:100vh !important;
  display:block !important;
  object-fit:cover !important;
  z-index:1 !important;
}

/* Cuando se pausa → ocultar cámara/escena */
.paused-lock video.mindar-video,
.paused-lock a-scene{
  opacity:0 !important;
  pointer-events:none !important;
}

/* ====== UI POR ENCIMA ====== */
#ui-layer{
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:none;
  isolation:isolate;
}

/* Modal al frente SIEMPRE */
#ui-layer .modal{
  pointer-events:auto;
  z-index:10000000 !important;
}

/* Scan overlay debajo del modal y encima del negro */
#ui-layer .scan-overlay{
  pointer-events:none !important;
  z-index:9999990 !important;
}

/* ====== LOADING ====== */
.loading-screen{
  position:fixed;
  inset:0;
  background:#ffffff;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  z-index:10000;
}
.loading-logo{ width:220px; margin-bottom:20px; }
.loading-text{
  font-size:20px;
  font-weight:600;
  color:#95C11F;
  margin-bottom:40px;
  animation:blinkFast 1s ease-in-out infinite;
}
.arlab-loading{
  position:absolute;
  bottom:28px;
  left:50%;
  transform:translateX(-50%);
  width:95px;
  opacity:.45;
}
@keyframes blinkFast{
  0%{opacity:1}
  50%{opacity:.3}
  100%{opacity:1}
}

/* ====== SCANNER OVERLAY ====== */
.hidden{ display:none !important; }

.scan-overlay{
  position:absolute;
  inset:0;
  display:flex;
  justify-content:center;
  align-items:center;
}

.scan-box{
  position:relative;
  width:260px;
  aspect-ratio:1/1;
}

.scan-target{
  width:100%;
  height:100%;
  object-fit:contain;
  opacity:.85;
}

.scan-line{
  position:absolute;
  left:0;
  right:0;
  height:3px;
  background:#95C11F;
  top:20%;
  animation:scanMove 2.6s ease-in-out infinite alternate;
}

@keyframes scanMove{
  from{ top:20%; }
  to{ top:80%; }
}

/* ====== MODALES ====== */
.modal{
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  background:rgba(0,0,0,0.78);
  padding:50px 70px;
  width:80%;
  max-width:380px;
  border-radius:22px;
  text-align:center;
  box-shadow:0 0 25px rgba(0,0,0,0.65);
  backdrop-filter:blur(6px);
}
.modal-text{
  color:#fff;
  margin-bottom:18px;
  font-size:19px;
}

/* Fondo negro del modo pausa */
.paused-full-black{
  position:fixed;
  inset:0;
  background:#000;
  z-index:9000;
  display:none;
}
.paused-full-black.show{
  display:block;
}

/* ====== OCULTAR UI NATIVA DE MINDAR ====== */
.mindar-ui,
.mindar-ui-scanning,
.mindar-ui-loading{
  display:none !important;
  opacity:0 !important;
  visibility:hidden !important;
}

/* =======================================
   SPONSOR BANNER
======================================= */
#sponsor-banner{
  pointer-events:auto !important;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:80px;
  background:rgba(255,255,255,0.95);
  z-index:999999999 !important;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 16px;
  backdrop-filter:saturate(180%) blur(10px);
  opacity:0;
  transform:translateY(-30px);
  transition:opacity .45s ease, transform .45s ease;
}

#sponsor-banner.show{
  opacity:1;
  transform:translateY(0px);
}
#sponsor-banner.hidden{
  display:none !important;
}

.sb-left{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
}

.sb-logo{
  height:60px;
  object-fit:contain;
}

.sb-texts{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.sb-small{ font-size:12px; color:#333; margin-bottom:2px; }
.sb-title{ font-size:15px; font-weight:700; color:#EE731E; }
.sb-desc{ font-size:13px; color:#111; }

.sb-right button{
  background:none;
  border:2px solid #EE731E;
  color:#EE731E;
  padding:6px 14px;
  border-radius:14px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}
.sb-right button:active{
  transform:scale(0.96);
}

/* =======================================
   PANEL DE CONTROLES AR
======================================= */

#ar-controls{
  position:fixed;
  bottom:0;
  left:0;
  width:100%;
  height:64px;
  background:rgba(0,0,0,0.50);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 12px;
  z-index:10000;
}

@media (min-width:768px){
  #ar-controls{
    max-width:400px;
    left:50%;
    transform:translateX(-50%);
    border-radius:40px;
    padding:0 2px;
  }
}

/* Iconos izquierda/derecha */
.control-icon{
  width:60px;
  height:60px;
  border:none;
  background:none;
  display:flex;
  justify-content:center;
  align-items:center;
  pointer-events:auto;
  transition:transform .12s ease;
}

.control-icon img{
  width:52px;
  height:52px;
}

.control-icon:active{
  transform:scale(1.2);
}

/* Botón PAUSAR */
.control-pause{
  background:transparent;
  color:#fff;
  border:1.5px solid white;
  border-radius:28px;
  padding:10px 28px;
  font-size:14px;
  font-weight:600;
  pointer-events:auto;
  transition:transform .12s ease;
}
.control-pause:active{
  transform:scale(1.2);
}

/* Botón REANUDAR */
.btn-modal{
  background:transparent;
  color:white;
  border:2px solid #79c800;
  border-radius:30px;
  padding:12px 40px;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
  pointer-events:auto;
  transition:transform .12s ease, background .25s ease;
}
.btn-modal:active{
  transform:scale(1.16);
}
.btn-modal:hover{
  background:rgba(255,255,255,0.1);
}
