:root {
  --primary-color: #752ed3;
  --secondary-color: #9361f1;
  --background-light: #f5f3ff;
  --text_dark: #321362;
  --accent-color: #8540e7;
  --color-50: #f5f3ff;
  --color-100: #eeeafd;
  --color-200: #e0d7fd;
  --color-300: #c8b7fb;
  --color-400: #a989f6;
  --color-500: #9361f1;
  --color-600: #8540e7;
  --color-700: #752ed3;
  --color-800: #6226b1;
  --color-900: #522191;
  --color-950: #321362;
  --success-color: #4caf50;
  --success-bg: #e8f5e9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text_dark);
  background-color: var(--background-light);
}

/* Header Styling */
header {
  background: linear-gradient(135deg, var(--color-700), var(--color-900));
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  position: sticky;
  top: 0;
  transition: margin-top 0.3s ease;
}

.logo img {
  max-height: 40px;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0 15px;
  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-50);
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
}

.nav-links a.active {
  color: var(--color-300);
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-300);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.auth-buttons {
  display: flex;
  gap: 10px;
}

.login-button {
  background-color: transparent;
  color: white;
  border: 2px solid white;
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.login-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.signup-button {
  background-color: white;
  color: var(--primary-color);
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.signup-button:hover {
  background-color: var(--color-100);
  transform: translateY(-2px);
}

.burger {
  display: none;
  cursor: pointer;
}

.burger div {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 5px;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--color-700), var(--color-900));
  color: white;
  padding: 80px 0;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-text {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.welcome-logo {
  margin-bottom: 20px;
}

.swiftpax-logo {
  max-width: 100%;
  height: auto;
}

.lead {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 500;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  justify-content: center;
}

.cta-button {
  display: inline-block;
  background-color: white;
  color: var(--primary-color);
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: var(--color-100);
  transform: translateY(-3px);
}

.cta-button-alt {
  display: inline-block;
  background-color: transparent;
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  border: 2px solid white;
  transition: all 0.3s ease;
}

.cta-button-alt:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(50, 19, 98, 0.5);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 0;
  border-radius: 20px;
  width: 400px;
  max-width: 90%;
  position: relative;
  box-shadow: 0 15px 30px rgba(133, 64, 231, 0.2);
  overflow: hidden;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, #752ed3, #9361f1);
}

.close-button {
  color: #522191;
  float: right;
  font-size: 28px;
  font-weight: bold;
  padding: 10px 15px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-button:hover {
  color: #8540e7;
}

.auth-container {
  padding: 20px;
}

.auth-switcher {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-200);
}

.auth-switcher button {
  flex: 1;
  background: none;
  border: none;
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-600);
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.auth-switcher button.active {
  color: var(--color-700);
}

.auth-switcher button.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-700);
}

.auth-form {
  display: none;
  padding: 32px 20px 20px 20px;
}

.auth-form.active {
  display: block;
  animation: formFadeIn 0.4s ease-out;
}

@keyframes formFadeIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.auth-form h2 {
  font-size: 1.8rem;
  color: var(--color-800);
  margin-bottom: 24px;
  text-align: center;
}

.reset-text {
  text-align: center;
  margin-bottom: 20px;
  color: var(--color-600);
}

/* --- Improved input box UI for login/signup forms --- */
.input-group {
  margin-bottom: 0;
}

.input-with-icon {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #ddd;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center; /* Key for vertical alignment */
}

.input-with-icon:focus-within {
  border-color: var(--color-600);
  box-shadow: 0 0 0 2px var(--color-100);
}

.input-with-icon i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 20px;
  pointer-events: none;
  z-index: 1;
}

.input-with-icon input,
.input-with-icon select {
  flex: 1;
  height: 52px;
  padding: 0 16px 0 44px; /* Padding-left accounts for the icon */
  font-size: 1.08rem;
  border: none;
  outline: none;
  background: transparent;
  border-radius: 8px;
  margin: 0;
}

.input-with-icon .password-toggle {
  position: absolute;
  right: 12px; /* Move inside */
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-700);
  cursor: pointer;
  padding: 8px;
  font-size: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  transition: all 0.2s ease;
  outline: none;
}

.password-toggle:hover {
  background-color: var(--color-100);
  color: var(--color-800);
  transform: translateY(-50%) scale(1.1);
}

.password-toggle:focus {
  outline: 2px solid var(--color-200);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--color-200);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.95);
  background-color: var(--color-200);
}

.input-with-icon input[type="password"],
.input-with-icon input[type="text"] {
  padding-right: 48px;
}

