body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column; /* Stack items vertically */
  justify-content: flex-start; /* Align items at the top */
  align-items: center;
  min-height: 100vh;
  background-color: #060710;
  color: #fff;
  /* box-sizing: border-box; */
  text-align: center;
}

h1 {
  color: #fff;
  margin-bottom: 10px;
}

.nb {
  color: #fff;
  margin-bottom: 20px; /* Add some space below the NB text */
}

.input-options {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: 80%; /* Match the width of the main container */
  max-width: 600px; /* Limit maximum width */
  margin-bottom: 20px; /* Add space below the buttons */
}

.input-options button {
  background-color: #0e0f21;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  border-style: none;
  text-align: center;
  flex-grow: 1;
  padding: 10px 5px;
}

.input-options button.active {
  background-color: #fff;
  color: #000;
}

.input-options button:hover {
  background-color: #ddd;
}

.main-container {
  background-color: #fff;
  border-radius: 10px;
  width: 80%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: stretch; /* Changed to stretch to allow form to take full width */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  margin-bottom: 20px; /* Add some space below the main container */
  padding: 15px; /* Add padding around the forms */
}

form {
  width: 100%; /* Make forms take full width of the container */
  margin-bottom: 20px; /* Space between forms */
}

form:first-of-type {
  margin-bottom: 0; /* Remove bottom margin for the initially visible form */
}

form h2 {
  color: #333;
  text-align: center;
  margin-bottom: 15px;
}

.input-field {
  width: calc(100% - 22px); /* Adjust for padding and border */
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 1.1em;
  background-color: #fff;
  color: #333;
}

textarea.input-field {
  height: 150px; /* Adjust textarea height */
}

#keystoreFields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#keystoreFields > input {
  width: calc(100% - 22px); /* Adjust for padding and border */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 1.1em;
}

.text {
  text-align: center;
  margin-top: 15px;
  font-size: 0.95em;
  color: #777;
}

button.proceed {
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  background-color: #0e0f21;
  color: white;
  cursor: pointer;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
  margin: 20px auto 10px auto;
  width: 70%; /* Adjust button width within the form */
  display: block; /* Center the button */
}

button.proceed:hover {
  background-color: #060710;
}

.success-message,
.error-message {
  text-align: center;
  margin-top: 10px;
  font-size: 1em;
  font-weight: bold;
}

.success-message {
  color: red;
  display: none;
}

.error-message {
  color: red;
  display: none;
}

/* Media query for phones */
@media (max-width: 600px) {
  body {
    padding: 10px;
    justify-content: flex-start; /* Align to top on small screens */
  }

  h1 {
    font-size: 1.8em;
    margin: 50px auto 40px auto;
  }

  .nb {
    font-size: 0.9em;
    /* margin: 40px auto 40px auto; */
  }

  .input-options {
    width: 100%;
    max-width: none;
    margin-bottom: 15px;
  }

  .input-options button {
    font-size: 1em;
    padding: 10px 5px;
  }

  .main-container {
    padding: 15px;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: none;
    margin-bottom: 15px;
    /* background-color: red; */
  }

  form {
    padding: 15px;
    margin-bottom: 15px;
    display: flex; /* Make the form a flex container */
    flex-direction: column; /* Stack items vertically */
    align-items: center; 
    box-sizing: border-box;
  }

  form h2 {
    font-size: 1.4em;
    margin-bottom: 5px;
  }

  .input-field {
    font-size: 1em;
    /* padding: 12px; */
    margin-bottom: 12px;
    border-radius: 6px;
    width: calc(100% - 24px); /* Adjust width for padding in the form */
  }

  textarea.input-field {
    height: 250px;
    width: 100%; /* Take full width within the flex container */
    box-sizing: border-box;
  }

  #keystoreFields {
    gap: 8px;
    width: 100%; /* Ensure full width */
  }

  #keystoreFields > input {
    width: calc(100% - 24px); /* Adjust width for padding in the form */
  }

  button.proceed {
    font-size: 1em;
    padding: 12px 25px;
    margin-top: 15px;
    width: 75%;
    display: block; /* Keep it as block to control width and margin */
    border-radius: 6px;
    background-color: #0e0f21;
    align-self: center; /* Center the button within the flex form */
  }

  .text {
    font-size: 0.9em;
    margin-top: 10px;
  }
}