.blackjack-body {
  background: #0d202b;
}

.blackjack-stage {
  display: grid;
  gap: 0.9rem;
}

.blackjack-table-panel {
  min-height: 34rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 72% 24%, rgba(44, 119, 203, 0.16), transparent 30rem),
    #0b1c28;
  border: 0;
  box-shadow: none;
}

.blackjack-table {
  display: grid;
  grid-template-rows: 1fr auto 1.15fr;
  gap: 1.2rem;
  min-height: 31rem;
  padding: 1.25rem;
  border-radius: 0.55rem;
  background:
    linear-gradient(135deg, rgba(24, 48, 61, 0.72), rgba(8, 27, 39, 0.88)),
    #0a1a25;
}

.hand-zone {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.hand-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #b9d9ea;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hand-heading strong {
  min-width: 2.8rem;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: #28475a;
  color: #fff;
  text-align: center;
}

.card-row,
.player-hands {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  min-width: 0;
}

.player-hands {
  align-items: flex-start;
}

.player-hand {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  padding: 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid transparent;
  background: rgba(16, 37, 50, 0.58);
}

.player-hand.active {
  border-color: #1fdd7c;
  box-shadow: 0 0 0 2px rgba(31, 221, 124, 0.16);
}

.player-hand.settled {
  opacity: 0.74;
}

.hand-meta {
  display: flex;
  gap: 0.55rem;
  color: #b9d9ea;
  font-size: 0.78rem;
  font-weight: 900;
}

.playing-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 4.15rem;
  height: 5.85rem;
  padding: 0.45rem;
  border-radius: 0.45rem;
  background: #f4f8fb;
  color: #122533;
  box-shadow: 0 0.4rem 0 rgba(0, 0, 0, 0.2);
  font-weight: 950;
}

.playing-card.red {
  color: #e8174f;
}

.playing-card.hidden-card {
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
    #2c5267;
  color: #9fd7f3;
}

.card-rank {
  font-size: 1.15rem;
  line-height: 1;
}

.card-suit-centre {
  display: grid;
  place-items: center;
  font-size: 1.75rem;
}

.card-suit-bottom {
  justify-self: end;
  align-self: end;
  font-size: 1rem;
  transform: rotate(180deg);
}

.round-message {
  align-self: center;
  justify-self: center;
  min-width: min(28rem, 100%);
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  background: #122b39;
  color: #fff;
  text-align: center;
  font-weight: 900;
}

.blackjack-actions {
  display: grid;
  gap: 0.55rem;
}

.blackjack-actions .button {
  width: 100%;
  min-height: 2.65rem;
}

.blackjack-actions .button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: saturate(0.65);
}

.blackjack-metrics-row > div {
  min-height: 4rem;
  padding: 0.75rem;
  border-radius: 0.45rem;
  background: #18303d;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.blackjack-metrics-row strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.05rem;
}

.blackjack-body .live-stats-drawer {
  padding: 1rem;
  min-width: 19rem;
}

.blackjack-body .live-stats-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.blackjack-body .live-stats-header h2 {
  display: flex;
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  white-space: nowrap;
}

.blackjack-body .live-stats-header h2 span {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.7rem;
}

.blackjack-body .live-stats-header .icon-button,
.blackjack-body .stats-filter-row .icon-button {
  flex: 0 0 auto;
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1rem;
}

.blackjack-body .stats-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.blackjack-body .live-stats-metrics {
  gap: 0;
  padding: 0.85rem;
  margin-bottom: 0.85rem;
}

.blackjack-body .live-stats-metrics > div {
  min-width: 0;
  min-height: 3.5rem;
  padding: 0.2rem 0.7rem;
}

.blackjack-body .stats-chart {
  height: 13.75rem;
  padding: 0.8rem;
  overflow: hidden;
}

.blackjack-body .chart-loss-fill {
  fill: rgba(255, 40, 84, 0.24);
}

.blackjack-game-layout.stats-open {
  grid-template-columns: 19rem 18rem minmax(0, 1fr);
}

@media (max-width: 980px) {
  .blackjack-table-panel {
    min-height: auto;
  }

  .blackjack-table {
    min-height: 29rem;
    padding: 0.9rem;
  }

  .playing-card {
    width: 3.45rem;
    height: 4.9rem;
  }
}
