/* CSS del inicio de sesión */

/* KM = Principal paleta de colores */
:root {
  --rosa_claro: #f7acc6;
  --rosa_oscuro: #f26a9a;
  --morado_claro: #b592bd;
  --morado_oscuro: #70338a;
  --morado_oscuro-dos: #70338a;
  --naranja_claro: #f4a261;
  --naranja_oscuro: #e76f51;
  --crema_claro: #fff9e6;
  --crema_oscuro: #f2e4c3;
  --durazno: #ffd6c1;
  --lavanda: #e6d6f3;
  --mantequilla: #fff4b8;
  --negro: #151414;
  --negro_cálido: #2d2a2a;
  --gris: #868686;
  --gris_oscuro: #3c3c3c;
  --blanco: #ffffff;
  --segundo-blanco: #fff;
  --sombra: rgba(0, 0, 0, 0.381);
  --sombrita: rgba(255, 255, 255, 0.773);
  --sombre: rgba(62, 0, 55, 0.6);
}

/* KM = Colores para modo oscuro de la pagina*/
.dark-mode {
  --rosa_claro: #b45f7d;
  --rosa_oscuro: #944062;
  --morado_claro: #4a1467;
  --morado_oscuro: #210c2b;
  --morado_oscuro-dos: #c1a7e4;
  --naranja_claro: #bf5c3a;
  --naranja_oscuro: #9a3f2c;
  --crema_claro: #3b2f2f;
  --crema_oscuro: #2e2323;
  --durazno: #a84f3a;
  --lavanda: #9270c2;
  --mantequilla: #bfa565;
  --negro: #ffffff;
  --negro_cálido: #ffffff;
  --gris: #b9b6b6;
  --gris_oscuro: #ffffff;
  --blanco: #000;
  --segundo-blanco: #fff;
  --sombrita: rgba(0, 0, 0, 0.074);
  --sombra: rgba(255, 255, 255, 0.53);
  --sombre: rgba(36, 2, 34, 0.688);
}

