/* ================================================================
   🎨 BUZZCHAT MODERN AUTH OVERLAY
   Eleva login/register con glassmorphism, gradientes y micro-anim
   ================================================================ */

body.auth-page {
  background:
    radial-gradient(900px 700px at 15% -10%, rgba(88,101,242,.18), transparent 60%),
    radial-gradient(800px 600px at 110% 20%, rgba(157,112,255,.14), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(0,245,255,.08), transparent 60%),
    #0a0c12;
  background-attachment: fixed;
  position: relative;
}

/* Orbes flotantes en el fondo */
.auth-background .circle {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
  pointer-events: none;
  animation: float-orb 14s ease-in-out infinite;
}
.auth-background .circle-1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #5865f2, transparent 70%);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.auth-background .circle-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #9d70ff, transparent 70%);
  bottom: -80px; right: -60px;
  animation-delay: -4s;
}
.auth-background .circle-3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #00f5ff, transparent 70%);
  top: 40%; right: 20%;
  animation-delay: -8s;
  opacity: .2;
}
@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.08); }
  66% { transform: translate(-20px, 30px) scale(.95); }
}

/* Card principal — glass */
.auth-box {
  background: rgba(22, 27, 39, .65);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    0 24px 64px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 1px 0 rgba(255,255,255,.06) inset;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  animation: auth-card-in .55s cubic-bezier(.34,1.56,.64,1);
}
@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(88,101,242,.06), transparent 40%);
  pointer-events: none;
}

/* Logo con glow pulsante */
.auth-logo img {
  animation: auth-logo-pulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(88,101,242,.45));
}
@keyframes auth-logo-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 18px rgba(88,101,242,.45)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 28px rgba(88,101,242,.7)); }
}

/* Título con gradient text */
.auth-box h2 {
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .3px;
}
.auth-subtitle { color: rgba(255,255,255,.55); }

/* Inputs modernos */
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 13px 16px;
  color: #fff;
  font-size: 14px;
  transition: all .2s ease;
  width: 100%;
}
.auth-form input::placeholder { color: rgba(255,255,255,.3); }
.auth-form input:focus {
  background: rgba(255,255,255,.06);
  border-color: #5865f2;
  box-shadow: 0 0 0 3px rgba(88,101,242,.25);
  outline: none;
}

/* Labels con icono */
.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,.6);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-group label svg { color: #5865f2; }

/* Password wrapper */
.password-wrapper {
  position: relative;
}
.password-wrapper .toggle-password {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 8px;
  transition: background .15s;
}
.password-wrapper .toggle-password:hover {
  background: rgba(255,255,255,.08);
}

/* Checkbox custom */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 20px;
}
.form-options .checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.6);
  cursor: pointer;
}
.form-options .checkbox input {
  width: 16px; height: 16px;
  accent-color: #5865f2;
  cursor: pointer;
}
.link-secondary {
  color: #a5b4fc;
  font-size: 13px;
  text-decoration: none;
  transition: color .15s;
}
.link-secondary:hover { color: #fff; text-decoration: underline; }

/* Botón primario con gradient y glow */
.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5865f2 0%, #7c7ff5 100%);
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s var(--transition-spring, cubic-bezier(.34,1.56,.64,1));
  box-shadow: 0 6px 20px rgba(88,101,242,.4);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transform: translateX(-100%);
  transition: transform .6s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(88,101,242,.55);
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-primary:disabled,
.btn-primary.loading {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: rgba(255,255,255,.35);
  font-size: 12px;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
}

/* Social buttons */
.social-login {
  display: flex;
  gap: 10px;
}
.btn-social {
  flex: 1;
  padding: 11px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-social:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
.btn-social:active { transform: translateY(0) scale(.97); }

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
.auth-footer a {
  color: #a5b4fc;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s;
}
.auth-footer a:hover { color: #fff; text-decoration: underline; }

/* Error banner */
.auth-error {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 18px;
  text-align: center;
  animation: shake .4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.1);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }