@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-image: linear-gradient(-45deg, #e5e7eb, #3b82f6, #e5e7eb);
  background-size: 400% 400%;
  animation: animatedGradient 10s ease infinite;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

@keyframes animatedGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.login-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.login-card {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: fadeSlideUp 0.8s ease-out;
}

@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card h1 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.login-form {
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-group label {
  font-weight: 500;
  color: var(--primary-text-color);
  font-size: 14px;
  margin-bottom: var(--spacing-sm);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: #9ca3af;
  font-size: 16px;
  transition: color 0.2s ease;
  z-index: 2;
}

.form-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  color: #333;
  background: white;
  transition: border-color 0.2s ease;
  outline: none;
}

.form-input::placeholder {
  color: #999;
}

.form-input:focus {
  border-color: #007bff;
}

.form-input:focus + .input-icon {
  color: #007bff;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: #007bff;
}

.form-button {
  width: 100%;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.form-button:hover {
  background-color: #0056b3;
}

.button-text {
  font-weight: 500;
}

.button-icon {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.form-button:hover .button-icon {
  transform: translateX(2px);
}

.error-message {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  background-color: #f8d7da;
  color: #721c24;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid #f5c6cb;
}

.closebtn {
  cursor: pointer;
  font-size: 16px;
  color: #721c24;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.closebtn:hover {
  opacity: 0.7;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  body {
    padding: 15px;
  }

  .login-card {
    padding: 25px 15px;
    border-radius: 10px;
  }

  .login-card h1 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .form-label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .form-input {
    padding: 10px 14px 10px 40px;
    font-size: 14px;
    border-radius: 6px;
  }

  .input-icon {
    left: 12px;
    font-size: 14px;
  }

  .toggle-password {
    right: 12px;
    font-size: 14px;
  }

  .form-button {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 6px;
  }

  .error-message {
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 15px;
  }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) and (max-width: 767px) {
  .login-card {
    padding: 35px 25px;
  }

  .login-card h1 {
    font-size: 22px;
    margin-bottom: 25px;
  }

  .form-input {
    padding: 11px 15px 11px 45px;
    font-size: 15px;
  }

  .form-button {
    padding: 11px 15px;
    font-size: 15px;
  }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  .login-container {
    max-width: 450px;
  }

  .login-card {
    padding: 40px;
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .login-container {
    max-width: 500px;
  }
}
