/* ===== GLOBAL ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #f4fff8;
  overflow: hidden;
  height: 100vh;
}

/* ===== BACKGROUND LAYERS ===== */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.gradient-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 25% 35%, rgba(0, 255, 157, 0.18), transparent 50%),
              radial-gradient(circle at 75% 65%, rgba(0, 200, 120, 0.15), transparent 50%);
  z-index: 1;
  animation: gradientMove 10s ease-in-out infinite alternate;
}

@keyframes gradientMove {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(-30px, 20px); }
}

/* FLOATING SHAPES */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.25;
  filter: blur(35px);
  animation: floatUp 10s ease-in-out infinite;
}

.shape1 { width: 220px; height: 220px; background: #11ef8d; top: 80%; left: 10%; animation-delay: 0s; }
.shape2 { width: 300px; height: 300px; background: #20d073; top: 5%; right: 10%; animation-delay: 2s; }
.shape3 { width: 180px; height: 180px; background: #39ff9c; bottom: 5%; right: 15%; animation-delay: 4s; }
.shape4 { width: 260px; height: 260px; background: #71fbb5; top: 35%; left: 35%; animation-delay: 6s; }

@keyframes floatUp {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.05); }
}

/* ===== LOGIN WRAPPER ===== */
.login-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 1rem;
}

/* ===== FORM CONTAINER ===== */
.form-container {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(15px);
  border-radius: 25px;
  padding: 3.5rem 4rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 1.2s ease forwards;
  border: 1px solid rgba(0, 255, 157, 0.15);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== LOGO ===== */
.logo {
  width: 100px;
  margin-bottom: 1rem;
  animation: floatLogo 4s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== TEXT STYLING ===== */
h2 {
  font-size: 2rem;
  color: #083d24;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.subtitle {
  color: #2b5b3e;
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* ===== INPUTS ===== */
form input {
  display: block;
  width: 100%;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
  border: 1.5px solid #c2e8d1;
  border-radius: 12px;
  background: #f8fffa;
  font-size: 1rem;
  transition: all 0.3s ease;
}

form input:focus {
  border-color: #20d173;
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 204, 131, 0.25);
}

/* ===== BUTTON ===== */
button {
  width: 100%;
  padding: 0.9rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0c6d43, #29e48a);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.25);
}

button:hover {
  background: linear-gradient(135deg, #14b66b, #3df59f);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

/* ===== REDIRECT TEXT ===== */
.redirect-text {
  margin-top: 1.6rem;
  font-size: 0.95rem;
  color: #2f6043;
}

.redirect-text a {
  color: #12a855;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.redirect-text a:hover {
  color: #00e084;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 500px) {
  .form-container {
    padding: 2.5rem 2rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  .logo {
    width: 80px;
  }
}

/* ===== PAGE TRANSITION EFFECT ===== */
body {
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.fade-in {
  opacity: 1;
}

body.fade-out {
  opacity: 0;
}


/* ===== PASSWORD VISIBILITY TOGGLE ===== */
/* ===== Password eye (override global button rules) ===== */
.password-wrapper {
  position: relative;
  width: 100%;
}

/* make sure input leaves room for the icon */
.password-wrapper input {
  width: 100%;
  padding-right: 46px; /* space to fit the icon without overlap */
  box-sizing: border-box;
}

/* override global button styles which make buttons full-width */
.password-wrapper .toggle-password {
  position: absolute;
  right: 12px;               /* align to right edge */
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: #4b7760;
  font-size: 18px;
  padding: 0;
  width: auto;               /* IMPORTANT override */
  min-width: 0;              /* IMPORTANT override */
  height: auto;              /* IMPORTANT override */
  line-height: 1;
}

/* remove hover background from button (global button:hover likely applied) */
.password-wrapper .toggle-password:hover {
  color: #12a855;
  background: transparent;   /* ensure no hover box */
}

/* prevent outline styling if you prefer */
.password-wrapper .toggle-password:focus {
  outline: none;
  box-shadow: none;
}
