/* Login Page Styles */

.box {
  position: relative;
  width: 380px;
  height: 500px;
  background: #1c1c1c;
  border-radius: 8px;
  overflow: hidden;
  padding: 10px;
}

.box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 380px;
  height: 420px;
  background: linear-gradient(
    0deg,
    transparent,
    transparent,
    #45f3ff,
    #45f3ff,
    #45f3ff
  );
  z-index: 1;
  transform-origin: bottom right;
  animation: animate 6s linear infinite;
}

.box::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 380px;
  height: 420px;
  background: linear-gradient(
    0deg,
    transparent,
    transparent,
    #45f3ff,
    #45f3ff,
    #45f3ff
  );
  z-index: 1;
  transform-origin: bottom right;
  animation: animate 6s linear infinite;
  animation-delay: -3s;
}

.borderLine::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 380px;
  height: 420px;
  background: linear-gradient(
    0deg,
    transparent,
    transparent,
    #ff2770,
    #ff2770,
    #ff2770
  );
  z-index: 1;
  transform-origin: bottom right;
  animation: animate 6s linear infinite;
  animation-delay: -1.5s;
}

.borderLine::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 380px;
  height: 420px;
  background: linear-gradient(
    0deg,
    transparent,
    transparent,
    #ff2770,
    #ff2770,
    #ff2770
  );
  z-index: 1;
  transform-origin: bottom right;
  animation: animate 6s linear infinite;
  animation-delay: -4.5s;
}

@keyframes animate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.box form {
  position: absolute;
  inset: 4px;
  background: #222;
  padding: 50px 40px;
  border-radius: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.box form h2 {
  color: #fff;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

/* Logo Section Styles */
.logo-section {
  text-align: center;
  margin-bottom: 20px;
}

.company-logo {
  max-width: 80px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.box form .inputBox {
  position: relative;
  margin-top: 35px;
}

.box form .inputBox input {
  position: relative;
  width: 100%;
  padding: 20px 10px 10px;
  background: transparent;
  outline: none;
  border: none;
  box-shadow: none;
  color: #fff;
  font-size: 1em;
  letter-spacing: 0.05em;
  transition: 0.5s;
  z-index: 10;
}

.box form .inputBox input:valid ~ span,
.box form .inputBox input:focus ~ span {
  color: #45f3ff;
  font-size: 0.75em;
  transform: translateY(-34px);
}

.box form .inputBox span {
  position: absolute;
  left: 0;
  padding: 20px 0px 10px;
  pointer-events: none;
  color: #8f8f8f;
  font-size: 1em;
  letter-spacing: 0.05em;
  transition: 0.5s;
}

.box form .inputBox i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #45f3ff;
  border-radius: 4px;
  overflow: hidden;
  transition: 0.5s;
  pointer-events: none;
}

.box form .inputBox input:valid ~ i,
.box form .inputBox input:focus ~ i {
  height: 44px;
}

/* Funny Password Security Guard Animation */
.password-field {
  position: relative;
}

.password-field::before {
  content: "🔫";
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
}

.password-field::after {
  content: "👮";
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
}

.password-field.focused::before {
  opacity: 1;
  animation: gunShake 0.5s ease-in-out;
}

.password-field.focused::after {
  opacity: 1;
  animation: guardReady 0.6s ease-in-out;
}

@keyframes gunShake {
  0%,
  100% {
    transform: translateY(-50%) rotate(0deg);
  }
  25% {
    transform: translateY(-50%) rotate(-5deg);
  }
  75% {
    transform: translateY(-50%) rotate(5deg);
  }
}

@keyframes guardReady {
  0% {
    transform: translateY(-50%) scale(0.5) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: translateY(-50%) scale(1.1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

.box form .links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.box form .links a {
  margin: 10px 0;
  font-size: 0.75em;
  color: #8f8f8f;
  text-decoration: none;
  transition: color 0.3s ease;
}

.box form .links a:hover,
.box form .links a:nth-child(2) {
  color: #45f3ff;
}

/* Remember Me Checkbox */
.form-check {
  display: flex;
  align-items: center;
  margin: 0;
}

.form-check-input {
  margin-right: 8px;
  accent-color: #45f3ff;
}

.form-check-label {
  color: #8f8f8f;
  font-size: 0.75em;
  margin: 0;
  cursor: pointer;
}

/* Submit Button */
#submit {
  border: none;
  outline: none;
  padding: 12px 25px;
  cursor: pointer;
  font-size: 0.9em;
  border-radius: 4px;
  font-weight: 600;
  width: 100%;
  margin-top: 20px;
  background: linear-gradient(135deg, #45f3ff 0%, #ff2770 100%);
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(69, 243, 255, 0.3);
}

#submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(69, 243, 255, 0.4);
}

#submit:active {
  opacity: 0.8;
}

/* Alert Styles */
.alert {
  border-radius: 8px;
  border: none;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.85em;
}

.alert-danger {
  background: rgba(255, 39, 112, 0.2);
  color: #ff2770;
  border: 1px solid rgba(255, 39, 112, 0.3);
}

.btn-close {
  background: none;
  border: none;
  color: #ff2770;
  font-size: 1.2em;
  cursor: pointer;
  float: right;
  margin-left: 10px;
}

/* Ensure form elements are clickable and functional */
.box form input[type="submit"],
.box form button[type="submit"] {
  cursor: pointer !important;
  pointer-events: auto !important;
  user-select: none;
}

.box form input[type="text"],
.box form input[type="password"],
.box form input[type="checkbox"] {
  pointer-events: auto !important;
  user-select: text;
}

/* Password Reset Page Specific Styles */
.box form p.text-muted {
    color: #8f8f8f;
    font-size: 0.9em;
    margin-bottom: 25px;
}

.alert-success {
    background: rgba(69, 243, 255, 0.2);
    color: #45f3ff;
    border: 1px solid rgba(69, 243, 255, 0.3);
}

.alert-success .btn-close {
    color: #45f3ff;
}

.box form .text-center {
    text-align: center;
}

.box form .mt-3 {
    margin-top: 15px;
}

.box form .forgot-password {
    color: #8f8f8f;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9em;
}

.box form .forgot-password:hover {
    color: #45f3ff;
}

.box form .forgot-password i {
    margin-right: 5px;
}

/* Responsive Design */
@media (max-width: 480px) {
  .box {
    width: 320px;
    height: 480px;
  }

  .box form {
    padding: 40px 30px;
  }

  /* Hide security guard on mobile to save space */
  .password-field::before,
  .password-field::after {
    display: none;
  }
}

@media (min-width: 768px) {
  .box {
    width: 420px;
    height: 520px;
  }
}

@media (min-width: 1200px) {
  .box {
    width: 450px;
    height: 550px;
  }
}

/* Responsive adjustments for password reset */
@media (max-width: 480px) {
    .box form p.text-muted {
        font-size: 0.8em;
        margin-bottom: 20px;
    }
    
    .box form .mt-3 {
        margin-top: 12px;
    }
}
