/* ========================= */
/* Modal Styles */
/* ========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  z-index: 9999;
  animation: fadeIn 0.35s ease;
}

.modal-box {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(160%);
  border-radius: 28px;
  padding: 2.5rem;
  width: 380px;
  max-width: 95%;
  color: #fff;
  text-align: center;
  animation: scaleIn 0.35s ease;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  overflow: hidden;
}

/* Smooth RGB Border */
.modal-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 3px;
  background: linear-gradient(
    270deg,
    red,
    orange,
    yellow,
    lime,
    cyan,
    blue,
    violet,
    red
  );
  background-size: 800% 800%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rgbFlow 150s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* Modal Title */
.modal-box h2 {
  font-size: 1.7rem;
  margin-bottom: 1.8rem;
  font-weight: 600;
  position: relative;
}

.modal-box h2::after {
  content: "";
  display: block;
  width: 150px;
  height: 3px;
  margin: 0.8rem auto 0;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    red,
    orange,
    yellow,
    lime,
    cyan,
    blue,
    violet,
    red
  );
  background-size: 800% 100%;
  animation: rgbFlow 150s linear infinite;
  box-shadow: 0 0 10px rgba(255,255,255,0.6);
}

/* Shared RGB Animation */
@keyframes rgbFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 800% 50%; }
}

/* Inputs */
.input-pill {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 1rem;
  border: none;
  border-radius: 50px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: all 0.25s;
}

.input-pill:focus {
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 2px #4facfe;
}

.input-pill::placeholder {
  color: rgba(255,255,255,0.6);
}

/* Action button */
.action-button {
  width: 100%;
  padding: 14px;
  margin-top: 1.2rem;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #4facfe, #6a11cb);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79,172,254,0.35);
}

/* Close button */
.close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.6rem;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
  background: none;
  border: none;
}

.close-modal:hover {
  color: #fff;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Remember me section */
.remember-me {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin: 0.5rem 0 1rem;
}

.remember-me input {
  accent-color: #4facfe;
}

/* ========================= */
/* Password toggle additions */
/* ========================= */
.password-wrap {
  position: relative;
  width: 100%;
}

/* give space for the eye button inside the field */
.password-wrap .input-pill {
  padding-right: 44px;
  margin-bottom: 0.8rem;
}

/* the only visible eye is the button itself; suppress any pseudo content */
.toggle-password::before,
.toggle-password::after {
  content: none !important;
}

/* button positioning & a11y focus */
.toggle-password {
  position: absolute;
  top: 40%;
  right: 14px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 1.1rem;      /* shows 👁 / 🙈 clearly */
  line-height: 1;
  color: rgba(255,255,255,0.85);
}

.toggle-password:hover { color: #fff; }
.toggle-password:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79,172,254,0.6);
  border-radius: 50%;
}
