:root {
  --green: #56ED49;
  --pale: #F9F8F4;
  --light-grey: #e0e0e0;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  --d: 1px;
  background: radial-gradient( circle at var(--d) var(--d), #1b1b1b calc(var(--d) - 1px), #f9f8f4 var(--d) ) 0 0 / 30px 30px;  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 90vh; /* Changed to min-height for smaller screens */
  width: 90%; /* Changed to a percentage for better responsiveness */
  max-width: 400px; /* Added a maximum width for larger screens */
  background: white;
  border-radius: 5px;
  padding: 20px;
  box-sizing: border-box; /* Added to include padding in width calculation */
}

.title {
  font-weight: 100;
  font-size: 2rem; /* Adjusted font size for smaller screens */
  text-align: center; /* Centered title text */
}

/* Add media queries for smaller screens */
@media (max-width: 768px) {

  body {
    height: auto;
    padding-top: 20px;
  }

  .container {
    width: 95%;
    max-width: 100%; 
    max-height: 60vh;
  }

  .title {
    font-size: 1.5rem;
  }

  .genre-image {
    object-fit: contain;
    width: 100%;
    height: 100%;
    max-width: 31vw !important;
    max-height: 200px !important;
  }

}


.title span {
  color: var(--green);
}

#question1, #question2, #question3, #bookDetails, #generatedBooks {
  height: 59vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--pale);
  border-top: 1px solid var(--light-grey);
  border-bottom: 1px solid var(--light-grey);
    overflow-y: auto;
}

/* Increase question size */
.question {
  font-size: 28px;
}

/* Limit image size */
.genre-image {
  max-width: 160px;
  max-height: 200px;
}

/* Position radio button below the image */
.image-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}

.image-container img {
  display: block;
}

.image-container input[type="radio"] {
  display: none;
}

.image-container label {
  display: block;
  cursor: pointer;
}

.image-container input[type="radio"] + img {
  opacity: 0.7;
}

.image-container input[type="radio"]:checked + img {
  opacity: 1;
}

/* Style submit button */
#submitBtn, button {
  padding: 10px 20px;
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

#bookDetails {
  display: none;
  text-align: center;
  margin-top: 20px;
}

#bookDetails h2 {
  margin-bottom: 20px;
}

#bookDetails label {
  display: block;
  text-align: start;
  margin-top: 10px;
  margin-bottom: 10px;
  width: 80%;
  margin: 10px auto 5px auto;
  font-weight: 50;
}

#bookDetails input,
#bookDetails textarea {
  width: 80%;
  padding: 10px;
  margin-bottom: 15px;
  box-sizing: border-box;
  border-radius: 5px;
  border: 1px solid var(--light-grey);
  border-radius: 5px;
}

#bookNote {
  height: 10vh;
}

#bookDetails .btn-group {
  display: flex;
}

#imageContainer3 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}
/* Progress bar styles */
.progress-container {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 10px;
  max-width: 100%;
  width: 80%;
  z-index: 1;
}

.progress-container::before {
  content: "";
  background-color: #e0e0e0;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 2px;
  width: 100%;
  z-index: -1;
}

.progress {
  background-color: var(--green);
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 4px;
  width: 0%;
  max-width: 100%;
  z-index: -1;
  transition: 0.4s ease;
}

.circle {
  background-color: #fff;
  color: #999;
  border-radius: 50%;
  height: 10px;
  width: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #e0e0e0;
  transition: 0.4s ease;
}

.circle.active {
  border-color: var(--green);
}

/* Image-based select option styles */
.image-select-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  margin: auto;
}

.image-option {
  width: 80px;
  height: 80px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.image-option img {
  width: 30px;
  height: 30px;
  padding: 20px;
  border: 1px solid var(--light-grey);
  border-radius: 5px;
}

.image-option span {
  margin-top: 10px;
  font-size: 14px;
  font-weight: bold;
}

.image-option.selected img {
  background-color: var(--green);
}

.nexBtn1, #nextBtn2, #nextBtn3, #submitBtn, #submitBtn2 {
  width: 370px;
  padding: 10px 30px;
  background-color: var(--green);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 18px;
  display: block;
  margin: 20px auto 0;
}

.nexBtn1, #nextBtn2, #nextBtn3, #submitBtn, #submitBtn2:hover {
  background-color: var(--green);
}

.image-container-q2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  height: 95%;
}

.image-option-q2 {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.image-option-q2 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
}

.radio-btn-q2 {
  position: absolute;
  top: 5px;
  left: 5px;
  opacity: 100;
  z-index: 1;
  accent-color: var(--green);
}

.radio-btn-q2:checked + .genre-image {
  border: 2px solid var(--green);
}

.genre-image.selected-image {
  border: 2px solid var(--green);
}

.radio-btn-q2:checked + .genre-image {
  border: 2px solid var(--green);
}

#question3 .genre-image.selected-image {
  border: 2px solid red;
}

#question3 .radio-btn-q2:checked + .genre-image {
  border: 2px solid red;
}

#question3 .radio-btn-q2 {
  accent-color: red;
}

.response-title {
  text-align: center;
}

.response-subtext {
  text-align: center;
  margin-bottom: 0px;
  margin-top: 5px;
}

.response-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center horizontally */
  justify-content: center; /* Center vertically */
  text-align: center; /* Center text content */
}

.generated-image {
  max-width: 100%; /* Ensure the image doesn't exceed its container */
}

.grecaptcha-badge { 
  visibility: hidden !important;
}