/* Dimmed background */
.loginpagesection {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 1000;
  
}

.loginpagesection.active {
  opacity: 1;
  pointer-events: auto;
}

/* Login container starts from top-right (off-screen) */
.leafy-auth-container {
  background-color: #fff;
  color: #0e0e1cfa;
  font-family: 'Segoe UI', sans-serif;
  width: 430px;
  max-width: 90%;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translate(200%, -100%) scale(0.4);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
  position: relative;
  text-align: center;
  
}

.loginpagesection.active .leafy-auth-container {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}
/* Default: light theme */
.login-leafy-dark {
  display: none;
}

/* Dark mode */
body.dark-mode .login-leafy-light {
  display: none;
}

body.dark-mode .login-leafy-dark {
  display: inline-block;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #373333;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #e74c3c;
}



 .leafy-auth-logo {
   width: 100%;
   max-width: 280px;
   border-radius: 10px;
   margin-bottom: 1.5rem;
 }

 .leafy-auth-container h1 {
   font-size: 1.8rem;
   margin-bottom: 0.5rem;
 }

 .leafy-sub-text {
   margin-bottom: 1.5rem;
   font-size: 0.75rem;
 }

 .leafy-or {
   font-size: 0.9rem;
   margin-bottom: 1rem;
   color: #544949;
 }


 body.dark-mode .apple img {
   filter: invert();
 }

 body.dark-mode .leafy-auth-container {
    background-color: #181818;
    box-shadow: 2px 2px 7px rgb(10 10 10);
   color: #ffffff;
 }


 .leafy-auth-button {
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 12px;
   width: 100%;
   margin: 0.5rem 0;
   border-radius: 6px;
   font-weight: bold;
   border: none;
   cursor: pointer;
   transition: 0.2s ease-in-out;
   font-size: 0.95rem;
 }

 .leafy-auth-button img {
   height: 20px;
   margin-right: 10px;
 }

 .leafy-auth-button.google {
   background-color: #149546;
   color: white;
 }

 .leafy-auth-button.github,
 .leafy-auth-button.apple {
   background-color: transparent;
   color: #0e0e1cfa;
   border: 1px solid #444;
 }
  .leafy-auth-button.apple{
    color: #0e0e1cfa;
  }

 body.dark-mode .leafy-auth-button.github{
   color: #ffffff;
 }
 body.dark-mode .leafy-auth-button.apple{
   color: #ffffff;
 }

 .leafy-terms {
   font-size: 0.75rem;
   color: #716161;
   margin-top: 1.5rem;
   line-height: 1.4;
 }

 .leafy-terms a {
   color: #4e8ef7;
   text-decoration: none;
 }

 .leafy-terms a:hover {
   text-decoration: underline;
 }

 .leafy-explore {
   margin-top: 1.2rem;
   font-size: 0.85rem;
 }

 .leafy-explore a {
   color: #4e8ef7;
   text-decoration: none;
 }

 .leafy-explore a:hover {
   text-decoration: underline;
 }

.leafy-auth-button.donate {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 28px;
  background: #fdfcf0; 
  color: #4a3728; 
  border: 1px solid #e2dcc5;
  border-radius: 4px; 
  font-family: 'Georgia', serif; 
  font-style: italic;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 2px 2px 0px #e2dcc5;
  transition: all 0.4s ease;
  position: relative;
}

.leafy-auth-button.donate img {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Subtle "Shy" Animation */
@keyframes sway {
  0% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
  100% { transform: rotate(-1deg); }
}

.leafy-auth-button.donate {
  animation: sway 3s ease-in-out infinite;
}

/* Hover: A soft, emotional swell */
.leafy-auth-button.donate:hover {
  background: #fff;
  border-color: #ffafaf; 
  color: #b33939; 
  box-shadow: 4px 4px 0px #ffafaf;
  transform: scale(1.02);
}

/* The Heart "blooms" on hover */
.leafy-auth-button.donate:hover img {
  transform: scale(1.3);
  opacity: 1;
}

/* A soft "glow" that feels like warmth, not a lightbulb */
.leafy-auth-button.donate::after {
  content: '❤';
  position: absolute;
  top: -15px;
  right: 10px;
  font-size: 12px;
  color: #ffafaf;
  opacity: 0;
  transition: all 0.6s ease;
}

.leafy-auth-button.donate:hover::after {
  opacity: 1;
  top: -25px;
  transform: rotate(15deg);
}