/* General Styles */
body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: "Arial", sans-serif;
  background-color: #ffffff;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
}

#header {
    margin-top: 20px;
}

h1 {
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 0;
    font-size: 1.4rem;
    text-align: center;
    color: #2C4150;
}


/* Quiz Container & Sections */
#quiz-container {
  width: 100%;
  max-width: 100%;
  min-width:100%;
  margin: auto;
}

@media (min-width: 767px) {
  #quiz-container {
    padding: 2% 10%; /* Padding for screens between 768px and 1024px */
  }

}
  
 @media (max-width: 768px) {
   h2 {
      font-size: 22px;
  }
 }

@media (min-width: 1441px) {
  #quiz-container {
    padding: 2% 30%; /* Padding for screens wider than 1024px */
  }
}

.quiz-section {
  display: none;
  padding: 20px;
  box-sizing: border-box;
}

.quiz-section.active {
  display: block; /* changed from flex to block for vertical stacking */
}

.warning-message {
  display: none; /* Hidden by default */
  background-color: orange;
  color: white;
  padding: 10px;
  margin-bottom: 20px; /* Space before the buttons */
  border-radius: 5px;
  transition: opacity 0.5s ease;
}

/* Options */
.options {
  display: flex;
  flex-wrap: wrap;
  justify-content: start; /* Align to start to handle incomplete lines */
  width: 100%; /* Take the full width of the container */
}

input[type="radio"],
input[type="checkbox"] {
  margin-right: 10px;
}

/* Buttons */
button {
  background-color: #293c48;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 20px; /* Space above the button */
}

button:hover {
  background-color: #007bff;
}

/* Hide the default checkbox and radio button styles */
input[type="checkbox"],
input[type="radio"] {
  display: none;
}

/* Style the labels like buttons */
label.unselected {
  padding: 10px 20px;
  font-size: 16px;
  border: 2px solid #ddd; /* Unselected border color */
  border-radius: 25px; /* Rounded corners */
  background-color: #f5f5f5; /* Unselected background */
  color: #333; /* Text color */
  margin: 5px;
  cursor: pointer;
  transition: all 0.3s ease; /* Updated for all properties */
  user-select: none; /* Prevent text selection */
}

/* Style the labels when their corresponding input is checked */
input[type="checkbox"]:checked + label,
input[type="radio"]:checked + label {
  background-color: #007bff; /* Selected background color */
  color: white;
  border-color: #007bff;
}

/* New styles for selected options */
label.selected {
  background-color: #007bff; /* Selected background color */
  color: white;
  border-color: #007bff; /* Selected border color */
  border-radius: 25px; /* Rounded corners */
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 123, 255, 0.5); /* Optional: Adds a subtle shadow */
}

/* Style adjustments for label buttons */
label {
  min-width: 120px; /* Set a minimum width */
  margin: 5px;
  padding: 10px 20px;
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #f5f5f5; /* Default background for unselected */
  color: #333; /* Text color for unselected */
  border: 2px solid #ddd; /* Border color for unselected */
  border-radius: 25px; /* Rounded corners */
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none; /* Prevent text selection */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
}

/* Style for when the corresponding input is checked */
input[type="checkbox"]:checked + label {
  background-color: #007bff; /* Background for selected */
  color: white; /* Text color for selected */
  border-color: #007bff; /* Border color for selected */
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.5); /* Larger shadow for selected */
}

@media (min-width: 768px) {
  .options label {
    max-width: calc(33.333% - 10px); /* Keep max-width to support flex basis */
    text-align: center; /* Center the text within each label */
  }
}

.button-container {
  display: flex;
  justify-content: center; /* This centers the buttons horizontally */
  align-items: center; /* This centers the buttons vertically, if needed */
}

.button-container button {
  margin: 50px 10px; /* This sets the top and bottom margins to 0 and left and right margins to 10px */
}

#favorite-books-input {
  width: 100%;
  padding: 10px 15px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s;
}

#favorite-books-input:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#book-suggestions-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
}

#book-suggestions-list li {
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

#book-suggestions-list li:last-child {
  border-bottom: none;
}

#book-suggestions-list li:hover {
  background-color: #007bff;
  color: white;
}

#recommendations-list {
  padding: 0;
  margin-top: 20px;
}