.input-with-icon .error-message {
  position: absolute;
  left: 0;
  bottom: -18px;
  width: 100%;
  font-size: 12px;
  color: #e53e3e;
  margin: 0;
  padding: 0 8px;
  background: none;
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Remove extra space below input-group */
.input-group + .input-group {
  margin-top: 8px;
}

/* Password match styling */
.input-with-icon input.password-match {
  border-color: var(--success-color);
  background-color: var(--success-bg);
}

/* Add these styles for password requirements */
.password-requirements {
  margin-top: 5px;
  font-size: 12px;
  color: var(--color-600);
}

.password-requirements ul {
  margin-top: 5px;
  padding-left: 15px;
  list-style-type: none;
}

.password-requirements li {
  margin-bottom: 3px;
  display: flex;
  align-items: center;
}

.password-requirements li i {
  margin-right: 5px;
  font-size: 14px;
}

.text-success {
  color: var(--success-color) !important;
}

.text-danger {
  color: #e53e3e !important;
}

/* Improve the error message styling */
.error-message {
  color: #e53e3e;
  font-size: 12px;
  margin-top: 5px;
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 14px;
  padding: 0 2px;
}

.remember-forgot label {
  display: flex;
  align-items: center;
  color: var(--color-600);
}

.remember-forgot input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--color-700);
}

.remember-forgot a {
  color: var(--color-700);
  text-decoration: none;
  transition: color 0.3s ease;
}

.remember-forgot a:hover {
  color: var(--color-800);
  text-decoration: underline;
}

.terms-checkbox {
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--color-600);
  display: flex;
  align-items: center;
  padding: 0 2px;
}

.terms-checkbox label {
  display: flex;
  align-items: center;
}

.terms-checkbox input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--color-700);
}

.terms-checkbox a {
  color: var(--color-700);
  text-decoration: none;
  transition: color 0.3s ease;
}

.terms-checkbox a:hover {
  color: var(--color-800);
  text-decoration: underline;
}

.auth-button {
  width: 100%;
  padding: 15px;
  background: var(--color-700);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-top: 8px;
}

.auth-button:hover {
  background: var(--color-800);
  transform: translateY(-2px);
}

.back-button {
  width: 100%;
  padding: 15px;
  background: transparent;
  color: var(--color-700);
  border: 1px solid var(--color-200);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

.back-button:hover {
  background: var(--color-50);
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .burger {
    display: block;
  }

  .auth-buttons {
    display: none;
  }

  /* Adjust password toggle for mobile */
  .input-with-icon .password-toggle {
    width: 36px;
    height: 36px;
    right: 8px;
  }

  .input-with-icon input[type="password"],
  .input-with-icon input[type="text"] {
    padding-right: 52px;
  }
}

/* Top Banner Notification Style */
.notification-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 12px 20px;
  color: white;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.notification-banner.success {
  background-color: var(--color-700);
}

.notification-banner.error {
  background-color: #e53e3e;
}

#notification-message {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

#notification-message i {
  margin-right: 8px;
  font-size: 18px;
}

/* Push down the content when notification is shown */
body.has-notification header.sticky-top {
  margin-top: 45px;
  transition: margin-top 0.3s ease;
}

/* Close button for notification */
.notification-close {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

/* Modern Toast Notification Style */
.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 380px;
  background-color: white;
  color: #333;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  z-index: 9999;
  display: flex;
  align-items: center;
  transform: translateX(400px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.notification-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-toast .icon-container {
  width: 60px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
  flex-shrink: 0;
}

.notification-toast.success .icon-container {
  background-color: var(--color-700);
  color: white;
}

.notification-toast.error .icon-container {
  background-color: #e53e3e;
  color: white;
}

.notification-toast .icon-container i {
  font-size: 24px;
}

.notification-toast .content {
  padding: 18px 15px;
  flex-grow: 1;
}

.notification-toast .title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 17px;
  color: var(--color-800);
}

.notification-toast .message {
  font-size: 15px;
  opacity: 0.9;
  line-height: 1.4;
}

.notification-toast .close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: color 0.2s;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-toast .close-btn:hover {
  color: #333;
  background-color: rgba(0, 0, 0, 0.05);
}

.notification-toast .progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.05);
}

.notification-toast .progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  animation: progress 5s linear forwards;
}

.notification-toast.success .progress-bar {
  background-color: var(--color-700);
}

.notification-toast.error .progress-bar {
  background-color: #e53e3e;
}

@keyframes progress {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

/* Sound toggle button */
.notification-sound-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-700);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: background-color 0.3s;
}

.notification-sound-toggle:hover {
  background-color: var(--color-800);
}

.notification-sound-toggle i {
  font-size: 18px;
}
