Background Gradient .gradient-bg {
  background: linear-gradient(135deg, #4b5563 0%, #1b2940 100%);
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.gradient-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(225, 244, 253, 0.1) 0%,
    rgba(225, 244, 253, 0.05) 100%
  );
  pointer-events: none;
}

/* Floating Shapes Animation */
.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    45deg,
    rgba(225, 244, 253, 0.15),
    rgba(225, 244, 253, 0.08)
  );
  animation: float 20s infinite ease-in-out;
}

.shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.shape:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 10%;
  animation-delay: -5s;
  animation-duration: 30s;
}

.shape:nth-child(3) {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: -10s;
  animation-duration: 20s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.5;
  }
  25% {
    transform: translateY(-20px) rotate(90deg);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-40px) rotate(180deg);
    opacity: 0.3;
  }
  75% {
    transform: translateY(-20px) rotate(270deg);
    opacity: 0.8;
  }
}

/* Login Card Styles */
.login-card {
  background: rgba(250, 251, 252, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(213, 214, 219, 0.2);
  box-shadow: 0 25px 50px -12px rgba(27, 41, 64, 0.25),
    0 0 0 1px rgba(240, 244, 248, 0.1);
  transition: all 0.3s ease;
}

.login-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 32px 64px -12px rgba(27, 41, 64, 0.3),
    0 0 0 1px rgba(240, 244, 248, 0.15);
}

/* Glass Effect */
.glass-effect {
  background: rgba(240, 244, 248, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(213, 214, 219, 0.3);
  box-shadow: 0 8px 32px 0 rgba(27, 41, 64, 0.2);
}

/* Fade In Animation */
.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input Focus Effects */
.input-focus {
  border: 2px solid rgba(213, 214, 219, 0.3);
  transition: all 0.3s ease;
}

.input-focus:focus {
  border: 2px solid #0070f3;
  box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.1), 0 4px 12px rgba(27, 41, 64, 0.1);
  transform: translateY(-1px);
}

/* FIX: Target the icon when input is focused using :focus-within on parent */
.relative:focus-within .pointer-events-none i {
  color: #0070f3 !important;
  transform: scale(1.1);
}

/* Keep icons visible at all times */
.pointer-events-none i {
  color: #9ca3af !important;
  transition: all 0.3s ease;
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #4b5563 0%, #1b2940 100%);
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(225, 244, 253, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 112, 243, 0.4);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 5px 10px rgba(0, 112, 243, 0.3);
}

/* Icon Hover Effects */
.fas {
  transition: all 0.3s ease;
}

.fa-user:hover,
.fa-lock:hover {
  transform: scale(1.1);
  color: #0070f3 !important;
}

/* Eye Icon Toggle Effect */
.fa-eye,
.fa-eye-slash {
  cursor: pointer;
  transition: all 0.2s ease;
}

.fa-eye:hover,
.fa-eye-slash:hover {
  color: #0070f3 !important;
  transform: scale(1.1);
}

/* Error Message Animation */
.error-message {
  animation: shake 0.5s ease-in-out;
  background-color: #fdeaea !important;
  border-color: #e52d27 !important;
  color: #e52d27 !important;
}

@keyframes shake {
  0%,
  20%,
  40%,
  60%,
  80% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-10px);
  }
}

/* Loading Effect */
.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .login-card {
    margin: 1rem;
    padding: 2rem 1.5rem;
  }

  .glass-effect {
    width: 120px;
    height: 120px;
  }

  h1 {
    font-size: 1.75rem;
  }
}

/* Logo placeholder when image fails to load */
.logo-placeholder {
  background: linear-gradient(135deg, #0070f3 0%, #1b2940 100%);
  color: white;
  font-size: 3rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Input container hover effect */
.relative:hover .input-focus {
  border-color: rgba(0, 112, 243, 0.5);
}

/* Focus trap for accessibility */
.login-card:focus-within {
  box-shadow: 0 32px 64px -12px rgba(27, 41, 64, 0.3),
    0 0 0 2px rgba(0, 112, 243, 0.3);
}
