/* ==========================
   Buhonea Beta Gate (scoped)
   ========================== */

#betaGate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(255, 215, 0, .18), transparent 55%),
    radial-gradient(900px 500px at 80% 30%, rgba(0, 255, 160, .12), transparent 55%),
    radial-gradient(900px 600px at 50% 90%, rgba(120, 80, 255, .14), transparent 55%),
    linear-gradient(180deg, #070707, #0b0b0b);
  color: #f4f4f4;
  font-family: "Dosis", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow: auto;
}

#betaGate .betaGate__wrap { width: min(800px, 100%); }

#betaGate .betaGate__card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 80px rgba(0,0,0,.55);
  border-radius: 22px;
  padding: clamp(18px, 3.5vw, 34px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(10px);
  opacity: 0;
  animation: betaGateIn .55s ease forwards;
}

@keyframes betaGateIn {
  to { transform: translateY(0); opacity: 1; }
}

#betaGate .betaGate__brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 3rem;
}

#betaGate .betaGate__logo {
  width: clamp(42px, 6vw, 58px);
  height: auto;
  border-radius: 14px;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.5));
}

#betaGate h1 {
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0;
  font-size: clamp(22px, 3.6vw, 34px);
  line-height: 1.05;
}

#betaGate .betaGate__sub {
  margin: 6px 0 0;
  opacity: .88;
  font-size: clamp(14px, 2.5vw, 18px);
}

#betaGate .betaGate__codeRow {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

#betaGate .betaGate__prefix {
    font-weight: 700;
    font-size: clamp(18px, 4vw, 70px);
    letter-spacing: 10px;
}

#betaGate .betaGate__codeInputs {
  display: flex;
  flex-wrap:wrap;
  align-items:center;
  gap: 10px;
}

#betaGate .betaGate__digit {
  width:clamp(38px,7.2vw,52px);
  height:clamp(52px,9.5vw,66px);
  text-align: center;
  font-weight: 700;
  font-size: clamp(20px, 3.8vw, 28px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.22);
  color: #fff;
  outline: none;
  transition: transform .12s ease, border-color .18s ease, box-shadow .18s ease;
}

#betaGate .betaGate__digit:focus {
  border-color: rgba(255, 215, 0, .55);
  box-shadow: 0 0 0 4px rgba(255,215,0,.16);
  transform: translateY(-1px);
}

#betaGate .betaGate__digit[disabled] {
  opacity: .65;
  cursor: not-allowed;
}

#betaGate .betaGate__status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0px 0px 12px;
}

/* Respeta el atributo hidden del HTML */
#betaGate .betaGate__status[hidden] {
  display: none !important;
}

#betaGate .betaGate__statusIcon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1;
  border: 2px solid transparent;
}

#betaGate .betaGate__statusText {
  font-size: clamp(14px, 2.4vw, 18px);
  font-weight: 600;
}

#betaGate .is-error {
  color: #ff4d4d;
  border-color: rgba(255, 77, 77, .35);
}
#betaGate .is-error .betaGate__statusIcon {
  border-color: rgba(255, 77, 77, .9);
  color: #ff4d4d;
}

#betaGate .is-ok {
  color: #2dff9b;
  border-color: rgba(45, 255, 155, .35);
}
#betaGate .is-ok .betaGate__statusIcon {
  border-color: rgba(45, 255, 155, .9);
  color: #2dff9b;
}

#betaGate .betaGate__actions {
  margin-top: 1rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#betaGate .betaGate__btn {
  border-radius: 5px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  transition: transform .12s ease, opacity .18s ease, background .18s ease;
}
/* Hover / focus elegante */
#betaGate .betaGate__btn:hover {
  transform: translateY(-1px) scale(1.01);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.22);
}

#betaGate .betaGate__btn:active {
  transform: translateY(0) scale(.99);
  opacity: .92;
}

/* Accesibilidad: teclado */
#betaGate .betaGate__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255,215,0,.18);
  border-color: rgba(255,215,0,.35);
}

/* No hagas hover “falso” en móviles táctiles */
@media (hover: none) {
  #betaGate .betaGate__btn:hover {
    transform: none;
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.12);
  }
}

#betaGate .betaGate__btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

#betaGate .betaGate__btn--primary {
  border-color: rgba(255,215,0,.22);
  background: linear-gradient(135deg, rgba(255,215,0,.22), rgba(255,255,255,.08));
}

