@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800;900&display=swap");

:root {
  --text-clr: #e0e8ef;
  --error-clr: #b02546;
  --success-clr: #2ecc71;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Nunito", sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: url(images/bg.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 100vh;
}

section {
  background: rgba(200, 200, 224, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 5px;
  overflow: hidden;
  width: min(420px, 95%);
}

h1 {
  font-size: 1.6rem;
  color: var(--text-clr);
  text-align: center;
  padding: 20px 40px 0;
}

/* FORM  */

form {
  padding: 30px 40px;
}

label {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-clr);
  margin-bottom: 8px;
}

input {
  width: 100%;
  background: transparent;
  color: #e0e8efb8;
  font-size: 0.8rem;
  font-weight: 500;
  outline: 2px solid #a2b7d3;
  border-radius: 4px;
  border: 0;
  padding: 10px;
  margin-bottom: 5px;
  transition: all 0.2s;
}

input:focus {
  outline: 3px dotted var(--text-clr);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--text-clr);
}

.input-control.success input {
  outline: 3px dotted var(--success-clr);
}

.input-control.error input {
  outline: 3px dotted var(--error-clr);
}

.input-control {
  position: relative;
  margin-bottom: 20px;
}

.input-control i {
  position: absolute;
  top: 40px;
  right: 10px;
  visibility: hidden;
}

.input-control.success i.fa-check-circle {
  color: var(--success-clr);
  visibility: visible;
}

.input-control.error i.fa-exclamation-circle {
  color: var(--error-clr);
  visibility: visible;
}

.input-control small {
  position: absolute;
  bottom: 0;
  left: 0;
  font-weight: 800;
  visibility: hidden;
}

.input-control.error small {
  color: var(--error-clr);
  visibility: visible;
}

button {
  width: 100%;
  background: #b586b9;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  padding: 16px;
  margin-top: 10px;
  border-radius: 5px;
  border: 0;
  cursor: pointer;
  transition: all 0.4s linear;
}

button:hover {
  background: #68496b;
}

/* SHOW MESSAGE AFTER SUBMITTING  */

.message {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-clr);
  text-align: center;
  text-transform: uppercase;
  padding: 50px 30px;
  animation: fade-in 1.5s ease-in-out forwards alternate;
}

.hidden {
  display: none;
}

@keyframes fade-in {
  from {
    transform: rotate(0deg) scale(0) skew(0deg) translateY(30px);
  }
  to {
    transform: rotate(0deg) scale(1) skew(0deg) translateY(0);
  }
}
