/* --- style.css (Proyecto G) --- */

html,body{
  height:100%;
  margin:0;
  overscroll-behavior:contain;
  user-select:none;
  -webkit-user-select:none;
}

body{
  display:flex;
  flex-direction:column;
  background:center top / cover no-repeat fixed;
  background-position: center top;
  background-size:100vw auto;
  font-family:Roboto,arial,sans-serif;
  transition: background 0.2s;
  min-height:calc(100vh + 3px);
}

main{
  flex:1;
  position:relative;
  min-height:100vh;
}

body::after{
  content:"";
  display:block;
  height:200px;
  width:100%;
  flex-shrink:0;
}

/* fakeBar — SIN CONTORNO ROJO, 100% INVISIBLE Y CLICABLE */
#fakeBar{
  position:absolute;
  left:50%;
  top:25.5%;
  transform:translateX(-50%);
  width:90%;
  max-width:560px;
  height:48px;
  background:none;
  border:none;
  cursor:pointer;
  z-index:200;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
  pointer-events:auto !important;
}

/* 🔥 BOTÓN TIMER_REDIRECT — MISMAS PROPORCIONES, SIN CONTORNO */
#timer_redirect{
  position:absolute;
  left:50%;
  top:50%; /* default */
  transform:translateX(-50%);
  width:90%;
  max-width:560px;
  height:48px;
  background:transparent;
  border:none;
  cursor:pointer;
  z-index:200;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
  pointer-events:auto !important;
}
#timer_redirect:focus,
#timer_redirect:active{
  outline:none;
  background:transparent;
}

/* 🔥 NUEVO: BOTÓN TRIGGER GLITCH — MISMAS PROPORCIONES QUE TIMER_REDIRECT */
#trigger_glitch_btn{
  position:absolute;
  left:50%;
  /* Default - estará ajustado por idioma más abajo */
  top:56%;
  transform:translateX(-50%);
  width:90%;
  max-width:560px;
  height:48px;
  background:transparent;
  border:none;
  cursor:pointer;
  z-index:200;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
  pointer-events:auto !important;
}
#trigger_glitch_btn:focus,
#trigger_glitch_btn:active{
  outline:none;
  background:transparent;
}

/* 🔥 ESPAÑOL: 42% para timer, 48% para trigger (justo debajo) */
html[lang="es"] #fakeBar{
  top:25.5% !important;
}
html[lang="es"] #timer_redirect{
  top:42% !important;
}
html[lang="es"] #trigger_glitch_btn{
  top:48% !important;
}

/* 🔥 INGLÉS: bloque independiente */
html[lang="en"] #fakeBar{
  top:22% !important;
}
html[lang="en"] #timer_redirect{
  top:30.9% !important;
}
html[lang="en"] #trigger_glitch_btn{
  top:36.9% !important;
}

/* 🔥 ITALIANO: bloque independiente */
html[lang="it"] #fakeBar{
  top:22% !important;
}
html[lang="it"] #timer_redirect{
  top:30% !important;
}
html[lang="it"] #trigger_glitch_btn{
  top:36% !important;
}

/* 🔥 FRANCÉS: bloque independiente */
html[lang="fr"] #fakeBar{
  top:22% !important;
}
html[lang="fr"] #timer_redirect{
  top:30% !important;
}
html[lang="fr"] #trigger_glitch_btn{
  top:36% !important;
}

#espacioExtra{
  width:100%;
  height:0;
  background:transparent;
  flex-shrink:0;
}

/* Todo el resto 100% tu código original */
#posterBlanco{position:fixed;inset:0;background:#fff;display:none;z-index:25;cursor:pointer;transition:none!important;}
#lineContainer{position:fixed;top:0;left:-3mm;width:100%;max-width:560px;z-index:30;transform:none;}
#barraReal{width:100%;height:48px;padding:0 46px;font-size:16px;border:none;background:#fff;color:#202124;outline:none;display:none;transition:none!important;-webkit-tap-highlight-color:transparent;text-indent:5mm;}
#separatorLine{position:fixed;top:48px;left:50%;transform:translateX(-50%);width:420px;height:1px;background-color:#707579;z-index:60;display:none;}
#arrowBack{position:fixed;top:10px;left:5mm;width:19px;height:19px;z-index:100;display:none;background-repeat:no-repeat;background-size:contain;background-position:center;}
#invisibleButton{position:fixed;top:-3px;left:0;width:60px;height:60px;display:none;background:transparent;border:none;outline:none;appearance:none;cursor:pointer;z-index:90;-webkit-tap-highlight-color:transparent;}

