/*  RESET Y FUENTE BASE  */
* {
  font-family: 'Roboto', sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/*  VARIABLES DE COLOR (Modo oscuro)  */
:root {
  --bg-color: #222222;
  --form-bg: #171717;
  --input-bg: #282828;
  --text-color: #FFFFFF;
  --button-bg: #252525;
  --button-text: #FFFFFF;
  --logo-url: url('../src/img/logo-dark.png');
  --logomodo-url: url('../src/img/sun.png');
}

/*  BODY  */
body {
  background-image: url(../src/img/background.png);
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.index-body {
  background-image: url(../src/img/background.png);
}

/*  FORMULARIO  */
.form {
  max-width: 405px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 2em;
  background-color: var(--form-bg);
  border-radius: 25px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  transition: all 0.4s ease-in-out;
}

.form:hover {
  transform: scale(1.02);
}

/*  LOGO  */
.form-logo {
  background-image: url(../src/img/logo-dark.png);
  background-size: cover;
  background-position: center;
  width: 150px;
  height: 150px;
  display: block;
  margin: 0 auto 1em;
}

.form h1, .form h2, .form p {
  text-align: center;
  color: var(--text-color);
}

/*  CAMPOS DE INPUT  */
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6em;
  border-radius: 25px;
  background-color: var(--input-bg);
  box-shadow: inset 2px 5px 10px rgba(0,0,0,0.5);
}

.input-icon {
  height: 1.3em;
  width: 1.3em;
  fill: var(--text-color);
}

.input-field {
  background: none;
  border: none;
  outline: none;
  width: 100%;
  color: var(--text-color);
}

/*  BOTONES  */
.btn {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-top: 0em;
}

.button1 {
  display: block;
  width: 100%;
  text-decoration: none;
  background-color: var(--bg-color);
  padding: 0.75rem;
  text-align: center;
  color: var(--button-text);
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
}

.button1:hover, .button3:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.button3:hover {
  background-color: rgb(139, 139, 139);
  color: white;
}

/*  ENLACE DE CONTRASEÑA OLVIDADA  */
.forgot {
  display: flex;
  justify-content: flex-end;
  font-size: 0.75rem;
  line-height: 1rem;
  color: white;
  margin: 8px 0 14px 0;
}

.forgot a, .signup a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
}

.forgot a:hover, .signup a:hover {
  text-decoration: underline var(--text-color);
}

/*  ICONOS SOCIALES  */
.social-message {
  display: flex;
  align-items: center;
  padding-top: 1rem;
}

.social-message .message {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--text-color);
}

.social-icons {
  display: flex;
  justify-content: center;
}

.social-icons .icon {
  border-radius: 0.125rem;
  padding: 0.75rem;
  border: none;
  background-color: transparent;
  margin-left: 8px;
}

.social-icons .icon svg {
  height: 1.25rem;
  width: 1.25rem;
  fill: var(--text-color);
}

/*  RESPONSIVE  */
@media (max-width: 480px) {
  .form {
    width: 95%;
    padding: 1.5em;
  }
  .form-logo {
    width: 120px;
    height: 120px;
  }
}

/*  MENSAJES DE FORMULARIO (inline, sin alerts)  */
.form-msg {
  text-align: center;
  font-size: 0.85rem;
  min-height: 1.1rem;
  border-radius: 8px;
  padding: 0;
  transition: all 0.2s;
}

.form-msg--error {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  padding: 0.5rem 0.75rem;
}

.form-msg--success {
  color: #86efac;
  background: rgba(134, 239, 172, 0.1);
  padding: 0.5rem 0.75rem;
}

/*  AUTOCOMPLETADO DEL NAVEGADOR  */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-background-clip: text;
    -webkit-text-fill-color: white !important;
    box-shadow: none !important;
    border: none !important;
    transition: background-color 5000s ease-in-out 0s;
}
