/* =========================
   RESET + GLOBAL
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: #000;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
}

/* Lock page into HEADER / TABLE / ACTION BAR */
body.table-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =========================
   HEADER
========================= */
.table-header {
  height: 72px;
  flex: 0 0 72px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
}

.table-header h1 {
  font-size: 22px;
  font-weight: 900;
}

.stats {
  font-size: 14px;
  font-weight: 800;
}

/* =========================
   TABLE STAGE
========================= */
.table-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* BACKGROUND */
.table-background {
  position: absolute;
  inset: 0;
  background: url("https://you-deal.com/images/dealers.png") center / cover no-repeat;
  z-index: 0;
}

/* =========================
   RING SYSTEM (Pokerface-style)
========================= */
.ring {
  position: absolute;
  inset: 0;
  z-index: 2;

  /* Controlled scaling */
  --radius: min(34vmin, 300px);
  --seatW: min(36vmin, 170px);
  --seatH: calc(var(--seatW) * 1.25);
}

/* =========================
   SEATS (ANCHORS ON RING)
========================= */
.seat {
  position: absolute;
  width: var(--seatW);
  height: var(--seatH);

  left: 50%;
  top: 50%;

  transform:
    translate(-50%, -50%)
    rotate(var(--angle))
    translateY(calc(-1 * var(--radius)))
    rotate(calc(-1 * var(--angle)));

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Seat angles (6 TOTAL incl YOU) */
.seat[data-seat="0"] { --angle: 180deg; } /* YOU bottom */
.seat[data-seat="1"] { --angle: 225deg; }
.seat[data-seat="2"] { --angle: 300deg; }
.seat[data-seat="3"] { --angle:   0deg; }
.seat[data-seat="4"] { --angle:  60deg; }
.seat[data-seat="5"] { --angle: 135deg; }

/* =========================
   PLAYER BOX (VIDEO PLACEHOLDER)
========================= */
.player {
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  border-radius: 22px;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding-bottom: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* =========================
   CENTER STACK (DECK / DISCARD)
========================= */
.center-stack {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin-top: -5vmin;

  display: flex;
  gap: 14px;
  z-index: 3;
}

.pile {
  width: min(26vmin, 125px);
  height: min(22vmin, 125px);

  background: rgba(0,0,0,0.55);
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.22);

  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

/* =========================
   ACTION BAR
========================= */
.action-bar {
  height: 90px;
  flex: 0 0 90px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
}

.action-bar button {
  width: 22%;
  height: 60px;
  border-radius: 30px;
  border: none;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
}

.fold  { background: #7a1c1c; color: #fff; }
.check { background: #444;   color: #fff; }
.call  { background: #1f5aa6; color: #fff; }
.raise { background: #c9a227; color: #000; }

/* =========================
   MOBILE TIGHTENING
========================= */
@media (max-width: 420px) {
  .ring {
    --radius: min(32vmin, 260px);
  }
}