.trends-container{margin-top:39px;font-size:14px;padding:0 30px;transform:translateY(2mm);}
.trend-item{margin-bottom:27px;font-weight:400;font-size:17px;line-height:24px;display:flex;align-items:center;position:relative;}
.trend-item:first-child{position:relative;top:19px;font-size:14px;letter-spacing:.8px;transform:translateY(-2mm);text-shadow:.1px 0 0 #636363,-.1px 0 0 #636363,0 .1px 0 #636363,0 -.1px 0 #636363;}
.trend-item:not(:first-child){top:2px;left:4px;font-size:16px;transform:translateY(-1mm);}
.trend-icon{width:6mm;height:5.25mm;flex-shrink:0;margin-right:14px;margin-left:-10px;transform:translateX(-1mm);filter:drop-shadow(0 0 0 #9AA0A6) saturate(200%) brightness(.85);}

.camera-img{position:absolute;left:calc(100% - 8mm);top:50%;transform:translateY(-50%);width:5mm;height:5mm;z-index:40;pointer-events:none;display:none;}
.mic-img,.cruz-img{position:absolute;z-index:40;pointer-events:none;display:none;}

#suggestionsContainer{position:fixed;top:48px;left:0;right:0;bottom:0;overflow-y:auto;background:#fff;z-index:45;display:none;}
.suggestion-item{display:flex;align-items:center;gap:10px;padding:12px;font-size:16px;cursor:pointer;transition:background .15s ease;}
.suggestion-item:hover{background:#f1f3f4;}

.icono-lupa,.icono-flecha{width:19px;height:19px;object-fit:contain;opacity:1;flex-shrink:0;}
.icono-lupa{transform:translateX(2mm) translateY(+0.5mm);}
.icono-flecha{margin-left:auto;transform:translateX(-2mm) translateY(+0.5mm);}

.texto strong{font-weight:700;}
.aparecer{animation:fadeIn .15s ease-out;}
@keyframes fadeIn{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}}
.texto{display:inline-block;margin-left:3mm;margin-top:.5mm;}

/* OVERLAY CONFIGURACIÓN TIMER */
#timerConfigOverlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:500;
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}

#timerConfigBox{
  background:rgba(255,255,255,0.96);
  padding:12px 14px;
  border-radius:14px;
  width:75%;
  max-width:260px;
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
  font-family:Roboto,arial,sans-serif;
}

#timerConfigBox label{
  display:block;
  margin-bottom:6px;
  font-size:13px;
  font-weight:500;
  color:#111827;
  text-align:center;
}

#timerSecondsInput{
  width:60%;
  margin:0 auto 10px auto;
  padding:4px 6px;
  font-size:14px;
  text-align:center;
  border:1px solid #d0d7de;
  border-radius:999px;
  outline:none;
  display:block;
  color:#111827;
  background:#f5f5f7;
}

#timerSecondsInput:focus{
  border-color:#007aff;
  background:#ffffff;
}

.timer-buttons{
  display:flex;
  justify-content:center;
  margin-top:6px;
}

#timerSaveButton{
  padding:5px 20px;
  font-size:13px;
  border:none;
  border-radius:999px;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  background:#007aff;
  color:#ffffff;
}

/* PUNTO TIMER */
#timerDot{
  position:absolute;
  transform:translate(-50%, -50%);
  width:0.785mm;
  height:0.785mm;
  border-radius:50%;
  z-index:400;
  pointer-events:none;
  display:none;
}

/* VARIABLES POR IDIOMA/TEMA */
/* CLARO */
html[lang="es"] #timerDot{ --dot-top-claro: 47.7%; --dot-left-claro: 96%; }
html[lang="en"] #timerDot{ --dot-top-claro: 38.3%; --dot-left-claro: 95.95%; }
html[lang="it"] #timerDot{ --dot-top-claro: 47.0%; --dot-left-claro: 96%; }
html[lang="fr"] #timerDot{ --dot-top-claro: 47.0%; --dot-left-claro: 96%; }

/* OSCURO */
@media (prefers-color-scheme: dark){
  #timerDot{
    top: var(--dot-top-oscuro, 47.7%);
    left: var(--dot-left-oscuro, 96%);
    background:#ffffff;
  }
}
@media (prefers-color-scheme: light){
  #timerDot{
    top: var(--dot-top-claro, 47.7%);
    left: var(--dot-left-claro, 96%);
    background:#000000;
  }
}

/* BOTONES ROJOS INFERIORES */
#btnInfIzq, #btnInfDer{
  position:absolute;
  width:20mm;
  height:60mm;
  background:transparent;
  border:0px solid red;
  cursor:pointer;
  z-index:250;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
  pointer-events:auto !important;
}
#btnInfIzq{ left:0; bottom:0; transform-origin:left bottom; }
#btnInfDer{ right:0; bottom:0; transform-origin:right bottom; }

/* Tema claro/oscuro */
@media (prefers-color-scheme: dark){
  #btnInfIzq{ left: 0mm; bottom: 12mm; }
  #btnInfDer{ right: 0mm; bottom: 12mm; }
}
@media (prefers-color-scheme: light){
  #btnInfIzq{ left: 0mm; bottom: 12mm; }
  #btnInfDer{ right: 0mm; bottom: 12mm; }
}

/* POPUP WORD */
#wordPopup{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  pointer-events:none;
}

#wordPopupText{
  padding:1mm;
  font-size:16px;
  line-height:24px;
  font-family:Roboto,arial,sans-serif;
  max-width:80%;
  text-align:center;
  word-break:break-word;
  user-select:none;
  -webkit-user-select:none;
}

@media (prefers-color-scheme: dark){
  #wordPopupText{
    background:#1e1e1e;
    color:#ffffff;
  }
}
@media (prefers-color-scheme: light){
  #wordPopupText{
    background:#ffffff;
    color:#000000;
  }
}