/* Start general structure of the login */

/* Animate Logo */
.gradient {
  background: linear-gradient(45deg,#5a0099,#004e66, #1f8f3a, #004e66, #5a0099);
  background-size: 400% 400%;

  /* Langsame Animation: 40s für "hin", 40s für "zurück" (insgesamt 80s = 5-20px/s, je nach Viewport) */
  -webkit-animation: PortalGradientMove 40s ease-in-out infinite alternate;
  -moz-animation: PortalGradientMove 40s ease-in-out infinite alternate;
  animation: PortalGradientMove 40s ease-in-out infinite alternate;
  border: 0px solid white;
  width: 100%;
  overflow: hidden;
  height: 100%;
  position: absolute; 
  top: 0; 
  left: 0;
}

@-webkit-keyframes PortalGradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@-moz-keyframes PortalGradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes PortalGradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.logo {
  width: 18%;
  max-width: 180px;
  height: auto;
  object-fit: contain;
  border: 0px solid #ffffff;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: absolute;
}

/* Login Form */
.login-form {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 280px;
}

.input-group {
  width: 100%;
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 12px 15px;
  background: transparent;
  border: 2px solid white;
  border-radius: 25px;
  color: white;
  font-size: 16px;
  font-family: 'Chillax', sans-serif;
  outline: none;
  box-sizing: border-box;
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.input-group input:focus {
  border-color: rgba(255, 255, 255, 0.8);
}

/* Password field with toggle */
.password-group {
  position: relative;
}

.password-group input {
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password svg {
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toggle-password:hover svg {
  opacity: 1;
}

/* Minimalistic login button */
.login-btn {
  width: 50px;
  height: 50px;
  padding: 0;
  background: white;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
  margin-top: 10px;
}

.login-btn svg {
  color: #5a0099;
}

.login-btn:hover {
  transform: scale(1.05);
}

.login-btn:active {
  transform: scale(0.95);
}

/* Error state - lime green border */
.login-form.error .input-group input {
  border-color: #a4ff2f;
}

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

.login-form.shake {
  animation: shake 0.5s ease-in-out;
}

/* Mobile Responsiveness */
@media screen and (max-width: 480px) {
  .logo {
    width: 50%;
    max-width: 200px;
    top: 25%;
  }

  .login-form {
    width: 85%;
    max-width: 280px;
    top: 55%;
    gap: 12px;
  }

  .input-group input {
    padding: 14px 15px;
    font-size: 16px;
  }

  .login-btn {
    width: 56px;
    height: 56px;
  }
}

@media screen and (max-width: 360px) {
  .logo {
    top: 22%;
  }

  .login-form {
    top: 52%;
  }

  .input-group input {
    padding: 12px 15px;
    font-size: 14px;
  }
}

/* Google Font */

