/* === RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* === BACKGROUND WITH ANIMATION === */
section {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  background-image: url(bg.webp);
  background-size: cover;
  background-position: center;
  animation: animateBg 5s linear infinite;
}

/* === BACKGROUND COLOR ANIMATION === */
@keyframes animateBg {
  100% {
    filter: hue-rotate(360deg);
  }
}

/* === LOGIN / SIGNUP BOX === */
.login-box {
  position: relative;
  width: 400px;
  padding: 40px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  backdrop-filter: blur(15px);
}

/* === TITLE === */
h2 {
  font-size: 2em;
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
}

/* === INPUT FIELDS === */
.input-box {
  position: relative;
  width: 100%;
  margin: 30px 0;
  border-bottom: 2px solid #fff;
}

.input-box label {
  position: absolute;
  top: 74%;
  left: 5px;
  transform: translateY(-50%);
  font-size: 1em;
  color: #fff;
  pointer-events: none;
  transition: 0.5s;
}

.input-box input {
  width: 100%;
  height: 50px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1em;
  color: #fff;
  padding: 0 35px 0 5px;
}

.input-box input:focus~label,
.input-box input:not(:placeholder-shown)~label,
.input-box input[type="file"]:focus~label,
.input-box input[type="file"]:valid~label {
  top: -5px;
}

.input-box input[type="file"] {
  padding-top: 15px;
}

/* === ICON === */
.input-box .icon {
  position: absolute;
  right: 8px;
  color: #fff;
  font-size: 1.2em;
  line-height: 57px;
}

/* === REMEMBER === */
.remember-forget {
  margin: -15px 0 15px;
  font-size: .9em;
  color: #fff;
  display: flex;
  justify-content: space-between;
}

.remember-forget a {
  color: #fff;
  text-decoration: none;
}

.remember-forget a:hover {
  text-decoration: underline;
}

/* === BUTTON === */
button {
  width: 100%;
  height: 40px;
  background: #fff;
  border: none;
  outline: none;
  border-radius: 40px;
  cursor: pointer;
  font-size: 1em;
  color: #000;
  font-weight: 500;
}

/* === LINKS === */
.register-link {
  font-size: .9em;
  color: #fff;
  text-align: center;
  margin-top: 20px;
}

.register-link a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.register-link a:hover {
  text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
  .login-box {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    /* Full screen on mobile */
    border: none;
    border-radius: 0;
    padding: 20px;
    /* Reduced padding */
  }

  h2 {
    font-size: 1.5em;
    /* Smaller title */
  }
}

/* Fix Input Zoom on Mobile */
@media (max-width: 768px) {
  .login-box {
    width: 90%;
    /* Center with margin */
    max-width: 400px;
  }

  /* Override full screen effect for slightly larger mobiles if desired, 
     but keeping the 480px rule above effectively makes it full screen on small mobile. 
     Let's Unify. 
  */
}

/* Unified Mobile Styles */
@media (max-width: 768px) {
  .login-box {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    /* Center it */
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
    /* Prevent Zoom */
  }
}

@media (max-width: 425px) {
  .login-box {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
  }
}