* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
body,
main {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

main {
  flex-direction: column;
}

.formContainer {
  background-color: white; /* blue */
  width: 70vw;
  max-width: 1200px;
  height: 70vh;
  min-height: 480px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-radius: 1rem;
  /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); */
  position: relative;
  gap: 2rem;
}

.formTexts {
  width: 40%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
}

.formTexts img {
  width: 100%;
  max-height: 40vh;
  object-fit: contain;
}

.formTexts h1 {
  font-size: 2rem;
  margin: 0;
}

.formTexts h2 {
  font-size: 1.5rem;
  margin: 0;
}

.formTexts p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.formInputsContainer {
  width: 35vw;
  min-width: 3 20px;
  min-height: 30vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  position: relative;
  /* box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); */
}

.mdc-text-field__input {
  width: 100% !important;
  max-width: 400px !important;
  min-width: 280px !important;

  height: 3.5rem !important; /* Increased height */
  padding: 0 1rem !important; /* Add horizontal padding */
  font-size: 1.2rem !important; /* Larger text for readability */
  line-height: 1.5 !important;

  border: none; /* Optional: ensure border is from wrapper */
  box-sizing: border-box;
}

.errorMsg {
  color: red;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.buttonContainer {
  align-self: flex-end;
  padding-right: 2vw;
}

.buttonContainer button {
  background-color: #1976d2 !important; /* darker blue for contrast */
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
}
.login-redirect {
  margin-top: 2.5rem;
  font-size: 0.95rem;
  text-align: center;
  color: #333; /* darker gray */
}

.login-redirect a {
  margin-left: 0.4rem;
  color: #2f3e2c; /* your main theme color */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.login-redirect a:hover {
  color: #6e8e59; /* soft green on hover */
  text-decoration: underline;
}
.random {
  width: 100%;
  min-height: 30vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  position: absolute;
  z-index: 10;
  /* box-shadow: 0 0 16px rgba(0, 0, 0, 0.2); */
}
#form0 {
  top: 0;
  left: 0;
  z-index: 1;
  transition: all 0.3s ease;
}
#form1 {
  top: 0;
  left: 110%;
  opacity: 0;

  z-index: -1;
  transition: opacity 0.5s ease, left 0.5s ease;
}

#form2 {
  top: 0;
  left: 110%;
  z-index: -1;
}

#form3 {
  top: 0;
  left: 110%;
  z-index: -1;
}
#form4 {
  top: 0;
  left: 110%;
  z-index: -1;
}

.finalStep {
  width: 60vw;
  max-width: 700px;
  height: 60vh;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  align-items: center;
  padding: 2rem;
  border-radius: 1rem;
  gap: 2rem;
}

.finalStepImg {
  width: 100%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
}

.finalStep button {
  align-self: flex-end;
  padding: 0.6rem 1.25rem;
  background-color: #2f3e2c;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
}

.footer {
  margin-top: 1vh;
  width: 100%;
  max-width: 1200px;
  padding: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* allows wrapping on smaller screens */
  gap: 1rem;
  border-radius: 0.5rem;
}

