/* =========================================================
   Atom Shaale — Refined Login Page (Aligned with Books)
   ========================================================= */

body {
  font-family: 'Century Gothic';
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: #000;
  position: relative;
  overflow: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("/static/images/page1.png") center center / cover no-repeat;
  filter: brightness(0.95) contrast(1.05);
  z-index: 0;
}

body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, 
    rgba(0, 0, 0, 0) 0%, 
    rgba(0, 0, 0, 0) 40%, 
    rgba(0, 20, 10, 0.4) 60%, 
    rgba(0, 30, 15, 0.75) 80%, 
    rgba(0, 35, 20, 0.9) 100%);
  z-index: 1;
}

/* ====== Background Effects ====== */
.background {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 0;
}

#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.gradient-waves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 25% 30%, rgba(0, 255, 128, 0.06), transparent 35%),
    radial-gradient(circle at 75% 70%, rgba(0, 255, 128, 0.04), transparent 40%);
  animation: waveGlow 12s ease-in-out infinite alternate;
  z-index: 2;
  mix-blend-mode: screen;
}

@keyframes waveGlow {
  0% { 
    opacity: 0.6;
    transform: scale(1) rotate(0deg);
  }
  100% { 
    opacity: 0.9;
    transform: scale(1.1) rotate(5deg);
  }
}

/* ====== Main Container ====== */
.login-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding-right: 7vw;
}

/* ====== Branding Section - Hidden ====== */
.branding-section {
  display: none;
}

.logo-wrapper {
  position: relative;
  text-align: center;
}

.logo {
  width: 200px;
  animation: glowPulse 2.5s infinite alternate ease-in-out;
}

@keyframes glowPulse {
  0% { filter: drop-shadow(0 0 10px #008037); }
  100% { filter: drop-shadow(0 0 20px #008037); }
}

.brand-title {
  font-size: 2rem;
  text-align: center;
  margin-top: 10px;
}

.highlight-text {
  color: #008037;
  font-weight: bold;
}

.tagline {
  font-size: 1rem;
  text-align: center;
  color: #008037;
  margin: 15px 0;
}

/* ====== Feature Badges ====== */
.feature-badges {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.85rem;
  color: #008037;
}

.badge i {
  color: #008037;
  font-size: 1.4rem;
  margin-bottom: 4px;
}

/* ====== Form Section ====== */
.form-section {
  background: rgba(5, 25, 15, 0.88);
  backdrop-filter: blur(35px) saturate(140%);
  border-radius: 28px;
  padding: 48px 42px;
  width: 420px;
  height: auto;
  color: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6), 
              0 0 0 1px rgba(0, 255, 128, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 128, 0.25);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.form-section::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: white;
  border-radius: 28px;
  opacity: 0;
  z-index: -1;

}

@keyframes borderPulse {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 0.6;
  }
}

.form-section::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(0, 255, 128, 0) 0deg,
    rgba(0, 255, 128, 0.08) 45deg,
    rgba(0, 255, 128, 0) 90deg
  );
  animation: slowRotate 20s linear infinite;
  z-index: -1;
}

@keyframes slowRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.form-header h2 {
  margin: 0 0 12px 0;
  color: #008037;
  font-size: 2.4rem;
  text-align: center;
  font-weight: 700;
  text-shadow: 0 0 25px rgba(0, 255, 128, 0.6),
               0 0 50px rgba(0, 255, 128, 0.3);
  letter-spacing: 2px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-header h2 img {
  display: block;
  margin: 0 auto;
}

.form-header p {
  text-align: center;
  color: #008037;
  font-size: 0.95rem;
  margin-top: 8px;
  margin-bottom: 32px;
  font-weight: 300;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group input {
  width: 100%;
  padding: 15px 45px 15px 45px;
  border-radius: 14px;
  border: 1.5px solid rgba(0, 255, 128, 0.25);
  background: rgba(0, 20, 10, 0.7);
  color: #fff;
  outline: none;
  font-size: 1rem;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  position: relative;
}

.input-group input::placeholder {
  color: transparent;
}

.input-group input:focus {
  border-color: #008037;
  background: rgba(0, 30, 15, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 255, 128, 0.15),
              0 8px 20px rgba(0, 255, 128, 0.2);
  transform: translateY(-2px);
}

.input-group label {
  position: absolute;
  top: 50%;
  left: 45px;
  transform: translateY(-50%);
  color: #008037;
  transition: 0.3s ease;
  pointer-events: none;
  font-size: 0.95rem;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group input:valid + label {
  top: -10px;
  left: 12px;
  transform: translateY(0);
  font-size: 0.75rem;
  background: rgba(10, 30, 20, 0.95);
  padding: 2px 8px;
  border-radius: 4px;
  color: #008037;
  border: 1px solid rgba(0, 255, 128, 0.3);
}

/* ====== Password Toggle ====== */
.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: black;
  cursor: pointer;
  transition: 0.3s;
  z-index: 2;
}

.password-toggle:hover {
  color: #008037;
}

/* ====== Buttons ====== */
.login-btn {
  width: 50%;
  margin: 25px auto 0 auto;
  padding: 16px;
  border: none;
  border-radius: 15px;
  background: #008037;
  color: #000;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 8px 30px rgba(0, 255, 128, 0.5),
              inset 0 -2px 10px rgba(0, 0, 0, 0.2);
  display: block;
}

.login-btn:hover {
  background: black;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 255, 128, 0.7),
              inset 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.btn-text {
  position: relative;
  z-index: 2;
}

.btn-icon {
  position: relative;
  z-index: 2;
  margin-left: 8px;
  transition: 0.3s ease;
}

.login-btn:hover .btn-icon {
  transform: translateX(5px);
}

.btn-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s ease;
  transform: translateX(-100%);
}

.login-btn:hover .btn-glow {
  transform: translateX(100%);
}

/* ====== Form Options (Remember Me & Forgot Password) ====== */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 0.9rem;
}