.recommendation-item {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.book-title {
  font-size: 18px;
  color: #333;
}

.likelihood {
  font-size: 16px;
  color: #666;
  margin-top: 5px;
}

.buy-button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.buy-button:hover {
  background-color: #0056b3;
}

.amazon-link {
  text-decoration: none;
}

.button-container {
  text-align: center;
  margin-top: 20px;
}

/* Progress Bar with Jedi Sword Effect */
.progress-container {
  width: 96%;
  height: 20px; /* Increased height for thickness */
  background-color: #1c1c1c; /* Dark background to make the glow stand out */
  position: fixed;
  top: 0;
  left: 2%;
  z-index: 100;
  border-radius: 80px; /* Rounded corners */
  overflow: hidden;
}

.progress-bar {
  background-image: linear-gradient(to right, rgb(0, 123, 255), rgb(0 0 0 / 20%), rgb(255, 255, 145), rgb(172, 0, 255));
  height: 100%;
  width: 0%; /* Initial state with no progress */
  transition: width 0.4s ease, background-position 1.5s ease-in-out;
  border-radius: 80px 0 0 80px; /* Rounded corners on the left side */
  background-size: 200% 100%;
}

.progress-bar.glowing {
  animation: glowing 1.5s infinite;
}

/* Keyframes for glowing effect */
@keyframes glowing {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 0%;
  }
}

/* Add visual markers for each step */
.progress-marker {
  position: absolute;
  top: 0;
  height: 100%;
  width: calc(100% / 7); /* Divide the progress bar into 7 equal parts */

}

.progress-marker:last-child {
  border-right: none; /* Remove the right border from the last marker */
}

#chosen-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  font-size: 16px;
  color: #333;
}

.recommendation-item {
  display: flex;
  align-items: center; /* Ensure vertical center alignment */
  justify-content: space-between; /* Distribute space evenly between elements */
  padding: 10px;
  margin-bottom: 10px;
  background-color: #f8f8f8;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.recommendation-item img {
  height: auto;
  border-radius: 4px;
}

.recommendation-item .content {
  display: flex;
  align-items: center; /* Align items vertically in the center */
  flex-grow: 1; /* Allow the container to take up the rest of the space */
  justify-content: space-between; /* Space out title and likelihood */
  padding: 0 10px; /* Padding for spacing around content */
}

.recommendation-item .book-title {
  font-size: 16px;
  font-weight: bold;
  text-align: left; /* Align title to the left */
}

.recommendation-item .likelihood {
  font-size: 14px;
  color: #555;
}

.recommendation-item .amazon-link {
  text-decoration: none;
}

.recommendation-item .buy-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  width: auto; /* Only as wide as its content */
  margin-left: 10px; /* Margin to separate from likelihood */
}

.recommendation-item .buy-button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* Responsive adjustments for mobile view */
@media (max-width: 768px) {
  .recommendation-item {
    flex-direction: column; /* Stack elements vertically on mobile */
    align-items: center; /* Center align all items on mobile */
  }

  .recommendation-item img {
    margin-bottom: 10px; /* Space between image and the text */
   
  }

  .recommendation-item .content {
    flex-direction: column;
    align-items: center;
    width: 100%; /* Full width on mobile for content area */
  }

  .recommendation-item .book-title,
  .recommendation-item .likelihood {
    width: 100%; /* Full width on mobile */
    text-align: center; /* Center text on mobile */
    margin-bottom: 5px; /* Spacing between title and likelihood */
  }

  .recommendation-item .buy-button {
    margin: 10px; /* Space above the button on mobile */
  }
}

@media (min-width: 769px) {
     .recommendation-item img {
    margin-bottom: 10px; /* Space between image and the text */
    width: 200px;
   
  }
  
}
  
/* Style for the share message */
.share-message {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

/* Update the share buttons container */
.share-buttons {
    display: flex;
    flex-direction: row; /* Stack items vertically */
    align-items: center; /* Center align all items */
    justify-content: center;
    flex-wrap: wrap; 
    gap: 10px;
    margin-top: 20px; /* Add margin to the top */
}

/* Style for share buttons */
.share-buttons button {
    padding: 8px 12px; /* Smaller padding */
    background-color: #007bff; /* Blue background color */
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px; /* Smaller font size */
    transition: background-color 0.3s, transform 0.3s;
}

.share-buttons button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* Responsive adjustments for mobile view */
@media (max-width: 768px) {
    .share-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        width: 100%; /* Full width on mobile */
    }

    .share-buttons button {
        width: 100%; /* Full width buttons on mobile */
        max-width: 300px; /* Max width to keep them manageable */
    }
}

@media (min-width: 769px) {
    #share-whatsapp {
        display: none;
    }
}


  
  
  
