/* =========================
   CARD SYSTEM - OPTION C: PREMIUM 3D CARDS
========================= */

.card-slot{
  width: 72px;
  height: 104px;
  font-size: 80px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: 
    linear-gradient(145deg, #ffffff 0%, #fafafa 50%, #f5f5f5 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05) inset,
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Premium card texture */
.card-slot::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.03) 2px,
      rgba(255, 255, 255, 0.03) 4px
    );
  pointer-events: none;
  border-radius: var(--radius-lg);
  opacity: 0.4;
}

/* Glossy highlight */
.card-slot::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 50%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.card-slot:hover::after {
  opacity: 1;
}

/* 3D hover effect */
.card-slot:hover:not(.best-card),
.card-slot.focused:not(.best-card){
  transform: translateY(-10px) rotateX(5deg) scale(1.05);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.12),
    0 16px 32px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(59, 130, 246, 0.3),
    0 0 40px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

.card-display {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  line-height: 1;
  position: relative;
  z-index: 2;
}

/* Premium typography for cards */
.card-display .rank {
  font-size: 0.5em;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.5);
  letter-spacing: -0.02em;
}

.card-display .suit {
  font-size: 0.65em;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Red suits - vibrant */
.card-display.red .rank,
.card-display.red .suit{
  color: #dc2626;
  filter: drop-shadow(0 0 2px rgba(220, 38, 38, 0.3));
}

/* Black suits - deep black */
.card-display.black .rank,
.card-display.black .suit{
  color: #0a0a0a;
  filter: drop-shadow(0 0 1px rgba(10, 10, 10, 0.3));
}

/* Empty slot - premium look */
.card-display.empty{
  font-size: 32px;
  color: #a3a3a3;
  opacity: 0.4;
  font-weight: 300;
}

/* Larger board cards */
.board .card-slot{
  width: 80px;
  height: 116px;
}

.board .card-display .rank{ font-size: 44px; }
.board .card-display .suit{ font-size: 56px; }

/* Hidden typing input */
.hidden-input{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Enhanced slot flash animation */
.slot-flash{
  animation: cardFlashPremium 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardFlashPremium{
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.8);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 30px 10px rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
  }
  100% {
    box-shadow: var(--shadow-md);
    transform: scale(1);
  }
}

/* Card deal animation - premium feel */
@keyframes dealCard{
  from{
    opacity: 0;
    transform: translateY(-30px) rotateX(-15deg) scale(0.9);
  }
  to{
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

.card-slot.just-dealt{
  animation: dealCard 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Active/pressed state */
.card-slot:active{
  transform: translateY(-8px) scale(1.02);
  transition: transform 0.1s;
}

/* Focus ring for keyboard navigation */
.card-slot:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

/* Card stack effect for multiple cards */
.row .card-slot:not(:last-child) {
  margin-right: -4px;
}

.row:hover .card-slot:not(:last-child) {
  margin-right: 4px;
}
/* =========================
   BEST HAND - GREEN WIN GLOW
========================= */

.card-slot.best-card{
  border-color: rgba(34, 197, 94, 0.8);
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, 0.4),
    0 0 35px rgba(34, 197, 94, 0.35),
    0 10px 25px rgba(0, 0, 0, 0.35);
  transform: translateY(-6px) scale(1.03);
  z-index: 5;
}

/* Subtle pulse */
.card-slot.best-card{
  animation: bestCardGlowGreen 2.4s ease-in-out infinite alternate;
}

@keyframes bestCardGlowGreen{
  from{
    box-shadow:
      0 0 0 3px rgba(34, 197, 94, 0.3),
      0 0 25px rgba(34, 197, 94, 0.25),
      0 10px 25px rgba(0, 0, 0, 0.35);
  }
  to{
    box-shadow:
      0 0 0 3px rgba(34, 197, 94, 0.6),
      0 0 45px rgba(34, 197, 94, 0.45),
      0 10px 25px rgba(0, 0, 0, 0.35);
  }
}
.card-slot.nuts-gold{
  border-color: rgba(250, 204, 21, 0.9);
  box-shadow:
    0 0 0 3px rgba(250, 204, 21, 0.5),
    0 0 50px rgba(250, 204, 21, 0.45),
    0 10px 25px rgba(0, 0, 0, 0.35);
}