/* Paleta de colores */
:root{
  --colorPrimario:#345f77; 
  --colorSecundario:#93e0ef;
  --colorFondo:#eff8e1;
  --colorElementos:#b7d9b6;
  --colorNeutro:#447551;
  --error: #ff0000;
  --negro: #000;
  --blanco: #fff;
}

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

body {
  font-family: 'Arvo', serif;
  font-family: 'Diphylleia', serif;
  background-color: var(--colorPrimario);
  margin: 1rem 4rem;
}

.flex{
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  font-size: .8rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--colorSecundario);
}

/* Formulario de registro */
.registrarse {
  color: var(--colorPrimario);
  font-size: .8rem;
  padding: 1rem 2rem;
  text-align: center;
  max-width: 400rem;
  background-color: var(--colorFondo);
  border-radius: 12px;
}

fieldset {
  border: hidden;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

legend {
  font-size: .8rem;
  width: 100%;
  border-bottom: 1px solid var(--colorElementos); 
  padding-bottom: .5rem;
}
  
input {
  padding: .3rem;
  margin-bottom: 8px;
  border: 2px solid var(--colorElementos);
  border-radius: 4px;
}

@media (min-width: 375px) {
  header{
    font-size: 1rem;
  }

  .registrarse{
    font-size: .9rem;
  }

  legend{
    font-size: .9rem;
  }

  input{
    padding: .5rem;
  }
}

@media (min-width: 425px) {
  .registrarse{
    font-size: 1rem;
  }

  legend{
    font-size: 1rem;
  }
  
}

.campo {
  max-width: 30rem;
}

/* Mensajes de error */
#noMatchC, #noMatchT, #savedT, #savedC,
#noSavedN, #noSavedC, #noSavedT, #errorT{
  color: var(--error);
}

a {
  text-decoration: none;
  color: var(--colorNeutro);
}

a:hover{
  text-decoration: underline;
}
  
.enviar {
  border: 0;
  background-color: var(--colorNeutro);
  color: var(--colorFondo);
  cursor: pointer;
}

.enviar:hover {
  background-color: var(--colorElementos);
  color: var(--colorNeutro);
}

/* Ventanas */

dialog {
  border: 3px solid var(--colorElementos);
  background-color: var(--colorFondo);
  margin: 1rem;
  padding: 1rem;
  font-family: 'Crimson Text', serif;
  width: 15rem;
  max-height: 31rem;
  top: 50%;
  left: 50%;
  transform: translate(-57%, -50%);
}


/* Ventana de términos y de ayuda */

#ventanaT p {
  margin: 1rem 0;
}

#ventanaA h2 {
  color: var(--colorPrimario);
  padding: .2rem;
  border-bottom: 1px solid var(--colorElementos);
  margin-bottom: 1rem;
}

#ventanaA summary {
  color: var(--colorPrimario);
  border-bottom: 1px solid var(--colorElementos);
  margin: .3rem 0;
}

#cerrarT, #cerrarA {
  background-color: var(--colorNeutro);
  color: var(--colorFondo);
  border: 0;
  border-radius: 4px;
  margin-top: .5rem;
  padding: .2rem 1rem;
}

#cerrarT:hover, #cerrarA:hover {
  background-color: var(--colorElementos);
  color: var(--colorNeutro);
}

#ventanaIS {
  position: relative;
  padding: .5rem;
  font-family: 'Arvo', serif;
  font-family: 'Diphylleia', serif;
}

#ventanaIS legend {
  padding: .5rem;
  border-top: 1px solid var(--colorElementos);
}

#cerrarIS {
  margin-bottom: .2rem;
  border-radius: 4px;
  border: 0;
  background-color: var(--colorNeutro);
  width: 1.3rem;
  height: 1.2rem;
  color: var(--colorElementos);
}

#cerrarIS:hover {
  background-color: var(--colorElementos);
  color: var(--colorNeutro);
}

.contBoton {
  text-align: right;
}

/*Pantallas grandes*/
@media (min-width: 768px) {
  .flex {
    flex-direction: row;
    justify-content: center;
  }

  header {
    font-size: 1.2rem;
    width: 10rem;
    margin: 0 15%;
  }

  .registrarse {
    text-align: center;
    width: 30rem;
    margin: 0 15%;
    padding: 1rem 2rem;
  }

  label {
    margin-top: .5rem;
  }

  input {
    width: 20rem;
    margin-bottom: 15px;
  }

  dialog {
    width: 25rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  
}
  
/* footer styles */
footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--colorElementos);
}

.creditos {
  color: var(--blanco);
}

ul {
  list-style: none;
}
  
footer a {
  
  color: var(--colorElementos);
  display: flex;
  justify-content: center;
}

/*Fondo de pantalla*/
.fondo {
  z-index: -1;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}


/* Agrega estos estilos para la pantalla de carga */
.loader-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.3);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.loader {
  border: 8px solid var(--colorPrimario);
  border-top: 8px solid var(--colorSecundario);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: cargando 1s linear infinite;
}

@keyframes cargando {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