/*KM = Carga de tipografías */
@font-face {
  font-family: 'Chewy'; 
  src: url('../../libreria/tipografia/Chewy/Chewy-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Comic_Neue';
  src: url('../../libreria/tipografia/Comic_Neue/ComicNeue-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Shadows_Into_Light'; 
  src: url('../../libreria/tipografia/Shadows_Into_Light/ShadowsIntoLight-Regular.ttf') format('truetype');
}

/*KM = Estilo general de la página */
body {
  font-family: "Comic_Neue", sans-serif;
  background-color: var(--morado_oscuro);
  margin: 0;
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

/*KM = Contenedor principal del formulario */
.form-sesion {
  width: 90%;
  max-width: 340px;
  background-color: var(--blanco);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
  text-align: center;
}

/*KM = Estilo del título */
.titulo {
  font-size: 26px;
  font-weight: bold;
  color: var(--morado_oscuro-dos);
  margin-top: 10px;
  margin-bottom: 18px;
}

/*KM = Introduccion :) */
.intro {
  font-size: 14px;
  color: var(--negro);
  margin-bottom: 20px;
  padding: 0 10px;
}

.opcion.usuario { 
  background-color: var(--rosa_claro); 
}  

.btn-rol.usuario { 
  background-color: var(--rosa_oscuro); 
} 

.opcion.apoyo { 
  background-color: var(--morado_claro);  
} 

.btn-rol.apoyo { 
  background-color: var(--morado_oscuro-dos);
}  

/*KM = Contenedor de los roles */
.seleccion-rol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

/*KM = Iconos */
.icono-rol {
  width: 80px;
  height: 80px;
  margin-top: 3px;
  margin-bottom: 30px;
  filter: drop-shadow(0 0 10px --sombre); 
  transition: filter 0.3s ease-in-out;
}

/* KM = Estilo de cada opción */
.opcion {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 250px;
  background-color: var(--morado_claro);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 10px var(--sombre);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

.opcion::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 12px;
  background: linear-gradient(45deg, #ff6ec4, #7873f5, #ff6ec4);
  filter: blur(10px);
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
  z-index: -1;
}

.opcion:hover::before {
  opacity: 1;
}

.opcion:hover {
  transform: scale(1.05);
  background-color: var(--rosa_claro);
}

/* Estilos para los botones de selección */
.btn-rol {
  display: inline-block;
  width: 90%;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  background: var(--morado_oscuro-dos);
  color: var(--segundo-blanco);
  font-size: 16px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  margin-bottom: 6px;
}

.btn-rol:hover {
  background: var(--rosa_oscuro);
}

.btn-glow {
  display: block; 
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 14px;
}

/*KM = Fondo de partículas */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background-color: var(--morado_oscuro);
}

/* KM = Botones de modo oscuro y subidon de ...*/
.modo-flotante {
  position: fixed;
  top: 8px;
  right: 1.5rem;
  background: var(--rosa_oscuro);
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icono-modo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  pointer-events: none;
}

.scroll-top-btn {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  background: var(--morado_claro);
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-btn:hover {
  transform: scale(1.05);
}

.icono-flota {
  width: 28px;
  height: 28px;
  animation: floatUpDown 4s ease-in-out infinite;
}

.error-message {
  color: var(--rosa_claro);
  font-size: 13px;
  margin-bottom: 6px;
  display: block;
  word-wrap: break-word;
  white-space: normal;
}

/*KM = Móviles más grandes */
@media screen and (min-width: 480px) {
  .form-sesion {
    width: 400px;
    padding: 30px;
  }
  .titulo {
    font-size: 28px;
  }

  /* KM = Icono de modo oscuro */
  .modo-flotante {
    top: auto;
    position: fixed;
    bottom: 120px;
    right: 1.5rem;
    background: var(--rosa_oscuro);
    border: none;
    border-radius: 50%;
    width: 65px;
    height: 65px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 6px 16px var(--sombra);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .icono-modo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    pointer-events: none;
  }

  .dark-mode .modo-flotante {
    background: var(--negro);
    border: 1px solid var(--lavanda_claro);
  }

  /* KM = Scroll para poder subir al momento de bajar XD (Esa descripcion jajaja pero no se me ocurre nada mas) */
  .scroll-top-btn {
    top: auto;
    position: fixed;
    bottom: 210px;
    right: 1.5rem;
    background: var(--morado_claro);
    border: none;
    border-radius: 50%;
    width: 72px;
    height: 72px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 6px 16px var(--sombra);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.9);
  }

  .scroll-top-btn:hover {
    transform: scale(1.1);
  }

  .scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .icono-flota {
    width: 40px;
    height: 40px;
    object-fit: contain;
    pointer-events: none;
    animation: floatUpDown 4s ease-in-out infinite;
  }
}

/*KM = Tablets */
@media screen and (min-width: 768px) {
  .form-sesion {
    width: fit-content;
    max-width: 750px; 
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
  }

  .titulo {
    font-size: 30px;
  }

  .intro {
    font-size: 16px;
    margin-bottom: 18px;
  }

  .btn-rol {
    font-size: 18px;
  }

  .btn-glow {
    font-size: 16px;
    margin-top: 30px;
  }

  .seleccion-rol {
    flex-direction: row;
    justify-content: center;
    gap: 30px;
    width: auto; 
    padding: 20px;
  }

  .opcion {
    flex-grow: 1;
    max-width: 360px; 
    min-width: 250px;
    height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 12px;
  }
}

/*KM = Escritorio */
@media screen and (min-width: 950px) {
  .form-sesion {
    width: fit-content;  
    max-width: 850px;  
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

  .titulo {
    font-size: 32px;
  }

  .intro{
    font-size: 16px;
    margin-bottom: 20px;
  }

  .btn-rol {
    font-size: 18px;
  }

  .btn-glow{
    font-size: 16px;
    margin-top: 40px;
  }

  .seleccion-rol {
    flex-direction: row; 
    justify-content: center; 
    gap: 40px; 
    width: 100%;
  }

  .opcion {
    flex-grow: 1;
    max-width: 400px;
    min-width: 280px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
}

