body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #fdf0d5;
  color: #780000;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid #780000;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.container h2 {
  color: #780000;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  margin-bottom: 25px;
  font-size: 2rem;
  font-weight: 600;
}

.container form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group {
  text-align: left;
}

.input-group label {
  color: #780000;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 5px;
  display: block;
}

.container input[type="text"],
.container input[type="email"],
.container input[type="password"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #780000;
  background-color: rgba(255, 255, 255, 0.1);
  color: #780000;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

/* Disable the default password reveal icon in Edge and other browsers */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

input::-webkit-reveal {
  display: none !important;
}

/* Additional protection against browser password toggles */
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
}

/* Password toggle button styling */
.password-field-container {
  position: relative;
}

#togglePassword {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #780000;
  font-size: 16px;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#togglePassword:hover {
  color: #780000;
}

/* Toggle hover class for JavaScript interaction */
#togglePassword.toggle-hover {
  color: #780000;
}
#togglePassword i {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  pointer-events: none;
}

/* Ensure password input has proper padding for toggle button */
#password {
  padding-right: 45px !important;
}
.container input::placeholder {
  color: #780000;
}

.container input:focus {
  outline: none;
  border-color: #780000;
}

.container button {
  background-color: #780000;
  color: #fdf0d5;
  border: 1px solid #780000;
  padding: 15px;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.container button:hover {
  background-color: #a00000;
  border-color: #a00000;
}

.form-link {
  margin-top: 20px;
  color: #780000;
  font-size: 0.9rem;
}

.form-link a {
  color: #780000;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.form-link a:hover {
  text-decoration: underline;
  color: #a00000;
}

/* Google Sign-In Button Styling */
.g_id_signin {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.g_id_signin > div {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  transition: box-shadow 0.3s ease, transform 0.2s ease !important;
}

.g_id_signin > div:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
  transform: translateY(-2px) !important;
}
.back-button {
  position: absolute;
  bottom:60px;
  background-color: #780000;
  border: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  color: #fdf0d5;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  
}
.signup {
  bottom:35px; /* Adjusted for better positioning */
}
.back-button:hover {
  background-color: #a00000;
}

/* --- Media Query for Mobile Devices --- */
@media (max-width: 600px) {
  /* Body styles for smaller screens */
  body {
    padding: 20px; /* Adds space around the form on small screens */
  }

  /* Adjustments for the container on mobile */
  .container {
    padding: 25px; /* Reduces padding for a more compact layout */
    border-radius: 8px; /* Slightly smaller border-radius */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Lighter shadow */
    width: 100%; /* Ensures the form takes up the full width */
  }

  /* Heading adjustments */
  .container h2 {
    font-size: 1.7rem; /* Reduces heading font size */
    margin-bottom: 20px;
  }

  /* Input field and button adjustments */
  .container input[type="text"],
  .container input[type="email"],
  .container input[type="password"] {
    padding: 10px; /* Reduces padding inside input fields */
    font-size: 0.9rem; /* Smaller font size for inputs */
  }

  .container button {
    padding: 12px; /* Reduces button padding */
    font-size: 1rem; /* Smaller font size for button text */
  }
  
}
/* ===============================================
   FORM VALIDATION STYLES - START
   =============================================== */


.validation-message {
  font-size: 0.85rem;
  margin-top: 0;
  margin-bottom: 0;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  height: 0;
  overflow: hidden;
  font-weight: 500;
}


.validation-message.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  height: auto;
  margin-top: 5px;
  margin-bottom: 5px;
}


.validation-message.error {
  color: #780000; /* Keep red for errors */
}

.validation-message.success {
  color: #28a745; /* Green for success */
}


.validation-message.warning {
  color: #ffc107; /* Yellow for warnings */
}

.input-group input.validation-error {
  border-color: #780000;
  background-color: rgba(120, 0, 0, 0.05);
  box-shadow: 0 0 0 2px rgba(120, 0, 0, 0.1);
}

.input-group input.validation-success {
  border-color: #28a745; /* Green border for success */
  background-color: rgba(40, 167, 69, 0.05); /* Light green background */
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1); /* Green box-shadow */
}

.input-group input.validation-warning {
  border-color: #ffc107; /* Yellow border for warnings */
  background-color: rgba(255, 193, 7, 0.05); /* Light yellow background */
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.1); /* Yellow box-shadow */
}


.password-strength-indicator {
  margin-top: 8px;
  margin-bottom: 5px;
}

.password-strength-bar {
  width: 100%;
  height: 4px;
  background-color: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 5px;
}

.password-strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.password-strength-fill.weak {
  width: 25%;
  background-color: #780000;
}

.password-strength-fill.fair {
  width: 50%;
  background-color: #a00000;
}

.password-strength-fill.good {
  width: 75%;
  background-color: #780000;
}

.password-strength-fill.strong {
  width: 100%;
  background-color: #780000;
}

.password-strength-text {
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  color: #780000;
  /* Using theme color */
}


@media (max-width: 600px) {
  .validation-message {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .password-strength-text {
    font-size: 0.75rem;
  }
}

/* ===============================================
   FORM VALIDATION STYLES - END
   =============================================== */