.footerLinks {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.footer a {
  text-decoration: none;
  color: black;
}

.footerLinks a {
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
  transition: color 0.2s ease-in-out;
}

.row-mobile-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.country-select-wrapper {
  flex-shrink: 0;
}

.country-select {
  appearance: none;
  padding: 10px 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #555;
  background-color: #1c1c1c;
  color: #fff;
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23ccc' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  min-width: 90px;
}


@media (max-width: 575.98px) {
  .formContainer {
    flex-direction: column;
    width: 90vw;
    height: auto;
    padding: 1.5rem 1rem;
    gap: 2rem;
  }
  .finalStep {
    width: 90vw;
    height: auto;
    max-height: none;
    padding: 1.25rem;
    gap: 1.5rem;
    border-radius: 0.75rem;
  }

  .finalStepImg {
    max-width: 280px;
    width: 100%;
    height: auto;
  }

  .finalStep h1 {
    font-size: 1.2rem;
    text-align: center;
  }

  .finalStep button {
    align-self: center;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border-radius: 0.5rem;
  }

  .formTexts {
    width: 100%;
    text-align: center;
    align-items: center;
    gap: 1rem;
  }

  .formTexts img {
    max-height: 180px;
  }

  .formInputsContainer {
    width: 100%;
    min-height: 320px; /* ✅ Set a height so .random can fill it */
    position: relative;
    padding: 1rem;
    gap: 1.25rem;
    border-radius: 0.75rem;
    /* box-shadow: 0 0 8px rgba(0, 0, 0, 0.08); */
  }

  .random {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* ✅ Fills the parent height */
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    border-radius: 0.75rem;
    z-index: 10;
    /* box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); */
  }

  .mdc-text-field__input {
    font-size: 1.1rem !important;
    height: 3.25rem !important;
    padding: 0 1rem !important;
  }

  .buttonContainer {
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: center; /* ✅ center horizontally */
    align-items: center; /* ✅ center vertically just in case */
  }

  .buttonContainer button {
    width: 100%;
    font-size: 1rem;
    margin-top: 1rem !important;
    padding: 0.9rem;
  }
  .footer {
    padding: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap; /* keep wrapping on very small screens */
  }

  .footerLinks {
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
  }

  .footerLinks a {
    font-size: 0.9rem;
  }

  .footer a {
    word-break: break-word;
    font-size: 0.9rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .formContainer {
    flex-direction: column;
    width: 90vw;
    height: auto;
    padding: 2rem 1.5rem;
    gap: 2rem;
    border-radius: 1rem;
  }

  .finalStep {
    width: 80vw;
    height: auto;
    max-height: none;
    padding: 1.75rem;
    gap: 1.75rem;
    border-radius: 0.75rem;
  }

  .finalStepImg {
    max-width: 340px;
    width: 100%;
    height: auto;
  }

  .finalStep h1 {
    font-size: 1.4rem;
    text-align: center;
  }

  .finalStep button {
    align-self: center;
    padding: 0.55rem 1.25rem;
    font-size: 1rem;
    border-radius: 0.5rem;
  }

  .formTexts {
    width: 100%;
    text-align: center;
    align-items: center;
    gap: 1rem;
  }

  .formTexts h1 {
    font-size: 1.75rem;
  }

  .formTexts h2 {
    font-size: 1.3rem;
  }

  .formTexts p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .formTexts img {
    max-height: 200px;
    width: 100%;
    object-fit: contain;
  }

  .formInputsContainer {
    width: 100%;
    padding: 1.25rem;
    gap: 1.5rem;
    border-radius: 0.75rem;
  }

  .mdc-text-field__input {
    font-size: 1.15rem !important;
    height: 3.25rem !important;
    padding: 0 1rem !important;
  }

  .buttonContainer {
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
  }

  .buttonContainer button {
    width: 100%;
    max-width: 320px;
    padding: 0.85rem;
    font-size: 1rem;
    border-radius: 0.5rem;
  }

  .random {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Fill parent */
    padding: 1.25rem;
    gap: 1.25rem;
    border-radius: 0.75rem;
    /* box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); */
    z-index: 10;
  }

  .footer {
    padding: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .footerLinks {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1rem;
  }

  .footerLinks a,
  .footer a {
    font-size: 0.95rem;
    word-break: break-word;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .formContainer {
    flex-direction: column; /* ✅ Switch to vertical layout */
    width: 90vw;
    height: auto;
    padding: 2rem 1.5rem;
    gap: 2rem;
    border-radius: 1rem;
  }

  .finalStep {
    width: 70vw;
    max-width: 600px;
    height: auto;
    padding: 2rem;
    gap: 2rem;
    border-radius: 1rem;
  }

  .finalStepImg {
    max-width: 380px;
    width: 100%;
    height: auto;
  }

  .finalStep h1 {
    font-size: 1.6rem;
    text-align: center;
  }

  .finalStep button {
    align-self: center;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.5rem;
  }

  .formTexts {
    width: 100%;
    text-align: center;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }

  .formTexts h1 {
    font-size: 1.7rem;
  }

  .formTexts h2 {
    font-size: 1.2rem;
  }

  .formTexts p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .formTexts img {
    max-height: 200px;
    width: 100%;
    object-fit: contain;
  }

  .formInputsContainer {
    width: 100%;
    padding: 1.5rem;
    border-radius: 0.75rem;
    gap: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .mdc-text-field__input {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 1rem !important;
    height: 2.75rem !important;
    padding: 0 0.75rem !important;
    line-height: 1.4 !important;
  }

  .buttonContainer {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0;
  }

  .buttonContainer button {
    width: 100%;
    max-width: 280px;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    border-radius: 0.5rem;
  }

  .random {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* fill parent */
    padding: 1.5rem;
    gap: 1.25rem;
    border-radius: 0.75rem;
    z-index: 10;
    /* box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .footer {
    padding: 1rem 1.5rem;
    gap: 1rem;
    flex-wrap: nowrap; /* keep horizontal layout without wrapping unless forced */
  }

  .footerLinks {
    justify-content: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .footerLinks a,
  .footer a {
    font-size: 1rem;
    word-break: break-word;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .formContainer {
    flex-direction: row;
    width: 80vw;
    height: auto;
    min-height: 550px;
    padding: 2rem;
    gap: 2rem;
    border-radius: 1rem;
  }

  .finalStep {
    width: 65vw;
    max-width: 650px;
    height: auto;
    padding: 2rem 2.5rem;
    gap: 2rem;
    border-radius: 1rem;
  }

  .finalStepImg {
    max-width: 400px;
    width: 100%;
    height: auto;
  }

  .finalStep h1 {
    font-size: 1.8rem;
    text-align: center;
  }

  .finalStep button {
    align-self: center;
    padding: 0.6rem 1.75rem;
    font-size: 1.05rem;
    border-radius: 0.5rem;
  }

  .formTexts {
    width: 48%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.25rem;
    text-align: left;
  }

  .formTexts h1 {
    font-size: 1.9rem;
  }

  .formTexts h2 {
    font-size: 1.4rem;
  }

  .formTexts p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .formTexts img {
    max-height: 220px;
    width: 100%;
    object-fit: contain;
  }

  .formInputsContainer {
    width: 45%;
    padding: 1.5rem;
    border-radius: 0.75rem;
    gap: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .mdc-text-field {
    height: 2.5rem !important;
    font-size: 0.95rem;
  }

  .mdc-text-field__input {
    font-size: 0.95rem !important;
    height: 2.5rem !important;
    padding: 0 0.75rem !important;
    line-height: 1.4 !important;
  }

  .mdc-floating-label {
    font-size: 0.85rem !important;
  }
  .buttonContainer {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 0;
  }

  .buttonContainer button {
    max-width: 100px;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    border-radius: 0.5rem;
  }

  .random {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    border-radius: 0.75rem;
    z-index: 10;
    /* box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
  }

  .footer {
    padding: 1rem 2rem;
    gap: 1rem;
    flex-wrap: nowrap;
  }

  .footerLinks {
    justify-content: flex-end;
    gap: 1.5rem;
    flex-wrap: nowrap;
  }

  .footerLinks a,
  .footer a {
    font-size: 1rem;
    white-space: nowrap;
  }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  .formContainer {
    flex-direction: row;
    width: 75vw;
    height: auto;
    min-height: 580px;
    padding: 2.5rem;
    gap: 2.5rem;
    border-radius: 1rem;
  }

  .finalStep {
    width: 60vw;
    max-width: 720px;
    height: auto;
    padding: 2.5rem 3rem;
    gap: 2rem;
    border-radius: 1rem;
  }

  .finalStepImg {
    max-width: 420px;
    width: 100%;
    height: auto;
  }

  .finalStep h1 {
    font-size: 2rem;
    text-align: center;
  }

  .finalStep button {
    align-self: center;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
  }

  .formTexts {
    width: 48%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: left;
  }

  .formTexts h1 {
    font-size: 2rem;
  }

  .formTexts h2 {
    font-size: 1.5rem;
  }

  .formTexts p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .formTexts img {
    max-height: 240px;
    width: 100%;
    object-fit: contain;
  }

  .formInputsContainer {
    width: 45%;
    padding: 2rem;
    border-radius: 0.75rem;
    gap: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .mdc-text-field {
    height: 2.75rem !important;
    font-size: 1rem;
  }

  .mdc-text-field__input {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 1rem !important;
    height: 2.75rem !important;
    padding: 0 0.75rem !important;
    line-height: 1.4 !important;
  }

  .mdc-floating-label {
    font-size: 0.9rem !important;
  }

  .buttonContainer {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 0;
  }

  .buttonContainer button {
    max-width: 150px;
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 0.5rem;
  }

  .random {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    border-radius: 0.75rem;
    z-index: 10;
    /* box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
  }

  .footer {
    padding: 1.25rem 2.5rem;
    gap: 1.25rem;
    flex-wrap: nowrap;
  }

  .footerLinks {
    justify-content: flex-end;
    gap: 1.75rem;
    flex-wrap: nowrap;
  }

  .footerLinks a,
  .footer a {
    font-size: 1.05rem;
    white-space: nowrap;
  }
}

@media (min-width: 1400px) {
  .formContainer {
    width: 70vw;
    max-width: 1400px;
    min-height: 600px;
    padding: 3rem;
    gap: 3rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .finalStep {
    width: 55vw;
    max-width: 800px;
    height: auto;
    padding: 3rem;
    gap: 2.5rem;
    border-radius: 1.25rem;
  }

  .finalStepImg {
    max-width: 450px;
    width: 100%;
    height: auto;
  }

  .finalStep h1 {
    font-size: 2.2rem;
    text-align: center;
  }

  .finalStep button {
    align-self: center;
    padding: 0.85rem 2.25rem;
    font-size: 1.15rem;
    border-radius: 0.6rem;
  }

  .formTexts {
    width: 48%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    gap: 1.5rem;
  }

  .formTexts h1 {
    font-size: 2.2rem;
  }

  .formTexts h2 {
    font-size: 1.6rem;
  }

  .formTexts p {
    font-size: 1.05rem;
    line-height: 1.7;
  }

  .formTexts img {
    max-height: 260px;
    width: 100%;
    object-fit: contain;
  }

  .formInputsContainer {
    width: 45%;
    padding: 2.25rem;
    border-radius: 0.75rem;
    gap: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .mdc-text-field {
    height: 3rem !important;
    font-size: 1rem;
  }

  .mdc-text-field__input {
    width: 100% !important;
    font-size: 1rem !important;
    height: 3rem !important;
    padding: 0 1rem !important;
    line-height: 1.5 !important;
  }

  .mdc-floating-label {
    font-size: 0.95rem !important;
  }

  .buttonContainer {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .buttonContainer button {
    max-width: 130px;
    width: 100%;
    /* padding: 0rem 1.5rem; */
    font-size: 1.05rem;
    border-radius: 0.5rem;
  }

  .random {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    border-radius: 0.75rem;
    z-index: 10;
    /* box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.75rem;
  }

  .footer {
    padding: 1.5rem 3rem;
    gap: 1.5rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: nowrap;
  }

  .footerLinks {
    justify-content: flex-end;
    gap: 2rem;
    flex-wrap: nowrap;
  }

  .footerLinks a,
  .footer a {
    font-size: 1.1rem;
    white-space: nowrap;
  }
}
