:root {
  --bg: #0f1d17;
  --bg-alt: #193127;
  --felt: #25553f;
  --felt-dark: #153828;
  --line: rgba(255, 245, 211, 0.16);
  --text: #f7f2e7;
  --muted: #d9cba8;
  --gold: #f2b74f;
  --salmon: #eb7a5a;
  --ice: #b8f1d9;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top, rgba(242, 183, 79, 0.14), transparent 28%),
    linear-gradient(180deg, #10241b 0%, #08110d 100%);
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.eyebrow,
.seat-role,
.status-title,
.rules-strip {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.eyebrow,
.seat-role,
.status-title {
  color: var(--gold);
  font-size: 0.75rem;
}

h1,
h2 {
  margin: 0;
  font-family: "DM Serif Text", serif;
  font-weight: 400;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
}

.lede {
  width: min(720px, 100%);
  margin: 12px auto 0;
  color: var(--muted);
  line-height: 1.6;
}

.table-wrap {
  position: relative;
  margin-bottom: 24px;
}

.table-glow {
  position: absolute;
  inset: 8% 20%;
  background: radial-gradient(circle, rgba(184, 241, 217, 0.12), transparent 70%);
  filter: blur(22px);
}

.table {
  position: relative;
  min-height: 560px;
  padding: 28px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 245, 211, 0.08), transparent 30%),
    linear-gradient(160deg, var(--felt) 0%, var(--felt-dark) 100%);
  border: 2px solid rgba(255, 245, 211, 0.08);
  box-shadow:
    0 24px 48px var(--shadow),
    inset 0 0 0 12px rgba(7, 19, 14, 0.16);
  overflow: hidden;
}

.table::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  pointer-events: none;
}

.board-area {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 18px;
  margin-top: 140px;
}

.round-indicator {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(12, 28, 21, 0.48);
  border: 1px solid var(--line);
}

.community-row,
.card-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.community-row {
  position: relative;
  z-index: 3;
}

.seat {
  position: absolute;
  z-index: 1;
  left: 28px;
  right: 28px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(7, 19, 14, 0.28);
  border: 1px solid rgba(255, 245, 211, 0.08);
  backdrop-filter: blur(10px);
}

.seat-top {
  top: 28px;
}

.seat-bottom {
  bottom: 28px;
}

.seat-header,
.seat-meta,
.stack-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.seat-meta {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hand-label {
  color: var(--ice);
}

.dealer-chip {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: #372300;
  font-weight: 700;
  visibility: hidden;
}

.dealer-chip.active {
  visibility: visible;
}

.card {
  width: 72px;
  height: 100px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8 0%, #f5ebd8 100%);
  color: #1d1d1d;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  transform: translateY(18px);
  opacity: 0;
  animation: dealIn 0.28s ease forwards;
}

.card.red {
  color: #c23c36;
}

.card.back {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent),
    repeating-linear-gradient(
      45deg,
      #283f7b 0,
      #283f7b 8px,
      #1c2d59 8px,
      #1c2d59 16px
    );
  color: #f8f8f8;
  border-color: rgba(255,255,255,0.12);
}

.card-corner {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.card-suit {
  font-size: 1.7rem;
  align-self: center;
}

.control-panel {
  display: grid;
  gap: 18px;
}

.status-card,
.action-bar,
.rules-strip {
  border-radius: 22px;
  background: rgba(7, 19, 14, 0.5);
  border: 1px solid rgba(255, 245, 211, 0.08);
}

.status-card {
  padding: 18px 20px;
}

.status-card p {
  margin: 0;
}

.status-title {
  margin-bottom: 8px;
}

.action-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.action {
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 16px;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.action:hover:enabled {
  transform: translateY(-1px);
}

.action:disabled {
  opacity: 0.4;
  cursor: default;
}

.action.primary {
  background: linear-gradient(135deg, #f2b74f 0%, #e58d3b 100%);
  color: #281700;
}

.action.accent {
  background: linear-gradient(135deg, #7dd5a4 0%, #3da06d 100%);
  color: #072615;
}

.action.danger {
  background: linear-gradient(135deg, #ec916f 0%, #b64338 100%);
}

.rules-strip {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 14px;
  color: var(--muted);
  font-size: 0.75rem;
}

@keyframes dealIn {
  from {
    transform: translateY(18px) rotate(2deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 20px;
  }

  .table {
    min-height: 700px;
    padding: 18px;
  }

  .seat {
    left: 18px;
    right: 18px;
  }

  .board-area {
    margin-top: 180px;
  }

  .card {
    width: 58px;
    height: 84px;
    padding: 8px;
  }

  .action-bar {
    grid-template-columns: 1fr 1fr;
  }

  .rules-strip {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}
