.blackjack-section {
  padding: 0;
}

/* How It Works Section */
.how-it-works {
  background: #1a1f3a;
  border-radius: 16px;
  padding: 20px;
  margin: 12px 0;
  border: 1px solid #334155;
  max-width: 900px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
}

.how-it-works h4 {
  margin: 0 0 16px 0;
  color: #10b981;
  font-size: 1.2rem;
  font-weight: 700;
}

.how-content {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
}

.how-content p {
  margin: 12px 0;
}

.how-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.how-content li {
  margin: 6px 0;
}

.blackjack-card {
  background: #1a1f3a;
  border-radius: 16px;
  padding: 20px;
  margin-top: 12px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
  border: 1px solid #334155;
  max-width: 900px;
}

/* Betting Section */
.betting-section {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
  border: 2px solid #10b981;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.betting-header {
  margin-bottom: 24px;
}

.betting-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.betting-header h4 {
  margin: 0 0 8px 0;
  color: #10b981;
  font-size: 1.5rem;
  font-weight: 700;
}

.betting-header p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.bet-input-group {
  margin-bottom: 20px;
}

#bet-amount {
  width: 200px;
  padding: 14px 20px;
  font-size: 1.3rem;
  font-weight: 700;
  border: 3px solid #10b981;
  border-radius: 12px;
  background: #0f172a;
  color: #10b981;
  text-align: center;
  margin-bottom: 16px;
  transition: all 0.2s;
}

#bet-amount:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.quick-bets {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.quick-bet {
  padding: 10px 20px;
  border: 2px solid #334155;
  border-radius: 10px;
  background: #1e293b;
  color: #e2e8f0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}

.quick-bet:hover {
  background: #334155;
  border-color: #475569;
  transform: translateY(-2px);
}

.quick-bet.all-in-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #f59e0b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.quick-bet.all-in-btn:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #d97706;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.deal-button {
  padding: 16px 48px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.deal-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

.deal-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Game Info */
.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #243041;
  border-radius: 10px;
  margin-bottom: 16px;
}

.current-bet {
  color: #fbbf24;
  font-weight: 700;
  font-size: 1.1rem;
}

#blackjack-message {
  color: #93c5fd;
  font-weight: 600;
}

/* Game Table Layout */
.blackjack-table {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 16px;
  min-height: 400px;
}

.dealer-section,
.player-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.player-section.has-split {
  grid-template-columns: 1fr 1fr;
}

.blackjack-hand {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #243041;
  border-radius: 12px;
  padding: 14px;
  min-height: 150px;
}

.blackjack-hand.active {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.hand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 1.05rem;
}

.hand-total {
  background: #0f172a;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 700;
  color: #10b981;
}

.hand-total.bust {
  color: #ef4444;
}

.hand-total.blackjack {
  color: #fbbf24;
}

/* Cards Animation */
.cards-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.cards-row .card {
  --card-width: 80px;
  --card-height: 112px;
  animation: cardDeal 0.4s ease-out;
  transform-origin: center;
}

@keyframes cardDeal {
  0% {
    transform: translateY(-50px) scale(0.8) rotateY(180deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1) rotateY(0deg);
    opacity: 1;
  }
}

.card.flip-animation {
  animation: cardFlip 0.6s ease;
}

@keyframes cardFlip {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

/* Action Buttons */
.blackjack-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.blackjack-actions button {
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

#hit-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#hit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

#stand-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

#stand-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

#double-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

#double-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

#split-btn {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

#split-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.4);
}

.blackjack-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.5);
}

@media (min-width: 900px) {
  .blackjack-card {
    padding: 24px;
  }
  
  .cards-row .card {
    --card-width: 90px;
    --card-height: 126px;
  }
}
