.blackjack-container {
  text-align: center;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.bj-table-wrapper {
  min-height: 340px;
  overflow: visible;
}


.bj-table {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin: 1.5rem 0;
  gap: 1.5rem; /* vorher 3rem */
}

.card-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  min-height: 150px; /* verhindert Zusammenbruch */
  position: relative;
}


.card {
  width: 100px;
  height: 145px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  box-shadow: 0 0 4px #000;
  transform: translateY(20px);
  opacity: 0;
  animation: drawIn 0.4s ease forwards;
}

@keyframes drawIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.card.flip {
  animation: flipCard 0.6s ease forwards;
}

@keyframes flipCard {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(180deg);
  }
}

.card-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 140px;
}

#bj-deck {
  width: 100px;
  height: 140px;
  background-image: url('../playingcards/back.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 6px #000;
  border-radius: 6px;
  z-index: 5;
}

#bj-deck::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 100%;
  height: 100%;
  background-image: url('../playingcards/back.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 1;
  border-radius: 6px;
  z-index: -1;
}


/* Steuerung (Buttons) */
.bj-controls {
  margin-top: 2rem;
}

.card-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.card {
  position: relative; /* NIE absolute hier! */
}

.bj-score {
  font-size: 1.2rem;
  color: #ccc;
  margin: 0.3rem 0 0.5rem;
  text-align: center;
}

#bj-double.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.coin-display {
  position: fixed;
  top: 1.2rem;
  right: 10.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffd700;
  background: rgba(0,0,0,0.6);
  padding: 6px 12px;
  border-radius: 8px;
  z-index: 999;
}
