/* Poker — reference casino layout */
.window:has(.poker-app) .window__body {
  padding: 0;
}

.poker-app {
  min-height: calc(100vh - 4rem);
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55)),
    repeating-linear-gradient(
      90deg,
      #1a1410 0px,
      #241c16 14px,
      #120e0b 28px,
      #1f1712 42px
    );
  color: #f2f4f8;
  border-radius: 0 0 var(--radius, 18px) var(--radius, 18px);
}

.poker-app__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

.poker-arena {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  justify-items: center;
  padding: 0 1rem 1rem;
  gap: 0.25rem;
}

.poker-arena__dealer {
  position: relative;
  z-index: 5;
  display: grid;
  justify-items: center;
  margin-bottom: -42px;
}

.poker-dealer {
  width: min(240px, 40vw);
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  max-height: 280px;
  background: transparent;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.poker-dealer__status {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: #aeb8c8;
  font-weight: 600;
}

.tip-dealer {
  appearance: none;
  border: 0;
  cursor: pointer;
  margin-top: -0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  background: #2a303a;
  color: #e8edf5;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.tip-dealer:hover {
  background: #3a4250;
}

.poker-oval {
  width: min(100%, 980px);
  z-index: 1;
}

.poker-oval__rail {
  padding: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 18%, #3a161a, #240a0d 42%, #150609 80%);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 180, 190, 0.15);
}

.poker-oval__felt {
  position: relative;
  aspect-ratio: 1.85 / 1;
  min-height: 460px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 40%, #4a0f1c 0%, #2a0a10 42%, #180509 78%, #0c0304 100%);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.45);
  overflow: visible;
}

.poker-oval__ring {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 3px solid rgba(244, 63, 94), 0.55);
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.poker-center {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 0.7rem;
  justify-items: center;
  z-index: 2;
}

.poker__board {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 84px;
}

.poker-pot-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.chip-pile {
  position: relative;
  width: 54px;
  height: 28px;
}

.chip-pile span {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
}

.chip-pile span:nth-child(1) {
  left: 0;
  bottom: 0;
  background: conic-gradient(#e8e8e8 0 25%, #c62828 0 50%, #e8e8e8 0 75%, #1565c0 0);
}
.chip-pile span:nth-child(2) {
  left: 12px;
  bottom: 4px;
  background: conic-gradient(#222 0 25%, #a78bfa 0 50%, #222 0 75%, #a78bfa 0);
}
.chip-pile span:nth-child(3) {
  left: 24px;
  bottom: 0;
  background: conic-gradient(#fff 0 25%, #2e7d32 0 50%, #fff 0 75%, #2e7d32 0);
}
.chip-pile span:nth-child(4) {
  left: 34px;
  bottom: 5px;
  background: conic-gradient(#fff 0 25%, #6a1b9a 0 50%, #fff 0 75%, #6a1b9a 0);
}

.poker-pot-box {
  min-width: 72px;
  text-align: center;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 0.95rem;
}

.poker-table__seats {
  position: absolute;
  inset: 0;
}

.pseat {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 132px;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  z-index: 3;
}

.pseat--empty {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.pseat__plus {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(20, 24, 30, 0.75);
  border: 2px solid rgba(244, 201, 95, 0.75);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.pseat--empty:hover:not(:disabled) .pseat__plus {
  transform: scale(1.06);
  border-color: #ffe08a;
}

.pseat__row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pseat__ava-wrap {
  position: relative;
}

.pseat__avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.25), transparent 40%),
    hsl(var(--hue, 140) 45% 32%);
  border: 3px solid #2b3340;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
}

.pseat--you .pseat__avatar {
  border-color: var(--blood-2, #ff2a4a);
  box-shadow: 0 0 0 2px rgba(255, 42, 74, 0.4), 0 8px 16px rgba(0, 0, 0, 0.45);
}

.pseat--turn .pseat__avatar {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(244, 201, 95, 0.45), 0 8px 16px rgba(0, 0, 0, 0.45);
}

.pseat--folded {
  opacity: 0.45;
  filter: grayscale(0.5);
}

.pseat__lvl {
  position: absolute;
  left: -2px;
  bottom: -2px;
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--blood-2, #ff2a4a), var(--blood, #c4122f));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.pseat__bar {
  width: 100%;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  background: rgba(8, 10, 14, 0.88);
  text-align: center;
  line-height: 1.15;
}

.pseat__name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pseat__stack {
  font-size: 0.78rem;
  font-weight: 800;
}

.pseat__bet {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #a78bfa;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.pseat__bet i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: conic-gradient(#fff 0 25%, #c62828 0 50%, #fff 0 75%, #1565c0 0);
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.pseat__mini-cards {
  display: flex;
  gap: 2px;
}

.pseat__mini-cards .card {
  width: 28px;
  height: 40px;
}

.pseat__mini-cards .card__suit {
  font-size: 0.7rem;
}

.pseat__mini-cards .card__tl,
.pseat__mini-cards .card__br {
  font-size: 0.48rem;
}

.pbadge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--blood-2, #ff2a4a), var(--blood, #c4122f));
  color: #fff;
  z-index: 4;
}

.pbadge--fold {
  background: #4a3438;
}

.dealer-btn {
  position: absolute;
  top: 28px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #111;
  font-size: 0.7rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 4;
}

.poker-hud {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.5rem;
  z-index: 6;
}

.poker-chat {
  min-height: 92px;
  max-height: 110px;
  overflow: auto;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(10, 14, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  color: #c5ced9;
  display: grid;
  gap: 0.25rem;
  align-content: start;
}

.poker-hud__center {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
}

.hero-cards {
  display: flex;
  gap: 0.45rem;
}

.hero-cards .card {
  width: 72px;
  height: 104px;
  transform: translateY(-6px);
}

.hero-cards .card__suit {
  font-size: 1.8rem;
}

.hero-cards .card__tl,
.hero-cards .card__br {
  font-size: 0.9rem;
}

.poker-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pact {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-width: 110px;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #3a1a20, #1c0b0e);
  color: #f3e9e3;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.pact:hover:not(:disabled) {
  filter: brightness(1.08);
}

.pact:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pact--main {
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.35),
    inset 0 -3px 0 #a78bfa;
}

.hand-meter {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(10, 14, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hand-meter__label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #8b97a8;
  font-weight: 700;
}

.hand-meter__name {
  margin: 0.2rem 0 0.45rem;
  font-size: 0.85rem;
  font-weight: 800;
}

.hand-meter__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hand-meter__bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blood-2, #ff2a4a), var(--blood, #c4122f));
  border-radius: inherit;
}

@media (max-width: 900px) {
  .poker-hud {
    grid-template-columns: 1fr;
  }

  .poker-oval__felt {
    min-height: 520px;
    aspect-ratio: auto;
  }

  .poker-dealer {
    width: 140px;
  }

  .pseat {
    width: 108px;
  }
}
