/* ═══════════════════════════════════════════════
   login.css — Pantalla de autenticación
   Estética: fondo oscuro estilo juego + acentos dorados
   ═══════════════════════════════════════════════ */

:root {
  --auth-bg: #0a0a0f;
  --auth-panel: rgba(18, 22, 30, 0.9);
  --auth-border: #3e3f46;
  --auth-gold: #c6a152;
  --auth-gold-2: #ecc94b;
  --auth-text: #dfdfdf;
  --auth-muted: #8e9095;
  --auth-red: #ef4444;
  --auth-green: #22c55e;
  --auth-blue: #3b82f6;
}

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

html, body { height: 100%; }

body {
  font-family: 'Barlow', system-ui, sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══ Fondo animado ═══ */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1200px 800px at 50% 20%, rgba(40, 45, 65, 0.55), transparent 60%),
    radial-gradient(900px 600px at 80% 90%, rgba(198, 161, 82, 0.10), transparent 60%),
    #0a0a0f;
  overflow: hidden;
}

.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(600px) rotateX(55deg) scale(1.4);
  transform-origin: center 120%;
  opacity: 0.6;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.8), transparent 80%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.8), transparent 80%);
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: orbFloat 16s ease-in-out infinite;
  will-change: transform;
}
.orb-1 { width: 420px; height: 420px; top: -140px; left: -120px; background: rgba(59, 130, 246, 0.28); }
.orb-2 { width: 360px; height: 360px; bottom: -120px; right: -100px; background: rgba(198, 161, 82, 0.20); animation-delay: -4s; }
.orb-3 { width: 240px; height: 240px; top: 40%; right: 12%; background: rgba(139, 92, 246, 0.16); animation-delay: -8s; }
.orb-4 { width: 200px; height: 200px; bottom: 18%; left: 8%; background: rgba(34, 197, 94, 0.12); animation-delay: -12s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(calc(var(--mx, 0) * 20px), calc(var(--my, 0) * 20px)) scale(1); }
  33%      { transform: translate(calc(var(--mx, 0) * -30px), calc(var(--my, 0) * 16px)) scale(1.08); }
  66%      { transform: translate(calc(var(--mx, 0) * 12px), calc(var(--my, 0) * -24px)) scale(0.96); }
}

/* ═══ Layout ═══ */
.auth-shell {
  position: relative;
  z-index: 2;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--auth-panel);
  border: 1px solid var(--auth-border);
  border-radius: 18px;
  padding: 34px 32px 26px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(198, 161, 82, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 280px;
  height: 140px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(198, 161, 82, 0.18), transparent);
  pointer-events: none;
}

/* ═══ Logo ═══ */
.auth-logo { text-align: center; margin-bottom: 24px; }

.auth-logo-ball {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid #d9d9d9;
  background: linear-gradient(180deg, #ef4444 0%, #ef4444 47%, #3a3a3a 48%, #3a3a3a 52%, #f5f5f5 53%, #f5f5f5 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), inset 0 -3px 6px rgba(0,0,0,0.25);
  animation: ballBob 3.2s ease-in-out infinite;
}
.ball-seam { position: absolute; left: 0; right: 0; top: 48%; height: 3px; background: #3a3a3a; }
.ball-btn {
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfcfcf 60%);
  border: 3px solid #3a3a3a;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

@keyframes ballBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.auth-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(198, 161, 82, 0.35);
}
.auth-title span { color: var(--auth-gold-2); }

.auth-subtitle {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--auth-muted);
  font-weight: 400;
}

