@media (max-width: 1024px) {
  #white_cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Adjust for better mobile fit */
    gap: 0.75rem;
    justify-content: center;
    max-width: 100%;
    padding: 1rem;
  }
}

@media (min-width: 1024px) {
  #white_cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.1rem;
    justify-content: center;
    max-width: 50%;
    padding: 1rem;
  }
}

@media (max-width: 1024px) {
  #white_cards_host {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Adjust for better mobile fit */
    gap: 0.75rem;
    justify-content: center;
    max-width: 100%;
    padding: 1rem;
  }
}

@media (min-width: 1024px) {
  #white_cards_host {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.1rem;
    justify-content: center;
    max-width: 100%;
    padding: 1rem;
  }
}
/* White Card Styling */
.card {
  border-radius: 8px;
  padding: 0.75rem; /* Adjust padding for more space */
  font-weight: bold;
  font-size: 1.1rem; /* Reduce font size slightly for mobile */
  line-height: 1.3; /* Increase line height for readability */
  height: 230px; /* Fixed height */
  width: 100%; /* Responsive width */
  max-width: 160px; /* Prevent cards from getting too large */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: black;
  background-color: white;
  box-shadow: 2px 2px 10px rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden; /* Prevent text from overflowing */
  word-wrap: break-word; /* Ensure text wraps properly */
  text-overflow: ellipsis;
}

.card span {
  display: block;
  max-width: 90%;
  word-wrap: break-word;
  text-align: center;
}

.selected-text {
  font-size: 0.9rem;
  font-weight: bold;
  color: black;
  margin-bottom: 5px;
}


/* White Card Hover Effect */
.card:hover {
  transform: scale(1.05);
  box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.2);
}

.card.selected {
  border: 3px solid black;
  box-shadow: 0px 0px 15px rgba(50, 205, 50, 0.7);
  transform: scale(1.05);
}

/* Black Card Styling */
#black_card {
  background-color: black;
  color: white;
  font-size: 1.3rem;
  font-weight: bold;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.2);
}