body {
  font-family: 'Comic Sans MS', Arial, sans-serif;
  text-align: center;
  background-color: #fef7e0;
  color: #333;
  margin: 0;
  padding: 0;
}

.page {
  padding: 40px 20px;
}

/* Use !important to ensure the 'display: none' beats 'display: flex' */
.hidden {
  display: none !important;
}

button {
  background-color: #ffcc00;
  border: 2px solid #333;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 14px 24px;
  margin: 10px;
  cursor: pointer;
  transition: transform 0.1s;
}

button:hover {
  transform: scale(1.05);
  background-color: #ffdd33;
}

#start-page {
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                    url('images/start-page.png');
  background-size: cover;
  background-position: center;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
}
/* back button */
.secondary-btn {
  background-color: #f0f0f0; /* Light gray */
  font-size: 0.9rem;
  padding: 8px 16px;
  border: 2px solid #333;
  margin-top: 20px;
}

.quiz-controls {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/*  Result Page */

#dino-img {
  width: 100%;           /* Allows the image to scale within its container */
  max-width: 350px;      /* Set this to your preferred maximum size */
  height: auto;          /* Maintains the original proportions */
  display: block;        /* Necessary for margin centering */
  margin: 20px auto;     /* Centers the image and adds space around it */
  border-radius: 12px;   /* Optional: adds rounded corners like your earlier code */
}

.compatibility-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px; /* Adds space between your two new boxes */
  margin-top: 20px;
  padding: 10px;
}

.circle {
  width: 150px; /* Sized for better visibility */
  height: 150px;
  overflow: hidden;
  background-color: #fef7e0;
  margin-bottom: 8px;
}

.circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.comp-group {
  flex: 1;
  margin: 10px;
  padding: 20px;
  border-radius: 20px; /* Makes the corners nice and round */
  background-color: #fef7e0; /* White background inside the box */
  transition: transform 0.2s; /* Smooth pop-up effect on hover */
}

/* Specific style for Best Pack Mates */
.comp-group:first-of-type {
  border: 3px solid #71b467; 
}

/* Specific style for Meteor Shower Avoidance */
.comp-group:last-of-type {
  border: 3px solid #d67b7b; 
}

.comp-group:hover {
  transform: translateY(-5px); /* Makes the box "float" when you hover */
}

.result-container {
  max-width: 800px;
  margin: 0 auto;
}

/* This targets the container holding your "most compatible" items */
.match-icons {
  display: flex;          /* This moves items side-by-side */
  flex-direction: row;    /* Ensures they stay in a horizontal line */
  justify-content: center; /* Centers the group in the middle of the page */
  gap: 30px;              /* Adds space between the two dinosaur circles */
  margin-top: 15px;       /* Adds space below the "most compatible" title */
}

/* This ensures each dino pic and name stay stacked on top of each other */
.match-item {
  display: flex;
  flex-direction: column; /* Keeps image above the name */
  align-items: center;    /* Centers the name under the circle */
  text-align: center;
}

#restart-btn {
  margin-top: 60px !important; /* Increase this number (e.g., 80px or 100px) to move it lower */
  margin-bottom: 40px;         /* Adds space below the button so it's not touching the edge */
  display: inline-block;       /* Ensures margins are respected correctly */
}