.hand {
  display: flex;
  max-width: 650px;
  width: 100%;
  background: #eee;
  padding: 10px;
  box-sizing: border-box;
  margin-bottom: 10px;
  position: relative;
}

.card-container {
  overflow: visible;
  width: 1px;
  flex-grow: 1;
  position: relative;
}

.card-container[data-discarded="true"] .card {
  filter: grayscale(85%) brightness(0.7);
}

.discard-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  padding: 6px 14px;
  border: 3px solid #d62828;
  color: #d62828;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.75);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.25),
    0 0 14px rgba(214, 40, 40, 0.45);
  pointer-events: none;
}

.card-container.tutorial-highlight {
  animation: tutorialPulse 1.1s ease-in-out infinite;
  box-shadow:
    0 0 0 3px rgba(255, 230, 80, 0.95),
    0 0 26px rgba(255, 215, 0, 0.85),
    0 0 44px rgba(255, 215, 0, 0.55);
  border-radius: 10px;
  transform: translateY(-3px) scale(1.02);
}

.card-container.tutorial-highlight::after {
  content: "tap me";
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 230, 80, 0.95);
  color: #3a2a00;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 0 10px rgba(255, 215, 0, 0.7);
  pointer-events: none;
  animation: tapMeFloat 1.4s ease-in-out infinite;
}

@keyframes tutorialPulse {
  0% {
    box-shadow:
      0 0 0 3px rgba(255, 230, 80, 0.85),
      0 0 18px rgba(255, 215, 0, 0.6),
      0 0 34px rgba(255, 215, 0, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(255, 230, 80, 1),
      0 0 30px rgba(255, 215, 0, 0.95),
      0 0 52px rgba(255, 215, 0, 0.7);
  }
  100% {
    box-shadow:
      0 0 0 3px rgba(255, 230, 80, 0.85),
      0 0 18px rgba(255, 215, 0, 0.6),
      0 0 34px rgba(255, 215, 0, 0.45);
  }
}

@keyframes tapMeFloat {
  0% {
    transform: translate(-50%, 0);
    opacity: 0.9;
  }
  50% {
    transform: translate(-50%, -6px);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 0);
    opacity: 0.9;
  }
}

.card-container:last-child {
  width: 100px;
  flex-grow: 0;
}

.card {
  width: 100px;
  height: 200px;
  background: darksalmon;
  border: 5px solid #000;
  box-shadow: -5px 0px 10px #000c;
  box-sizing: border-box;
  position: relative;
}

.your-turn .card-container.playable {
  animation: playablePulse 1.6s ease-in-out infinite;
}

.your-turn .card-container.playable.long-press {
  animation: none;
}

.your-turn .card-container.playable .card {
  box-shadow:
    -5px 0px 10px #000c,
    0 0 18px rgba(255, 215, 0, 0.55),
    0 0 32px rgba(255, 215, 0, 0.35);
}

@keyframes playablePulse {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

.card-name {
  background-color: #00000088;
  border-radius: 10px;
  padding: 3px;
  display: flex;
  align-items: center; /* Centers text vertically */
  justify-content: center; /* Centers text horizontally */
  text-align: center;
}

.card-top-left {
  background-color: #00000088;
  border-radius: 10px;
  padding: 3px;
}

.card-top-right {
  background-color: #00000088;
  border-radius: 10px;
  padding: 5px;
  color: white;
}

.card-cost {
  background-color: #00000088;
  border-radius: 10px;
  padding: 3px;
}

.long-press {
  transform: translateY(-28px) scale(1.03);
}

.long-press .card {
  box-shadow:
    -5px 0px 10px #000c,
    0 0 18px rgba(46, 196, 182, 0.7),
    0 0 30px rgba(46, 196, 182, 0.45);
  border-color: rgba(46, 196, 182, 0.9);
}

.long-press::after {
  content: "selected";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(46, 196, 182, 0.95);
  color: #083c36;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
