* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: #f8faff;
  color: #111;
  min-height: 100vh;
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Dark Mode Toggle */
.toggle-switch {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 26px;
  display: inline-block;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.signup-container {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

/* LEFT FORM */
.signup-left {
  flex: 1;
  position: relative;
  background: linear-gradient(75deg, #05986c 0%, #07be87 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  isolation: isolate; /* Creates a new stacking context */
}

.signup-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../img/abstract_lines_transparent busy (white).png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1; /* Negative z-index keeps it behind */
  pointer-events: none; /* Ensures it doesn't interfere with clicks */
}

.signup-box {
  width: 100%;
  max-width: 400px;
  padding: 40px 30px;
  background:  white;;
  backdrop-filter: blur(50px);
  opacity: 0.5;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  margin: 20px 0;
  transform: translateY(40px);
  opacity: 0;
  animation: slideIn 1s ease-out forwards;
  animation-delay: 0.3s;
  
}

@keyframes slideIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.logo {
  width: 80px;
  margin-bottom: 30px;
  display: block;
}

.signup-box h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: #111;
}

.signup-box p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 24px;
}

/* Social Login */
.social-login {
  margin-bottom: 20px;
}

.google-login {
  width: 100%;
  padding: 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
  font-size: 0.95rem;
}

.google-login:hover {
  background: #f8f8f8;
  border-color: #ccc;
}

.divider {
  text-align: center;
  margin: 20px 0;
  color: #999;
  position: relative;
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #ddd;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

/* Form Styles */
form input {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 0.95rem;
  -webkit-appearance: none;
  appearance: none;
}

form input:focus {
  outline: 2px solid #0070f3;
  background: #e0ebff;
  border-color: #0070f3;
}

form button[type="submit"] {
  width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: black;
    border: 2px solid black;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 650;
    cursor: pointer;
    transition: 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

form button[type="submit"]:hover {
  background: #0042ff;
  border-color: #0042ff;
}

#signupBtn:active {
  transform: translateY(0);
}

.skip-link {
  display: block;
  text-align: center;
  margin-top: 15px;
  color: #2f8dff;
  text-decoration: none;
  font-size: 0.9rem;
}

/* Password Container */
.signup-password-container {
  position: relative;
  display: flex;
  align-items: center;
}

.signup-password-container input {
  padding-right: 45px;
  width: 100%;
}

.signup-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #666;
  font-size: 1rem;
  transition: color 0.2s;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  height: auto;
  margin: 0;
}

#togglePassword,
#toggleConfirmPassword {
  background: transparent;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px;
  margin: 0;
  width: auto;
  height: auto;
  left: auto;
}

#togglePassword:hover,
#toggleConfirmPassword:hover {
  background-color: transparent;
}

.signup-password-toggle:hover {
  color: #0070f3;
}

.signup-password-toggle i {
  pointer-events: none;
}

/* Password Requirements */
.pwd-req {
  margin-top: 20px;

  background: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
}

.pwd-req__title {
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.pwd-req__list {
  list-style: none;
}

.pwd-req__list li {
  display: flex;
  align-items: center;
  margin: 8px 0;
  color: #666;
}

.pwd-req__list .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  margin-right: 10px;
  flex-shrink: 0;
}

.pwd-req__list li[data-valid="true"] .dot {
  background: #06a616;
}

.signup-note {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  margin-top: 20px;
  line-height: 1.6;
}

.signup-note a {
  color: #2f8dff;
  text-decoration: none;
  font-weight: 600;
}

.signup-note a:hover {
  text-decoration: underline;
}

