/* Card Area */
.card-area {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding: 10px 0;
}

.card-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
}

/* Card Styles */
.card {
  width: 110px;
  height: 160px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  user-select: none;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card:active {
  transform: translateY(-5px) scale(0.98);
}

.card.held {
  transform: translateY(-20px);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.6);
  border: 3px solid #ffd700;
}

.card.held:hover {
  transform: translateY(-25px);
  box-shadow: 0 12px 35px rgba(255, 215, 0, 0.7);
}

.card.held .card-held-label {
  display: block;
}

/* Touch targets for mobile - ensure cards are tappable */
@media (hover: none) and (pointer: coarse) {
  .card:hover {
    /* Disable hover on touch devices */
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .card.held {
    /* Keep held state visible on mobile */
    transform: translateY(-12px);
  }
}

/* Card Content */
.card-rank {
  font-size: 2.2rem;
  font-weight: bold;
  position: absolute;
  top: 8px;
  left: 12px;
}

.card-suit {
  font-size: 3rem;
  position: absolute;
  bottom: 30px;
}

.card.red .card-rank,
.card.red .card-suit {
  color: #ff0000;
}

.card.black .card-rank,
.card.black .card-suit {
  color: #000000;
}

/* Wild Label */
.card-wild {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffd700;
  color: #000;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
  display: none;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}

.card .card-wild:not(:empty) {
  display: block;
}

/* Held Label */
.card-held-label {
  position: absolute;
  bottom: 8px;
  background: #ffd700;
  color: #000;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.75rem;
  display: none;
}

/* Card Number (for keyboard shortcut reference) */
.card-number {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffd700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.75rem;
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}

/* Card Animations */
@keyframes dealCard {
  0% {
    opacity: 0;
    transform: translateY(-100px) rotateY(180deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0deg);
  }
}

@keyframes drawCard {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

.card.dealing {
  animation: dealCard 0.25s ease-out;
}

.card.drawing {
  animation: drawCard 0.6s ease-in-out;
}

/* Responsive Cards - handled in main.css */