.remember-me {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: rgba(0, 255, 128, 0.8);
}

.remember-me input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 255, 128, 0.4);
  border-radius: 4px;
  margin-right: 8px;
  display: inline-block;
  position: relative;
  transition: 0.3s ease;
  background: rgba(5, 20, 15, 0.6);
}

.remember-me input[type="checkbox"]:checked + .checkmark {
  background: #00ff80;
  border-color: #00ff80;
  box-shadow: 0 0 10px rgba(0, 255, 128, 0.5);
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 3px;
  color: #fff;
  font-size: 14px;
}

.forgot-link {
  color: #00ff80;
  text-decoration: none;
  transition: 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.forgot-link:hover {
  color: #00ffaa;
  text-shadow: 0 0 10px rgba(0, 255, 128, 0.5);
}

.forgot-link i {
  font-size: 0.8rem;
}

/* ====== Form Footer (Security Badges) ====== */
.form-footer {
  margin-top: 30px;
}

.divider {
  text-align: center;
  color: rgba(0, 255, 128, 0.6);
  font-size: 0.85rem;
  margin-bottom: 15px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.divider span {
  background: rgba(10, 30, 20, 0.95);
  padding: 0 15px;
  position: relative;
  z-index: 1;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 255, 128, 0.3) 20%, 
    rgba(0, 255, 128, 0.6) 50%, 
    rgba(0, 255, 128, 0.3) 80%, 
    transparent 100%);
  z-index: 0;
  box-shadow: 0 0 10px rgba(0, 255, 128, 0.3);
}

.security-badges {
  display: flex;
  justify-content: center;
  gap: 25px;
}

.security-badges i {
  color: #00ff80;
  font-size: 1.6rem;
  opacity: 0.8;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 5px rgba(0, 255, 128, 0.4));
}

.security-badges i:hover {
  opacity: 1;
  transform: scale(1.2) translateY(-3px);
  filter: drop-shadow(0 0 15px rgba(0, 255, 128, 0.8));
  animation: iconPulse 0.6s ease-in-out;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1.2) translateY(-3px); }
  50% { transform: scale(1.3) translateY(-5px); }
}

/* ====== Error Messages ====== */
.error-message {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ff6b6b;
}

.error-message i {
  font-size: 1.2rem;
}

/* ====== Input Icons ====== */
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #008037;
  pointer-events: none;
  z-index: 1;
  font-size: 1.1rem;
  filter: drop-shadow(0 0 5px rgba(0, 128, 55, 0.5));
}

.input-group input {
  padding-left: 45px !important;
}

.input-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #008037, #00ff80);
  transition: 0.3s ease;
}

.input-group input:focus ~ .input-border {
  width: 100%;
}

/* ====== Responsive ====== */
@media (max-width: 992px) {
  .login-container {
    justify-content: center;
    padding-right: 0;
  }

  .branding-section {
    display: none;
  }

  .form-section {
    width: 90%;
    max-width: 400px;
    padding: 40px 30px;
  }
  
  .form-header h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .form-section {
    width: 95%;
    padding: 30px 20px;
  }
  
  .form-options {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}


/* === Desktop-only tweaks: keep mobile unchanged === */
@media (min-width: 993px) {
  /* ensure the password eye is visible on the dark form */
  .password-toggle {
    color: rgba(255, 255, 255, 0.95); /* bright on dark background */
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  }

  .password-toggle:hover {
    color: #00ff80;
    transform: scale(1.05);
  }

  /* Slightly increase input icon contrast on desktop only */
  .input-icon {
    filter: drop-shadow(0 0 6px rgba(0, 128, 55, 0.55));
  }
}


/* ============================
   DESKTOP — match mobile style 100%
   (append at the end of login.css)
   ============================ */
@media (min-width: 993px) {
  /* Make the eye icon match mobile size, color, and placement */
  .password-toggle {
    position: absolute;
    right: 18px !important;               /* same horizontal inset as mobile */
    top: 50% !important;
    transform: translateY(-50%) !important; /* perfect vertical center */
    font-size: 1.05rem !important;        /* match mobile visual weight */
    color: #111 !important;               /* dark icon on the light input (same as mobile) */
    background: transparent !important;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: none !important;
    z-index: 3;
    cursor: pointer;
  }

  /* Keep hover subtle and consistent with mobile */
  .password-toggle:hover {
    color: #008037 !important;
    transform: translateY(-50%) scale(1.02) !important;
  }

  /* Give input enough right padding so text doesn't overlap the icon */
  .input-group input {
    padding-right: 56px !important; /* a little extra for desktop width */
  }

  /* If inputs have different heights on desktop, ensure icon stays centered */
  .input-group {
    position: relative;
  }
}
