form {
  width: 100%;
  max-width: 400px;
  margin: 20px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

fieldset {
  border: none;
  padding: 0;
}

legend {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 15px;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: url('background.jpg') no-repeat center center fixed;
  background-size: cover;
  text-align: center;
  overflow-x: hidden;
}

#candidateForm, #otpVerification, #testForm, #resultSection {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 50%;
  margin: 30px auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 90%;
}

.logo {
  width: 500px;
  max-width: 90%;
  margin-bottom: 20px;
}

h1, h2, h3 {
  color: #333;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

input[type="text"], input[type="tel"], input[type="number"], select {
  padding: 8px;
  margin: 5px;
  width: 80%;
  border-radius: 4px;
  border: 1px solid #ccc;
}

button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 5px;
  margin: 10px;
  width: 100%;
  max-width: 400px;
}

button:hover {
  background-color: #45a049;
}

#questionsContainer {
  text-align: left;
  margin-top: 20px;
}

#questionsContainer .mb-3 {
  margin-bottom: 15px;
}

#questionsContainer label {
  display: block;
  margin-bottom: 5px;
}

#questionsContainer input[type="radio"] {
  margin-right: 10px;
}

#nextButton {
  background-color: #007bff;
}

#prevButton {
  background-color: #ffc107;
}

button:disabled {
  background-color: #aaa;
}

#loadingScreen h3 {
  color: #333;
}

#progressBarContainer {
  width: 100%;
  background-color: #f3f3f3;
  border-radius: 25px;
  margin-bottom: 20px;
}

#progressBar {
  width: 0%;
  height: 20px;
  background-color: #4CAF50;
  border-radius: 25px;
}

#resultImage {
  display: none; /* Ensures it's treated as a block element */
  margin: 20px auto; /* Centers it horizontally */
  width: 100%;
  max-width: 400px;
}

/* If you need full centering (both horizontally & vertically) */
#imageContainer {
  display: flex;
  justify-content: center; /* Centers horizontally */
  align-items: center; /* Centers vertically */
  height: 100vh; /* Adjust based on your needs */
}

.intro-text {
  font-size: 18px;
}

.course-recommendations {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-align: center; /* Centers text */
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 70%;
  margin: 20px auto; /* Centers horizontally */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.course-recommendations p {
  margin-bottom: 15px;
  text-align: justify; /* Better text alignment */
}

/* 🎯 RESPONSIVE FIXES */
@media (max-width: 1024px) {
  .course-recommendations {
    font-size: 15px;
    max-width: 85%;
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .course-recommendations {
    font-size: 14px;
    max-width: 90%;
    padding: 12px;
    text-align: left;  /* Better alignment for smaller screens */
  }


}

@media (max-width: 480px) {
  .course-recommendations {
    font-size: 13px;
    max-width: 95%;
    padding: 10px;
    text-align: left;
  }

  
}


/* Responsive styles */
@media (max-width: 768px) {
  #candidateForm, #otpVerification, #testForm, #resultSection {
      width: 90%;
      padding: 15px;
      max-width: 100%;
  }

  .intro-text {
    font-size: 18px;
}
.course-recommendations {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;  /* Improves readability */
  text-align: center; /* Centers text */
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 80%;
  margin: 20px auto; /* Centers horizontally */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

  .logo {
      width: 80%;
  }
  body {
    padding: 20px;
  }

  form {
    width: 100%;
    padding: 15px;
  }

  input, select, button {
    max-width: 100%;
  }

  #questionsContainer {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  #profileDetails {
    text-align: center;    
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    padding: 20px;
    max-width: 70%;
    margin: 20px auto; /* Centers horizontally */
    
  }

  pre {

    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: pre-wrap;
    text-align: justify;

  }

  #profileDetails ul {
    padding-left: 20px;
    max-width: 100%;
  }

  #profileDetails li {
    margin-bottom: 10px;
    max-width: 100%;
  }
}