/* RIGHT VISUAL PANEL */
.signup-right {
  flex: 1.2;
  position: relative;
  background: url('../img/log\ in\ picture-right.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #0040ff;
  color: #fff;
  padding: 14px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, bottom 0.4s ease;
  z-index: 9999;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  bottom: 50px;
}

/* DARK MODE */
body.dark-mode {
  background: #1a1a1a;
  color: #f1f5fa;
}

body.dark-mode .signup-left {
  background: url('../img/abstract_lines_transparent\ busy\ \(white\).png') center/cover no-repeat;
}

body.dark-mode .signup-box {
   background: transparent;
    backdrop-filter: blur(500px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 1;
    border: 1px solid rgb(196, 196, 196);
}

body.dark-mode .signup-box h2 {
  color: #f4f6f8;
}

body.dark-mode .signup-box p,
body.dark-mode .signup-note {
  color: #c5c9d1;
}

body.dark-mode form input {
  background: #181c2a;
  color: #f1f5fa;
  border: 1px solid #2d37ee;
}

body.dark-mode form input:focus {
  background: #0d0d0e;
  border-color: #44aaff;
}

body.dark-mode .google-login {
  background: #181c2a;
  border-color: #2d37ee;
  color: #f1f5fa;
}

body.dark-mode .google-login:hover {
  background: #0d0d0e;
}

body.dark-mode .divider {
  color: #777;
}

body.dark-mode .divider::before,
body.dark-mode .divider::after {
  background: #444;
}

body.dark-mode .signup-password-toggle {
  color: white;
  background: transparent;
}

body.dark-mode .signup-password-toggle:hover {
  color: #44aaff;
}

body.dark-mode #togglePassword,
body.dark-mode #toggleConfirmPassword {
  background: transparent;
  color: white;
}

body.dark-mode .pwd-req {
  background: #181c2a;
}

body.dark-mode .pwd-req__title {
  color: #f1f5fa;
}

body.dark-mode .pwd-req__list li {
  color: #c5c9d1;
}

body.dark-mode .signup-note a {
  color: #44aaff;
}

body.dark-mode .toast {
  background: #2d37ee;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .toggle-switch {
    top: 30px;
    right: 15px;
    width: 45px;
    height: 24px;
  }

  .slider:before {
    height: 16px;
    width: 16px;
  }

  input:checked + .slider:before {
    transform: translateX(21px);
  }

  .signup-container {
    flex-direction: column;
  }

  .signup-right {
    display: none;
  }

  .signup-left {
    flex: none;
    width: 100%;
    padding: 15px;
    min-height: 100vh;
  }

  .signup-box {
    padding: 30px 20px;
    margin: 10px 0;
    max-width: 100%;
  }

  .signup-box h2 {
    font-size: 1.5rem;
  }

  .signup-box p {
    font-size: 0.85rem;
  }

  form input {
    padding: 12px;
    padding-right: 45px; /* Keep space for toggle button */
    font-size: 16px; /* Prevents zoom on iOS */
  }

  form button[type="submit"] {
    padding: 13px;
    font-size: 0.95rem;
  }

  .signup-password-toggle {
    right: 12px;
    padding: 8px;
  }

  #togglePassword,
  #toggleConfirmPassword {
    right: 12px;
    left: auto;
  }

  .pwd-req {
    font-size: 0.8rem;
    padding: 12px;
  }

  .toast {
    bottom: 20px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .toast.show {
    bottom: 30px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .signup-left {
    padding: 10px;
  }

  .signup-box {
    padding: 25px 15px;
    border-radius: 12px;
  }

  .logo {
    width: 60px;
    margin-bottom: 20px;
  }

  .signup-box h2 {
    font-size: 1.3rem;
  }

  form input {
    padding: 11px;
    padding-right: 45px; /* Keep space for toggle button */
    margin: 8px 0;
  }

  .signup-password-toggle {
    right: 10px;
    font-size: 0.9rem;
  }

  #togglePassword,
  #toggleConfirmPassword {
    right: 10px;
    left: auto;
  }

  .pwd-req__list li {
    font-size: 0.75rem;
  }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .signup-left {
    padding: 10px;
  }

  .signup-box {
    padding: 20px 15px;
    margin: 10px 0;
  }

  .logo {
    width: 50px;
    margin-bottom: 15px;
  }

  .signup-box h2 {
    font-size: 1.3rem;
    margin-bottom: 5px;
  }

  .signup-box p {
    margin-bottom: 15px;
  }

  form input {
    margin: 6px 0;
    padding: 10px;
  }

  .pwd-req {
    padding: 10px;
    margin-top: 15px;
  }
}