body {
  padding: 60px;
  background-color: #e6e6e6;
  font-family: Arial, sans-serif;
}

a {
  color: #333;
  text-decoration: none;
  transition: color 0.15s ease;
}

/* Animation keyframes */
@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes popOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0);
    opacity: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -20px 0;
  }
  100% {
    background-position: 20px 0;
  }
}

.header {
  margin-bottom: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.title-container {
  flex: 1;
  min-width: 200px;
  text-align: left;
}

.title {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin: 0 0 5px 0;
}

.count {
  color: #666;
  font-size: 16px;
}

.shuffle-button {
  background-color: #666666;
  color: white;
  border: 3px solid black;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.shuffle-button:hover {
  transform: scale(1.05);
}

.shuffle-button.active {
  background-color: #01a3ff;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 92px);
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.card-image {
  width: 92px;
  height: 125px;
  object-fit: contain;
  cursor: pointer;
  border-radius: 8px;
  border: 3px solid black;
  transition: all 0.15s ease-out;
}

.card-image.pop-out {
  animation: popOut 0.15s ease-out forwards;
}

.card-image.pop-in {
  animation: popIn 0.15s ease-out;
}

.card-image:hover {
  transform: scale(1.05);
}

.card-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 92px;
  height: 125px;
  background: #d0d0d0;
  border-radius: 8px;
  border: 3px solid black;
}

.card-container {
  position: relative;
  width: 92px;
  height: 125px;
}
/* Responsive Styles */
@media (max-width: 768px) {
  body {
    padding: 40px;
  }

  .header {
    margin-bottom: 40px;
    flex-direction: column;
    align-items: center;
  }

  .title-container {
    text-align: center;
  }

  .cards-grid {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0;
    padding-top: 20px;
  }

  .header {
    margin-bottom: 20px;
    flex-direction: column;
    align-items: center;
  }

  .title-container {
    text-align: center;
  }

  .cards-grid {
    gap: 16px;
  }
}