#trivia-preview {
  background: #eaf4fb;
  padding: 2rem;
  text-align: center;
  border-radius: 1rem;
  max-width: 800px;
  margin: 2rem auto;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

#trivia-preview h2 {
  color: #1c3f91;
  font-size: 2rem;
  font-weight: bold;
}

#trivia-preview .sub {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #2f3e74;
}

#trivia-questions {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 2rem 0;
  margin: 0;
  min-height: 350px; /* 👈 Set fixed height to prevent layout shift */
}

#trivia-questions li {
  flex: 1 1 30%;
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
  transition: transform 0.3s ease;
  min-height: 100%; /* 👈 Ensure full stretch within UL height */
}

#trivia-questions li:hover {
  transform: translateY(-5px);
}

.fade-out {
  animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}