:root {
  --deep-clr: #040463;
  --light-clr: #5a9fd3;
  --white-clr: #fff;
}

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

body {
  min-height: 100vh;
  padding: 20px;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url(bg.png) no-repeat center center/cover;
}

.form-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  max-width: 31.25rem;
  width: 100%;
  padding: 40px;
  aspect-ratio: auto;
  min-height: 480px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(42, 126, 188, 0.4);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  outline: 3px solid var(--light-clr);
  outline-offset: -15px;
  animation: bounce 0.8s linear;
}

h2 {
  margin-bottom: 2em;
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(1.3rem, 5.5vw, 2.2rem);
  color: var(--deep-clr);
  animation: showText 1.5s linear;
  text-align: center;
  font-weight: 700;
}

.input-group {
  position: relative;
  margin-bottom: 30px;
  width: 100%;
}

.input-group:last-of-type {
  margin-bottom: 15px;
}

form {
  width: 100%;
  padding: 0 5%;
  animation: showText 1.5s linear;
}

.input-group input {
  display: block;
  width: 100%;
  padding: 8px 5px;
  border: 0;
  outline: 0;
  background: transparent;
  border-bottom: 2px solid var(--white-clr);
  color: var(--white-clr);
  font-size: 1rem;
  transition: 0.5s;
}

.input-group label {
  position: absolute;
  top: 8px;
  left: 5px;
  color: rgba(255, 255, 255, 0.8);
  transition: 0.5s;
  pointer-events: none;
}

.input-group input:focus,
.input-group input:valid,
.input-group input:not(:placeholder-shown) {
  border-bottom-color: var(--deep-clr);
}

.input-group input:focus~label,
.input-group input:valid~label,
.input-group input:not(:placeholder-shown)~label {
  font-size: 0.75rem;
  top: -12px;
  color: var(--deep-clr);
}

.forget-pass {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--deep-clr);
  margin-bottom: 25px;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.forget-pass:hover {
  text-decoration: underline;
  opacity: 1;
}

.error-message {
  color: #ff4d4d;
  font-size: 0.8rem;
  margin-top: -10px;
  margin-bottom: 15px;
  display: block;
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--deep-clr);
  border-radius: 8px;
  border: 0;
  background: var(--light-clr);
  padding: 10px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  outline: 2px solid var(--light-clr);
  outline-offset: -4px;
  transition: all 0.3s ease;
  text-decoration: none;
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.btn:hover {
  background: var(--deep-clr);
  color: var(--white-clr);
  outline-color: var(--deep-clr);
}

/* Responsive Styles for Mobile Devices */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .form-wrapper {
    padding: 25px 20px;
    min-height: auto;
    outline: 2px solid var(--light-clr);
    outline-offset: -10px;
  }

  h2 {
    margin-bottom: 1.5em;
  }

  form {
    padding: 0;
  }

  .input-group {
    margin-bottom: 25px;
  }

  .button-group {
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
  }

  .btn {
    width: 100%;
    flex: none;
    padding: 12px 20px;
    font-size: 1rem;
  }
}

/* Animations */
@keyframes showText {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounce {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }

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