:root{
  --bg:#060f38;
  --card: rgba(255,255,255,.10);
  --card2: rgba(255,255,255,.06);
  --text:#ffffff;
  --muted: rgba(255,255,255,.78);
  --line: rgba(255,255,255,.18);

  --pink:#ff3fb8;
  --purple:#7c4dff;
  --cyan:#3bf0ff;

  --shadow: 0 24px 80px rgba(0,0,0,.55);
  --radius: 22px;

  --font: "Rubik", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  --font-gamer: "Press Start 2P", system-ui;
}

*{ margin:0; padding:0; box-sizing:border-box; }
html,body{ height:100%; }

body{
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image: url("../img/portada/fondologin.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  cursor: url("../img/recursos/boom.png"), auto;
}

/* Layout */
.auth{
  min-height:100vh;
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 18px;
}

/* Mobile-first: story arriba */
.auth__story{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.38));
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
  padding: 18px;
}

.story__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.story__avatar{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}

.story__chip{
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  border:1px solid rgba(59,240,255,.25);
  background: rgba(59,240,255,.10);
  color: rgba(255,255,255,.92);
  font-weight: 800;
}

/* Speech bubble pro */
.story__bubble{
  margin-top: 14px;
  background: rgba(255,255,255,.92);
  color: #0b0f24;
  border-radius: 16px;
  padding: 14px 14px;
  position: relative;
  box-shadow: 0 14px 30px rgba(0,0,0,.25);
}

.story__bubble::after{
  content:"";
  position:absolute;
  left: 18px;
  bottom: -10px;
  width:0; height:0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid rgba(255,255,255,.92);
}

.bubble__title{
  font-family: var(--font-gamer);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 6px;
}

.bubble__text{
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
  opacity:.95;
}

/* Alex hero */
.story__hero{
  margin-top: 18px;
  display:flex;
  justify-content:center;
  align-items:flex-end;
  position:relative;
  min-height: 220px;
}

.hero__alex{
  width: min(320px, 82%);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.45));
  z-index: 2;
}

.hero__glow{
  position:absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(255,63,184,.22), transparent 60%),
    radial-gradient(circle at 60% 60%, rgba(124,77,255,.20), transparent 62%),
    radial-gradient(circle at 55% 25%, rgba(59,240,255,.12), transparent 58%);
  filter: blur(22px);
  z-index: 1;
  bottom: -260px;
}

/* Panel login */
.auth__panel{
  display:flex;
  align-items:center;
  justify-content:center;
}

.card{
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), var(--card2));
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card__header h1{
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .2px;
}

.card__header p{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.form{
  margin-top: 14px;
  display:grid;
  gap: 12px;
}

.field{ display:grid; gap: 8px; }

.field__label{
  color: rgba(255,255,255,.85);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
}

.field__row{
  display:flex;
  gap: 10px;
  align-items:center;
}

.field__input{
  width:100%;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(6,15,56,.55);
  color: var(--text);
  outline: none;
  transition: .18s;
}

.field__input::placeholder{ color: rgba(255,255,255,.55); }

.field__input:focus{
  border-color: rgba(255,63,184,.55);
  box-shadow: 0 0 0 4px rgba(255,63,184,.14);
}

.field__toggle{
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(6,15,56,.55);
  color: var(--text);
  cursor:pointer;
}

.alert{
  border-radius: 16px;
  padding: 12px 12px;
  font-size: 13px;
  line-height: 1.35;
}

.alert--error{
  border:1px solid rgba(255,63,184,.35);
  background: rgba(255,63,184,.12);
  color: #ffe3f5;
}

.form__meta{
  display:flex;
  justify-content:flex-end;
  margin-top: -4px;
}

.link{
  color: rgba(255,255,255,.92);
  text-decoration: none;
  font-weight: 800;
  opacity: .92;
}

.link:hover{ opacity:1; text-decoration: underline; }

.btn{
  width:100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  font-weight: 900;
  letter-spacing: .2px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
}

.btn--primary{
  border: 0;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  color: #070812;
  box-shadow: 0 14px 30px rgba(255,63,184,.22);
}

.btn--primary:hover{ filter: brightness(1.05); }

.btn.is-loading{ opacity:.85; cursor:wait; }

.btn--facebook{
  border-color: rgba(59,240,255,.22);
  background: rgba(59,240,255,.08);
}

.btn__icon{
  width: 30px;
  height: 30px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(59,240,255,.12);
  border: 1px solid rgba(59,240,255,.28);
  font-weight: 1000;
}

.divider{
  position:relative;
  text-align:center;
  margin: 4px 0;
}
.divider::before{
  content:"";
  position:absolute;
  left:0; right:0;
  top:50%;
  height:1px;
  background: rgba(255,255,255,.18);
}
.divider span{
  position:relative;
  display:inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(6,15,56,.75);
  color: rgba(255,255,255,.75);
  font-size: 12px;
  font-weight: 800;
}

/* Prize gif responsive */
.prize{
  margin-top: 12px;
  display:flex;
  justify-content:center;
  align-items:center;
}
.prize img{
  width: min(420px, 100%);
  height:auto;
  filter: drop-shadow(0 14px 34px rgba(0,0,0,.35));
}

/* Terms */
.terms{
  margin-top: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.22);
  background: rgba(0,0,0,.18);
}
.terms__label{
  font-size: 12px;
  color: rgba(255,255,255,.88);
  font-weight: 700;
  cursor:pointer;
}
#terminosLabel{ color: rgba(59,240,255,.95); }
.terms__check{ width: 18px; height: 18px; accent-color: var(--pink); }

/* Popup */
.popup{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 18px;
  z-index: 200;
}
.popup-content{
  width: min(920px, 100%);
  max-height: 86vh;
  overflow:auto;
  background: #fff;
  color:#111;
  border-radius: 18px;
  padding: 18px;
}
#cerrarPopup{
  width: 100%;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border:0;
  cursor:pointer;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  color:#070812;
  font-weight: 900;
}

/* Desktop split upgrade */
@media (min-width: 980px){
  .auth{
    grid-template-columns: 1.1fr 1fr;
    padding: 32px;
    gap: 22px;
  }
  .auth__story{
    padding: 26px;
  }
  .story__hero{ min-height: 420px; }
  .hero__alex{ width: min(520px, 80%); }
  .card{ padding: 22px; }
  .card__header h1{ font-size: 26px; }
  .card__header p{ font-size: 14px; }
}
