.card-container {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1px;
  box-sizing: border-box;
}

.card {
  position: relative;
  width: 200px;
  height: 300px;
  z-index: 1;
  transition: transform 0.3s, opacity 0.5s;
  opacity: 1;
}

.selected-cards-hidden .card {
  display: none;
}

.selected-card-details {
  display: none;
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.selected-card-details h2,
.selected-card-details p {
  margin: 10px 0;
}

.selected-card-details img {
  width: 200px;
  height: 300px;
}

.card:first-child {
  margin-left: 0;
}

.card:not(:first-child) {
  margin-left: -150px;
}

.front {
  display: block;
  width: 100%;
  height: 100%;
}

.card img {
  transition: transform 0.3s, opacity 0.5s;
}

.card:hover img {
  transform: translateY(-20px);
  cursor: pointer;
  border-radius: 10px;
}

.card:not(:hover) {
  transition-delay: 0.2s;
}

.card:not(:hover) img {
  transition-delay: 0s;
}

.draw-again-button {
  display: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  border: none;
}

.fade-out {
  opacity: 0;
  transition: opacity 2s ease-out;
}

.fade-in {
  opacity: 0;
  transition: opacity 2s ease-in;
  display: none;
}

.fade-in.fade-in-active {
  opacity: 1;
  display: flex;
}

.card, .selected-card-details, .draw-again-button {
  transition: opacity 2s ease;
}