@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body{
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5372F0;
}
::selection{
  color: #fff;
  background: #5372F0;
}
.wrapper{
  width:  px;
  padding: 40px 30px 50px 30px;
  background: #fff;
  border-radius: 5px;
  text-align: center;
  box-shadow: 10px 10px 15px rgba(0,0,0,0.1);
}
.wrapper header{
  font-size: 35px;
  font-weight: 600;
}
.wrapper form{
  margin: 30px 0;
}
form .field{
  width: 100%;
  margin-bottom: 20px;
}
form .field.shake{
  animation: shake 0.3s ease-in-out;
}
@keyframes shake {
  0%, 100%{
    margin-left: 0px;
  }
  20%, 80%{
    margin-left: -12px;
  }
  40%, 60%{
    margin-left: 12px;
  }
}
form .field .input-area{
  height: 50px;
  width: 100%;
  position: relative;
}
form input{
  width: 100%;
  height: 100%;
  outline: none;
  padding: 0 45px;
  font-size: 18px;
  background: none;
  caret-color: #5372F0;
  border-radius: 5px;
  border: 1px solid #bfbfbf;
  border-bottom-width: 2px;
  transition: all 0.2s ease;
}
form .field input:focus,
form .field.valid input{
  border-color: #5372F0;
}
form .field.shake input,
form .field.error input{
  border-color: #dc3545;
}
.field .input-area i{
  position: absolute;
  top: 50%;
  font-size: 18px;
  pointer-events: none;
  transform: translateY(-50%);
}
.input-area .icon{
  left: 15px;
  color: #bfbfbf;
  transition: color 0.2s ease;
}
.input-area .error-icon{
  right: 15px;
  color: #dc3545;
}
form input:focus ~ .icon,
form .field.valid .icon{
  color: #5372F0;
}
form .field.shake input:focus ~ .icon,
form .field.error input:focus ~ .icon{
  color: #bfbfbf;
}
form input::placeholder{
  color: #bfbfbf;
  font-size: 17px;
}
form .field .error-txt{
  color: #dc3545;
  text-align: left;
  margin-top: 5px;
}
form .field .error{
  display: none;
}
form .field.shake .error,
form .field.error .error{
  display: block;
}
form .pass-txt{
  text-align: left;
  margin-top: -10px;
}
.wrapper a{
  color: #5372F0;
  text-decoration: none;
}
.wrapper a:hover{
  text-decoration: underline;
}
/* Genel Buton Stili */
.btn-login {
  background-color: #007bff; /* Mavi arka plan */
  color: white; /* Yazı rengi beyaz */
  font-size: 14px; /* Yazı boyutu */
  padding: 12px 28px; /* Yatay ve dikey iç boşluk */
  border: none; /* Kenarlık yok */
  border-radius: 8px; /* Hafif yuvarlatılmış köşeler */
  text-align: center;
  cursor: pointer; /* Tıklanabilir işaret */
  transition: all 0.3s ease; /* Geçiş animasyonu */
  box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3); /* Hafif gölge */
}

/* Hover Durumu */
.btn-login:hover {
  background-color: #0056b3; /* Daha koyu mavi */
  transform: scale(1.05); /* Hafif büyüme efekti */
  box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4); /* Daha belirgin gölge */
}

/* Aktif Durum */
.btn-login:active {
  background-color: #004085; /* Daha koyu mavi tıklandığında */
  transform: scale(0.98); /* Tıklanırken küçülme */
  box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3); /* Gölgeyi eski haline getir */
}

/* Focus Durumu (Klavyeyle tıklama) */
.btn-login:focus {
  outline: none; /* Kenarlık kaldırma */
  box-shadow: 0 0 12px rgba(0, 123, 255, 0.7); /* Mavi ışık efekti */
}

.field.PASS .input-area {
  position: relative;
  width: 100%;
}

.field.PASS input {
  width: 100%;
  padding: 10px;
  padding-left: 40px; /* Sol ikon için boşluk */
  padding-right: 40px; /* Sağ ikon için boşluk */
  box-sizing: border-box;
  font-size: 16px;
}

.field.PASS .icon, .field.PASS .error-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.field.PASS .icon {
  left: 10px; /* Kilit ikonunun sol tarafı */
}

.field.PASS .show-pass {
  position: absolute;
  right: 10px; /* Şifreyi göster/gizle ikonu sağda */
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
}

.field.PASS .error-txt {
  display: none;
  color: red;
}

/* Bunu ekledik; inputa tıklanmasını engellemiyor */
.field.PASS .input-area i {
  pointer-events: all;
}

.error-txt {
  display: flex;
  align-items: center;
  justify-content: center; /* Yazıyı ortalar */
  opacity: 0;
  animation: slideIn 2s forwards, fadeIn 2s 1s forwards;
  text-align: center; /* Yazıyı merkezde hizalar */
}

.kar-zarar-icon {
  margin-right: 10px;
  animation: bounceKarZararIcon 2s infinite;
}

@keyframes slideIn {
  0% {
    transform: translateX(-50px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes bounceKarZararIcon {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

