/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit", "Segoe UI", sans-serif;
}

body {
  background-color: #0f172a;
  background-image:
    radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
  background-size: 200% 200%;
  animation: gradientMove 15s ease infinite;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  overflow: hidden;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Glassmorphism Container */
.login-container {
  position: relative;
  width: 400px;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px); /* Safari support */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  z-index: 10;
  animation: containerFadeIn 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes containerFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-header h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: #94a3b8;
  font-size: 0.95rem;
}

/* Form Group */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group input {
  width: 100%;
  padding: 1rem 1rem;
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: #6366f1;
  background: rgba(15, 23, 42, 0.5);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
  color: transparent; /* Hide default placeholder for floating label effect */
}

.form-group label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: #94a3b8;
  pointer-events: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

/* Floating Label Logic */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label {
  top: -0.6rem;
  left: 0.8rem;
  font-size: 0.8rem;
  padding: 0 0.4rem;
  background: #0f172a; /* Match body bg somewhat or hide line behind */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 50%,
    rgba(15, 23, 42, 1) 50%
  ); /* Hacky way if solid bg needed */
  /* Better approach for glassmorphism: just move it up and maybe color it */
  background: transparent;
  color: #818cf8;
  backdrop-filter: blur(12px);
  border-radius: 4px;
}

/* Password Toggle */
.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.3s;
  background: none;
  border: none;
  padding: 0;
}

.toggle-password:hover {
  color: #fff;
}

.toggle-password svg {
  width: 20px;
  height: 20px;
}

/* Login Button */
.login-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.login-btn:after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(168, 85, 247, 0.5);
}

.login-btn:hover:after {
  left: 100%;
}

.login-btn:active {
  transform: translateY(0);
}

/* Footer interactions */
.footer-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #818cf8;
}

/* Background Shapes for extra pop */
.shape {
  position: absolute;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.6;
  animation: blobBounce 10s infinite alternate;
}

.shape-1 {
  top: -10%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: #6366f1;
  animation-delay: 0s;
}

.shape-2 {
  bottom: -10%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: #ec4899;
  animation-delay: -5s;
}

@keyframes blobBounce {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(50px, 50px) scale(1.1);
  }
}
