/* ============================================================
   JUGADATA AUTH — v5.0  |  Identidad oficial JugaData 2026
   Tipografía: Space Grotesk (títulos) + DM Sans (cuerpo)
   Colores: Lima #C1FF72 · Fondos #091022 → #15203F
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700;800;900&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
  /* ── BRAND ── */
  --lime:    #C1FF72;
  --lime2:   #a4e35a;
  --lime-gd: rgba(193,255,114,.10);
  --lime-bd: rgba(193,255,114,.22);

  /* ── FONDOS ── */
  --bg:  #091022;
  --s1:  #0E1730;
  --s2:  #15203F;
  --s3:  #1C2A4F;

  /* ── BORDES ── */
  --b1:  rgba(255,255,255,.06);
  --b2:  rgba(255,255,255,.11);
  --b3:  rgba(255,255,255,.18);

  /* ── TEXTO ── */
  --tx:  #F0F2F5;
  --mu:  #7A8094;
  --mu2: #3A4055;

  /* ── ESTADOS ── */
  --loss: #FF4D6D;
  --draw: #FFB347;
  --info: #4D8AFF;

  /* ── TIPOGRAFÍAS ── */
  --title: 'Space Grotesk', sans-serif;
  --body:  'DM Sans', sans-serif;

  /* ── RADIOS ── */
  --r:  12px;
  --r2: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══ BODY ══════════════════════════════════════════════════ */
body.jugadata-auth {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--body);
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  /* Sutil grid de fondo — igual que el landing */
  background-image:
    linear-gradient(rgba(193,255,114,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(193,255,114,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ══ WRAP ═══════════════════════════════════════════════════ */
.auth-wrap {
  width: 100%;
  max-width: 420px;
  animation: authIn .45s cubic-bezier(.22,1,.36,1) both;
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══ LOGO ════════════════════════════════════════════════════ */
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}
.auth-logo img { height: 30px; }
.auth-logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.auth-logo-badge {
  font-family: var(--title);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lime);
  background: var(--lime-gd);
  border: .5px solid var(--lime-bd);
  border-radius: 100px;
  padding: 3px 9px;
}

/* ══ CARD ════════════════════════════════════════════════════ */
.auth-card {
  background: var(--s1);
  border: .5px solid var(--b2);
  border-radius: var(--r2);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  /* Glow en borde superior */
  box-shadow:
    0 0 0 .5px rgba(193,255,114,.08),
    0 24px 64px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.04);
}
/* Línea lima en el top */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, var(--lime) 40%, rgba(193,255,114,.3) 100%);
}
/* Glow orb decorativo */
.auth-card::after {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(193,255,114,.07), transparent 70%);
  pointer-events: none;
}

/* ══ TÍTULOS ═════════════════════════════════════════════════ */
.auth-title {
  font-family: var(--title);
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 7px;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.auth-subtitle {
  font-size: 13px;
  color: var(--mu);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ══ FIELDS ══════════════════════════════════════════════════ */
.auth-field { margin-bottom: 18px; }

.auth-field label {
  display: block;
  font-family: var(--title);
  font-size: 10px;
  font-weight: 700;
  color: var(--mu);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.auth-field input {
  width: 100%;
  background: var(--s2);
  border: .5px solid var(--b2);
  border-radius: var(--r);
  padding: 13px 16px;
  color: var(--tx);
  font-size: 14px;
  font-family: var(--body);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
}
.auth-field input:hover {
  border-color: var(--b3);
  background: var(--s3);
}
.auth-field input:focus {
  border-color: rgba(193,255,114,.4);
  box-shadow: 0 0 0 3px rgba(193,255,114,.07);
  background: var(--s2);
}
.auth-field input::placeholder { color: var(--mu2); }
/* Autofill override */
.auth-field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px var(--s2) inset;
  -webkit-text-fill-color: var(--tx);
}

.auth-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--mu);
  cursor: pointer;
  user-select: none;
}
.auth-remember input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--lime);
  cursor: pointer;
}
.auth-link {
  font-size: 12px;
  color: var(--lime);
  text-decoration: none;
  font-weight: 600;
  transition: opacity .2s;
}
.auth-link:hover { opacity: .75; }

/* ══ BOTÓN PRINCIPAL ═════════════════════════════════════════ */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--lime);
  color: #000;
  border: none;
  border-radius: var(--r);
  font-family: var(--title);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  letter-spacing: .01em;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(193,255,114,.20);
}
.auth-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .15s;
}
.auth-btn:hover {
  background: var(--lime2);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(193,255,114,.30);
}
.auth-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(193,255,114,.15);
}
.auth-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}
/* Loading state */
.auth-btn.loading {
  pointer-events: none;
  color: transparent;
}
.auth-btn.loading::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(0,0,0,.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ MENSAJES ════════════════════════════════════════════════ */
.auth-error {
  background: rgba(255,77,109,.08);
  border: .5px solid rgba(255,77,109,.25);
  border-radius: var(--r);
  padding: 11px 15px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--loss);
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.auth-error::before { content: '⚠'; flex-shrink: 0; margin-top: 1px; }

.auth-success {
  background: rgba(193,255,114,.06);
  border: .5px solid rgba(193,255,114,.2);
  border-radius: var(--r);
  padding: 11px 15px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--lime);
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.auth-success::before { content: '✓'; flex-shrink: 0; font-weight: 700; margin-top: 1px; }

/* ══ FOOTER ══════════════════════════════════════════════════ */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--mu);
}
.auth-footer a {
  color: var(--lime);
  text-decoration: none;
  font-weight: 600;
  transition: opacity .2s;
}
.auth-footer a:hover { opacity: .75; }

.auth-bottom {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--mu2);
  line-height: 1.6;
}

/* ══ DIVISOR ══════════════════════════════════════════════════ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 11px;
  color: var(--mu2);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: .5px;
  background: var(--b2);
}

/* ══ PASSWORD STRENGTH ═══════════════════════════════════════ */
.pass-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.pass-rule {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--s3);
  color: var(--mu);
  border: .5px solid var(--b1);
  transition: all .25s;
}
.pass-rule.ok {
  background: rgba(193,255,114,.08);
  color: var(--lime);
  border-color: rgba(193,255,114,.25);
}

/* ══ TRUST BADGES (debajo del botón) ════════════════════════ */
.auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--mu);
}
.auth-trust-item svg {
  width: 12px; height: 12px;
  stroke: var(--lime);
  flex-shrink: 0;
}

/* ══ RESPONSIVE ══════════════════════════════════════════════ */
@media (max-width: 480px) {
  body.jugadata-auth { padding: 16px 12px; }
  .auth-card { padding: 28px 20px; border-radius: 16px; }
  .auth-title { font-size: 21px; }
  .auth-trust { gap: 10px; }
}