/* ═══ Alertas ═══ */
.name-hint {
  margin-top: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 16px;
  line-height: 1.2;
  transition: color 0.15s;
}
.name-hint.ok { color: #86efac; }
.name-hint.error { color: #fca5a5; }
.name-hint.warn { color: #fcd34d; }
.name-hint.checking { color: #93c5fd; }
.auth-field input.input-taken {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.auth-field input.input-ok {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.auth-alert {
  display: none;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid;
  animation: alertIn 0.3s ease both;
}
.auth-alert.show { display: block; }
.auth-alert.error { background: rgba(239, 68, 68, 0.10); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.auth-alert.success { background: rgba(34, 197, 94, 0.10); border-color: rgba(34, 197, 94, 0.4); color: #86efac; }

@keyframes alertIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ═══ Botón Google ═══ */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #4b5563;
  background: #ffffff;
  color: #1f2937;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn-google:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  border-color: #9ca3af;
}
.btn-google:active { transform: translateY(0) scale(0.99); }
.g-logo { width: 20px; height: 20px; flex-shrink: 0; }

/* ═══ Divisor ═══ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 18px;
  color: var(--auth-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--auth-border));
}
.auth-divider::after { background: linear-gradient(90deg, var(--auth-border), transparent); }

/* ═══ Campos ═══ */
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #b9bcc4;
  text-transform: uppercase;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-wrap > i {
  position: absolute;
  left: 13px;
  color: var(--auth-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.auth-input-wrap input {
  width: 100%;
  padding: 12px 40px 12px 38px;
  border-radius: 10px;
  border: 1px solid #33353d;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-input-wrap input:focus {
  border-color: var(--auth-gold);
  box-shadow: 0 0 0 3px rgba(198, 161, 82, 0.18);
}
.auth-input-wrap input::placeholder { color: #5b5e66; }

.auth-eye {
  position: absolute;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.auth-eye:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

/* ═══ Botón principal ═══ */
.btn-primary {
  width: 100%;
  margin-top: 6px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--auth-gold);
  background: linear-gradient(180deg, #d9b45f, #b08d3e);
  color: #1a1408;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(198, 161, 82, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 30px rgba(198, 161, 82, 0.35);
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ═══ Enlaces ═══ */
.auth-links { margin-top: 16px; text-align: center; }
.auth-switch {
  margin-top: 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--auth-muted);
}
.link-btn {
  background: none;
  border: none;
  color: var(--auth-blue);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.link-btn:hover { color: #93c5fd; text-shadow: 0 0 12px rgba(59, 130, 246, 0.4); }
.link-btn.strong { font-weight: 600; color: var(--auth-gold-2); }
.link-btn.strong:hover { color: #fde68a; text-shadow: 0 0 12px rgba(236, 201, 75, 0.4); }

/* ═══ Vista de recuperación ═══ */
.auth-view-head { text-align: center; margin-bottom: 20px; }
.auth-view-head h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: #fff;
}
.auth-view-head p { margin-top: 6px; font-size: 0.85rem; color: var(--auth-muted); }

/* ═══ Footer ═══ */
.auth-footer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}
.auth-status {
  font-size: 0.75rem;
  color: var(--auth-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.auth-status i { color: var(--auth-gold); }

/* ═══ Responsive ═══ */
@media (max-width: 480px) {
  .auth-card { padding: 26px 20px 20px; border-radius: 14px; }
  .auth-title { font-size: 1.25rem; }
  .auth-logo-ball { width: 54px; height: 54px; }
}

/* ═══ Responsive CELULARES (portrait) — que TODO quepa en la pantalla ═══ */
@media (max-width: 480px) and (max-height: 950px) {
  .auth-shell {
    padding: 12px 12px;
    align-items: flex-start;   /* empezar arriba: menos scroll para ver el form */
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .auth-card {
    max-width: 100%;
    padding: 18px 16px 14px;
    border-radius: 14px;
  }
  .auth-logo { margin-bottom: 12px; }
  .auth-logo-ball {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
    border-width: 2px;
  }
  .ball-btn { width: 13px; height: 13px; border-width: 2px; }
  .auth-title { font-size: 1.1rem; letter-spacing: 1px; }
  .auth-subtitle { font-size: 0.78rem; }
  .auth-field { margin-bottom: 10px; }
  .auth-field label { margin-bottom: 4px; font-size: 0.72rem; }
  .auth-input-wrap input {
    padding: 10px 38px 10px 34px;
    font-size: 0.9rem;
    border-radius: 9px;
  }
  .btn-google { padding: 10px 14px; font-size: 0.88rem; border-radius: 10px; }
  .auth-divider { margin: 12px 0 10px; }
  .btn-primary { padding: 11px 14px; font-size: 0.95rem; border-radius: 10px; }
  .auth-alert { margin-bottom: 10px; padding: 8px 12px; font-size: 0.8rem; }
  .name-hint { font-size: 0.7rem; }
  .auth-view-head { font-size: 1.05rem; }
}

/* Pantallas MUY pequeñas y bajas (ej. 360x640): apretar aún más */
@media (max-width: 400px) and (max-height: 760px) {
  .auth-card { padding: 14px 13px 12px; }
  .auth-logo-ball { width: 38px; height: 38px; }
  .auth-field { margin-bottom: 8px; }
  .auth-title { font-size: 1rem; }
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  .auth-orb, .auth-logo-ball { animation: none; }
  .auth-card { animation: none; }
}


/* ═══════════════════════════════════════════════════════════════
   POKE IDLE WORLD — LOGIN OVERHAUL (MOCHILA & TURN OFF GLASS THEME)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --auth-bg: #07090f;
  --auth-panel: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 27, 75, 0.85));
  --auth-border: rgba(168, 85, 247, 0.4);
  --auth-gold: #fbbf24;
  --auth-gold-2: #f59e0b;
  --auth-text: #f8fafc;
  --auth-muted: #cbd5e1;
  --auth-red: #ef4444;
  --auth-green: #22c55e;
  --auth-blue: #38bdf8;
  --font-body: 'Outfit', 'Inter', system-ui, sans-serif;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
  color: #f8fafc !important;
  background: #07090f !important;
}

/* Tarjeta Principal de Cristal Neón */
.auth-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 27, 75, 0.85)) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.45) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(168, 85, 247, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.auth-title {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
  font-weight: 900 !important;
  font-size: 1.6rem !important;
  color: #ffffff !important;
  letter-spacing: 1px !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3) !important;
}

.auth-title span {
  color: #fbbf24 !important;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.5) !important;
}

.auth-subtitle {
  color: #cbd5e1 !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
}

/* Inputs de Formulario (Mochila Style) */
.auth-field label {
  color: #e2e8f0 !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.5px !important;
}

.auth-input-wrap {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.35) !important;
  border-radius: 10px !important;
  transition: all 0.2s ease-in-out !important;
}

.auth-input-wrap:focus-within {
  border-color: #c084fc !important;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.45) !important;
  background: rgba(30, 27, 75, 0.9) !important;
}

.auth-input-wrap input {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
}

.auth-input-wrap i {
  color: #c084fc !important;
  filter: drop-shadow(0 0 6px #c084fc) !important;
}

/* Botón Principal (Estilo Mochila Champion) */
.btn-primary {
  background: linear-gradient(135deg, #1e1b4b 0%, #2e1065 50%, #422006 100%) !important;
  border: 2px solid #c084fc !important;
  color: #ffffff !important;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
  font-weight: 900 !important;
  font-size: 1.05rem !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  border-radius: 12px !important;
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.45), 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transition: all 0.2s ease-in-out !important;
  cursor: pointer !important;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02) !important;
  background: linear-gradient(135deg, #2e1065 0%, #3b0764 50%, #78350f 100%) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.6), 0 6px 20px rgba(0, 0, 0, 0.6) !important;
}

/* Botón Google (Estilo Cristal Pill) */
.btn-google {
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  border-radius: 10px !important;
  transition: all 0.2s ease-in-out !important;
}

.btn-google:hover {
  background: rgba(30, 27, 75, 0.9) !important;
  border-color: rgba(168, 85, 247, 0.6) !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35) !important;
  transform: translateY(-1px) !important;
}

/* Links & Acciones */
.link-btn {
  color: #c084fc !important;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
  font-weight: 700 !important;
  transition: all 0.15s !important;
}

.link-btn:hover {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5) !important;
}

.link-btn.strong {
  color: #fbbf24 !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4) !important;
}

.link-btn.strong:hover {
  color: #ffffff !important;
  text-shadow: 0 0 12px #c084fc !important;
}

/* ── Barra de Idiomas en Login ── */
.auth-lang-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 10px auto 16px;
}
.auth-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #cbd5e1;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.auth-lang-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(192, 132, 252, 0.5);
  color: #fff;
  transform: translateY(-1px);
}
.auth-lang-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.45), rgba(30, 27, 75, 0.95));
  border-color: #c084fc;
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}
.auth-lang-flag {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

