.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
}

.modal-content-login {
    padding: 3rem 1.5rem 2rem 1.5rem; /* Espacio extra arriba para el botón cerrar */
    border-radius: 10px;
    width: 90%; /* Ajuste principal para móvil */
    max-width: 450px; /* En PC no pasará de este tamaño */
    min-width: 300px;
    height: auto;
    color: black;
    background: #f4f4f7;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 95vh;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
    box-sizing: border-box;
}

/* BOTÓN CERRAR (Posición absoluta para no estorbar) */
.close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: clamp(16px, 3vw, 20px);
    cursor: pointer;
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    padding: 8px 12px;
    color: white;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
}

.close:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #c82333 0%, #6a0f0f 100%);
}

#login-image {
  display: block;           
  margin: 0 auto 1.5rem auto; 
  max-width: 250px; /* Un poco más chico para móviles */
  width: 100%;              
  height: auto;            
}

#cont-form-login {
  padding: 0 clamp(10px, 4vw, 30px); /* Padding dinámico */
}

.SpaceLogin {
  margin-bottom: 1.5rem;
}

.labelLogin {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: block; /* Para que el input baje automáticamente sin usar <br> */
}

form { width: 100%; }

.input-login {
  background-color: #F5F5F5;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
}

.campo-password {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: #F5F5F5;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding-right: 10px;
}

.campo-password .input-login {
  border: none;
  background: transparent;
}

.ButtonEyePassword {
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#buttonEye {
  font-size: 24px;
  color: #333333;
}

#olv-contra {
  color: rgb(16, 0, 240);
  float: right;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.buttons {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  clear: both; /* Asegura que baje después del float de olvidaste contraseña */
}

#button-iniciar, #buttonCrear, .botonesUser {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;       
    padding: 12px 20px;   
    border-radius: 8px;
    font-size: clamp(1rem, 3vw, 1.1rem);
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

#button-iniciar, .Botonrojo {
    color: #fff;
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#buttonCrear, .Botonverde {
    color: #fff;
    background: linear-gradient(135deg, #4C8F43 0%, #3a6b34 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#button-iniciar:hover, .Botonrojo:hover { background: linear-gradient(135deg, #c82333 0%, #6a0f0f 100%); transform: translateY(-2px); }
#buttonCrear:hover, .Botonverde:hover { background: linear-gradient(135deg, #3a6b34 0%, #2d5528 100%); transform: translateY(-2px); }

/* SEPARADOR DEL LOGIN */
.divisor {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #525252;
    font-size: 0.9rem;
}
.divisor::before, .divisor::after { content: ''; flex: 1; border-bottom: 1px solid #ccc; }
.divisor span { padding: 0 15px; }

/* REDES SOCIALES */
.redes-sociales { display: flex; flex-direction: column; gap: 10px; }
.BotonFacebook {
    display: flex; justify-content: center; align-items: center;
    width: 100%; padding: 12px; border-radius: 8px; font-size: 1rem; font-weight: bold;
    cursor: pointer; transition: all 0.3s ease;
    background-color: #1877f2; color: #ffffff; border: none;
}
.BotonFacebook:hover { background-color: #166fe5; transform: translateY(-1px); }