/* --- Fondo general negro con blur --- */
body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
  background: #18191a; /* Negro profundo */
  position: relative;
  overflow-x: hidden;
  /* Centrado flex */
  display: flex;
  align-items: center;
  justify-content: center;
}
.blur-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background: #18191a; /* Negro */
  opacity: 0.45;              /* Antes: 0.85 */
  filter: blur(18px) brightness(1.15); /* Antes: brightness(0.7) */
}

/* --- Video de fondo --- */
#bg-video {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  object-fit: cover;
  z-index: -2;
  min-width: 100vw;
  min-height: 100vh;
  pointer-events: none;
  opacity: 1;
}

/* --- Tarjeta principal blanca translúcida --- */
.login-box {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.90); /* Más blanca y visible */
  max-width: 430px;
  width: 100%;
  margin: 60px auto 0 auto;
  padding: 36px 28px 28px 28px;
  border-radius: 22px;
  box-shadow: 0 8px 40px 0 rgba(0,0,0,0.55), 0 1.5px 8px #0002;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(16px) saturate(140%);
  border: 1.5px solid rgba(0,0,0,0.08);
  animation: fadeInUp 0.8s cubic-bezier(.39,.575,.56,1.000) both;
  box-sizing: border-box;
}
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(40px);}
  100% { opacity: 1; transform: translateY(0);}
}

/* --- Títulos centrados --- */
h2 {
  margin: 0 0 18px 0;
  color: #232526;
  font-size: 2em;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px #fff9, 0 2px 8px #0001;
  text-align: center;
}

/* --- Grupos de campos --- */
.input-group {
  width: 100%;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.input-group label {
  font-weight: 600;
  color: #232526;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 6px #fff9;
}

/* --- Inputs modernos --- */
.input-group input[type="email"],
.input-group input[type="password"],
.input-group input[type="text"] {
  padding: 12px 14px;
  border-radius: 9px;
  border: 1.5px solid #6a11cb;
  font-size: 1em;
  outline: none;
  background: rgba(255,255,255,0.97);
  color: #232526;
  transition: border 0.3s, box-shadow 0.3s, background 0.3s;
  box-shadow: 0 1px 4px #0001;
  backdrop-filter: blur(2px);
  width: 100%;
  box-sizing: border-box;
}
.input-group input:focus {
  border-color: #43e97b;
  background: #fff;
  box-shadow: 0 0 8px #43e97b33;
}

/* --- Barra de fuerza de contraseña --- */
.strength-container {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,0.08);
  border-radius: 5px;
  margin: 7px 0 0 0;
  overflow: hidden;
}
.strength-bar {
  height: 100%;
  width: 0;
  background: #ccc;
  border-radius: 5px;
  transition: width 0.4s, background 0.4s;
}

/* --- Mensajes de error en tiempo real --- */
.error-msg {
  color: #e63946;
  font-size: 0.98em;
  margin: 4px 0 0 0;
  min-height: 18px;
  text-align: left;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 6px #fff9;
  transition: color 0.2s;
  font-weight: 600;
}

/* --- Botón principal con efecto --- */
.btn-main,
button[type="submit"] {
  width: 100%;
  padding: 13px 0;
  background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
  color: #232526;
  border: none;
  border-radius: 9px;
  font-size: 1.1em;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  margin-top: 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px #38f9d733;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.15s;
  text-shadow: 0 1px 6px #fff9;
}
.btn-main:hover,
button[type="submit"]:hover {
  background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  box-shadow: 0 4px 16px #6a11cb33;
  text-shadow: 0 2px 8px #232526cc;
  transform: translateY(-2px) scale(1.03);
}

/* --- Link para login/register --- */
.volver-login {
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
}
.volver-login a {
  color: #232526;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98em;
  transition: color 0.2s;
  text-shadow: 0 1px 6px #fff9;
}
.volver-login a:hover {
  color: #43e97b;
  text-decoration: underline;
}

/* --- Avatar (solo login) --- */
.avatar {
  width: 92px;
  height: 92px;
  margin-bottom: 20px;
  border-radius: 50%;
  overflow: hidden;
  background: #e0e7ff;
  box-shadow: 0 2px 8px #6a11cb33;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* --- Responsive para portátil y móvil --- */
@media (max-width: 600px) {
  .login-box {
    max-width: 98vw;
    padding: 18px 4vw 18px 4vw;
  }
  .blur-bg {
    filter: blur(7px) brightness(0.8);
  }
  h2 {
    font-size: 1.3em;
  }
}