.card-swap-container {
  position: relative;
  /* Removed absolute positioning to allow flexible layout */
  /* transform: translate(5%, 20%); */
  /* transform-origin: bottom right; */

  perspective: 1000px;
  overflow: visible;
}

.card {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 12px;
  border: 5px solid #000000;
  background: #000000;

  transform-style: preserve-3d;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  /* Improve touch/drag reliability */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.card:active {
  cursor: grabbing;
}

.swap-instruction {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  text-align: center;
  pointer-events: none;
  z-index: 100;
  opacity: 1;
  transition: opacity 1s ease-out;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.swap-instruction.left {
  left: -120px;
}

.swap-instruction.right {
  right: -120px;
}

.swap-instruction .arrow {
  font-size: 4rem;
  font-weight: 900;
  margin-top: 15px;
}

.swap-instruction .text {
  font-size: 1.5rem;
  font-weight: 800;
  white-space: nowrap;
}

.swap-instruction.fade-out {
  opacity: 0;
}

@media (max-width: 768px) {
  /* .card-swap-container {
    transform: scale(0.75); 
  } */
  .swap-instruction.left {
    left: -60px;
  }
  .swap-instruction.right {
    right: -60px;
  }
}