#betaGate .betaGate__btn--ghost {
  background: rgba(0,0,0,.18);
}

#betaGate .betaGate__footer {
  margin-top: 14px;
  opacity: .75;
  font-size: clamp(17px, 18px, 32px);
}

/* Intro modal */
.betaNoScroll { overflow: hidden; }

#betaGate .betaIntro {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
}

#betaGate .betaIntro--show { display: grid; place-items: center; }

#betaGate .betaIntro__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  animation: betaBackdropIn .25s ease forwards;
}

@keyframes betaBackdropIn { to { opacity: 1; } }

#betaGate .betaIntro__panel {
  position: relative;
  width: min(520px, 92vw);
  padding: 26px 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  text-align: center;
  box-shadow: 0 30px 110px rgba(0,0,0,.65);
  transform: translateY(10px);
  opacity: 0;
  animation: betaPanelIn .3s ease forwards;
}

@keyframes betaPanelIn { to { transform: translateY(0); opacity: 1; } }

#betaGate .betaIntro__img {
    width: 192px;
    height: 192px;
    max-width: 100%;
    filter: drop-shadow(0 18px 40px rgba(0,0,0,.6));
}

#betaGate .betaIntro__img--animate {
  animation:
    betaShake 2s ease-in-out,
    betaZoom 2s ease-in-out 2s forwards;
}

@keyframes betaShake {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  10% { transform: translate(-2px, 1px) rotate(-1deg); }
  20% { transform: translate(2px, -1px) rotate(1deg); }
  30% { transform: translate(-3px, 2px) rotate(-1deg); }
  40% { transform: translate(3px, -2px) rotate(1deg); }
  50% { transform: translate(-2px, 1px) rotate(-.5deg); }
  60% { transform: translate(2px, -1px) rotate(.5deg); }
  70% { transform: translate(-1px, 1px) rotate(-.5deg); }
  80% { transform: translate(1px, -1px) rotate(.5deg); }
  90% { transform: translate(-1px, 0px) rotate(0deg); }
}

@keyframes betaZoom {
  to { transform: scale(1.14); }
}

#betaGate .betaIntro__text {
  margin: 14px 0 0;
  font-weight: 700;
  font-size: clamp(16px, 3.1vw, 20px);
}

#betaGate .betaIntro__cursor {
  display: inline-block;
  margin-left: 4px;
  opacity: .9;
  animation: betaBlink 1s steps(2, start) infinite;
}

@keyframes betaBlink { to { opacity: 0; } }

#betaGate .betaIntro--out .betaIntro__panel,
#betaGate .betaIntro--out .betaIntro__backdrop {
  animation: betaOutro .6s ease forwards;
}

@keyframes betaOutro {
  to { opacity: 0; transform: translateY(8px); }
}

/* Animación de entrada del botón “Comenzar la aventura!” */
#betaGate .betaGate__btn--reveal {
  animation: betaBtnIn .35s ease forwards;
  will-change: transform, opacity;
}

@keyframes betaBtnIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}



/* Responsive */

@media (max-width: 320px) {
  #betaGate .betaGate__brand {
    display: flex;
    gap: 0px;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
  }

  #betaGate .betaGate__prefix {
    font-size: clamp(35px, 4vw, 70px);
  }

  #betaGate .betaGate__footer {
    margin-top: 2rem;
  }

  #betaGate h1 {
    font-size: clamp(28px, 3.6vw, 34px);
  }

  #betaGate .betaGate__sub {
    font-size: clamp(16px, 2.5vw, 18px);
  }
}



@media (min-width: 321px) and (max-width:580px) {
  #betaGate .betaGate__brand {
    display: flex;
    gap: 0px;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
  }

  #betaGate .betaGate__prefix {
    font-size: clamp(50px, 4vw, 70px);
  }

  #betaGate .betaGate__footer {
    margin-top: 2rem;
  }

  #betaGate h1 {
    font-size: clamp(32px, 3.6vw, 34px);
  }

  #betaGate .betaGate__sub {
    font-size: clamp(17px, 2.5vw, 18px);
  }

  #betaGate .betaGate__digit {
    width: clamp(50px,7.2vw,52px);
    height: clamp(70px,9.5vw,66px);
  }
}
