body {
  font-family: Inter, sans-serif;
}
.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}
.score-pill {
  background: #1f2937;
  border-radius: 8px;
  padding: 5px 10px;
  text-align: center;
  min-width: 52px;
}
.score-pill .label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #9ca3af;
  text-transform: uppercase;
}
.score-pill .value {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

/* Table */
#bj-table {
  background: #166534;
  border-radius: 16px;
  padding: 16px 12px;
  min-height: 320px;
}

/* Cards */
.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 80px;
  align-items: center;
}
.card {
  width: 52px;
  height: 72px;
  background: #fff;
  border-radius: 7px;
  border: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  line-height: 1;
  position: relative;
  transition: transform 0.2s;
  animation: dealCard 0.25s ease-out;
}
@keyframes dealCard {
  from {
    transform: scale(0.6) translateY(-10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.card.red {
  color: #dc2626;
}
.card.black {
  color: #111827;
}
.card.back {
  background: repeating-linear-gradient(
    45deg,
    #1e40af,
    #1e40af 4px,
    #1d4ed8 4px,
    #1d4ed8 8px
  );
  border-color: #1e3a8a;
}
.card-rank {
  font-size: 17px;
}
.card-suit {
  font-size: 14px;
}
.card-corner {
  position: absolute;
  font-size: 10px;
  line-height: 1;
}
.card-corner.tl {
  top: 4px;
  left: 5px;
}
.card-corner.br {
  bottom: 4px;
  right: 5px;
  transform: rotate(180deg);
}

.hand-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hand-score {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin-top: 4px;
}
.hand-score.bust {
  color: #fca5a5;
}
.hand-score.bj {
  color: #fde68a;
}

/* Bet chips */
.chip-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chip-btn:hover {
  transform: scale(1.1);
}
.chip-btn:active {
  transform: scale(0.95);
}

/* Action buttons */
.action-btn {
  flex: 1;
  padding: 10px 4px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition:
    filter 0.1s,
    transform 0.1s;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
}
.action-btn:active {
  transform: scale(0.96);
}
.action-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.btn-hit {
  background: #059669;
}
.btn-stand {
  background: #dc2626;
}
.btn-double {
  background: #7c3aed;
}
.btn-split {
  background: #d97706;
}

#result-msg {
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  padding: 10px;
  border-radius: 10px;
  margin: 8px 0;
}
.msg-win {
  background: rgba(5, 150, 105, 0.25);
  color: #a7f3d0;
}
.msg-lose {
  background: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
}
.msg-push {
  background: rgba(251, 191, 36, 0.2);
  color: #fde68a;
}
.msg-bj {
  background: rgba(251, 191, 36, 0.3);
  color: #fde68a;
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 999;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}
.related-game-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.related-game-card:hover {
  border-color: #6ee7b7;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}
.related-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
