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

/* variables */
:root {
  --primary-color: -webkit-linear-gradient(
    90deg,
    rgb(71, 222, 185) 0%,
    rgb(100, 176, 57) 100%
  );
  --primary-gradient: linear-gradient(
    90deg,
    rgb(71, 222, 185) 0%,
    rgb(100, 176, 57) 100%
  );
  --secondary-color: rgb(100, 176, 57);
  --text-color: rgb(33, 33, 33);
  --field-color: rgb(232, 232, 232);
  --field-focus-color: rgb(240, 240, 240);
  --text-color-2: rgb(255, 255, 255);
  --text-color-3: rgb(220, 220, 220);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --button-shadow: 0 8px 20px rgba(71, 222, 185, 0.3);
}

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

body {
  font-family: "Poppins", "Rajdhani", sans-serif;
  width: 100%;
  position: relative;
  height: auto;
  overflow-x: hidden;
  background-color: #f9f9f9;
}

main {
  width: 100%;
  min-height: 100vh;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-container {
  display: flex;
  max-width: 1200px;
  width: 100%;
  height: 700px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  position: relative;
  background-color: #fff;
  animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.side {
  background-image: url(../../../images/bg_padrao.png);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 45%;
  padding: 60px;
  position: relative;
  z-index: 10;
  animation: slideIn 1s ease-in-out;
  box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.4);
}

@keyframes slideIn {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.main-heading {
  font-size: 48px;
  color: var(--text-color-2);
  font-weight: bold;
  line-height: 1.1;
  margin-bottom: 20px;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

.highlight-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

article p {
  font-size: 18px;
  color: var(--text-color-3);
  line-height: 1.6;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
  animation: fadeInUp 1.4s ease-in-out;
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.social {
  position: absolute;
  bottom: 40px;
  left: 60px;
  display: flex;
  align-items: center;
  animation: fadeInUp 1.6s ease-in-out;
}

.social span {
  font-size: 16px;
  color: var(--text-color-2);
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 12px;
}

.social i {
  border-radius: 50%;
  background-color: var(--text-color-2);
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  font-size: 16px;
  color: rgb(21, 21, 21);
  margin: 0 6px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social i:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  color: var(--secondary-color);
}

.form {
  background-color: var(--text-color-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 55%;
  padding: 60px;
  position: relative;
  z-index: 5;
  animation: slideInRight 1.2s ease-in-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.form-text {
  margin-bottom: 30px;
}

.form-text h3 {
  font-size: 36px;
  color: var(--text-color);
  font-weight: bold;
  margin-bottom: 15px;
}

.form-text span {
  font-size: 16px;
  color: #666;
  font-weight: 400;
  display: block;
  margin-top: 8px;
}

.form-text .join,
.form-text .create {
  text-decoration: none;
  color: var(--secondary-color);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  transition: all 0.3s ease;
}

.form-text .join:hover,
.form-text .create:hover {
  color: rgb(71, 222, 185);
  text-decoration: underline;
}

form {
  margin-top: 20px;
  width: 100%;
}

.input-field {
  margin-bottom: 30px;
  transition: all 0.4s;
  position: relative;
  width: 100%;
  height: 60px;
  min-height: 60px;
  background-color: transparent;
  animation: fadeInUp 1s ease-in-out;
  animation-fill-mode: both;
  opacity: 1;
}

.input-field:nth-child(2) {
  animation-delay: 0.2s;
}

.input-field:nth-child(3) {
  animation-delay: 0.4s;
}

.input-field input {
  border: 0;
  border-radius: 8px;
  background-color: var(--field-color);
  width: 100%;
  transition: all 0.4s;
  height: 100%;
  font-size: 16px;
  color: var(--text-color);
  font-weight: normal;
  padding: 12px 20px;
  padding-top: 20px;
}

.input-field input:focus {
  outline: 0;
  background-color: var(--field-focus-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--secondary-color);
}

.input-field label i {
  font-size: 14px;
  margin-right: 8px;
}

.input-field label {
  position: absolute;
  transition: all 0.3s;
  pointer-events: none;
  left: 20px;
  top: 18px;
  font-size: 16px;
  color: rgb(125, 127, 128);
}

.input-field:focus-within label {
  transform: translateY(-12px) scale(0.8);
  top: 10px;
  left: 16px;
  color: var(--secondary-color);
  font-weight: 600;
}

.input-field input:valid + label {
  transform: translateY(-12px) scale(0.8);
  top: 10px;
  left: 16px;
  color: var(--secondary-color);
  font-weight: 600;
}

.radio-field {
  display: flex;
  width: auto;
  align-items: center;
  margin-top: 20px;
  animation: fadeInUp 1.4s ease-in-out;
}

.radio-field input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--field-color);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-field input[type="checkbox"]:checked {
  background-image: var(--primary-gradient);
}

.radio-field input[type="checkbox"]::before {
  content: "\f00d";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 14px;
  color: var(--text-color-2);
  position: absolute;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 24px;
  transition: all 0.3s;
  opacity: 0;
}

.radio-field input[type="checkbox"]:checked::before {
  content: "\f00c";
  opacity: 1;
}

.radio-field input[type="checkbox"]:hover {
  transform: scale(1.05);
}

.radio-field label {
  font-size: 15px;
  color: #666;
  font-weight: 500;
  margin-left: 12px;
}

form .form-btn {
  border-radius: 10px;
  border: 0;
  background-image: var(--primary-gradient);
  padding: 0 50px;
  height: 55px;
  font-size: 16px;
  color: var(--text-color-2);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: var(--button-shadow);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: fadeInUp 1.6s ease-in-out;
}

form .form-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

form .form-btn:hover::before {
  width: 100%;
}

form .form-btn span {
  pointer-events: none;
  position: relative;
  z-index: 10;
}

form .form-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(71, 222, 185, 0.4);
}

form .form-btn:active {
  transform: translateY(0px);
  box-shadow: 0 5px 15px rgba(71, 222, 185, 0.3);
}

.con-text {
  margin-top: 30px;
  animation: fadeInUp 1.8s ease-in-out;
}

.con-text p {
  font-size: 15px;
  color: #666;
  text-align: center;
}

.con-text p a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.con-text p a:hover {
  color: rgb(71, 222, 185);
  text-decoration: underline;
}

.signup {
  display: none;
}

.login {
  display: block;
}

#sub img {
  width: 60px;
  transition: all 0.3s ease;
}

#sub:hover img {
  transform: scale(1.1);
}

#error {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background-color: #ff4444;
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(255, 68, 68, 0.3);
  opacity: 0;
  transform: translateY(-20px);
  animation: slideInError 0.5s forwards;
}

@keyframes slideInError {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.invalid {
  border-left: solid 4px #ff4444 !important;
  animation: shake 0.5s !important;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Responsividade */
@media (max-width: 992px) {
  .login-container {
    flex-direction: column;
    height: auto;
    max-width: 600px;
  }

  .side,
  .form {
    width: 100%;
    padding: 40px;
  }

  .side {
    padding-bottom: 100px;
  }

  .main-heading {
    font-size: 40px;
  }

  .social {
    left: 40px;
  }
}
