/* =======================================================
   PokerStrike — Play View (clean slate)
   ======================================================= */

/* ---------- Root / Lobby ---------- */
.pkr-root{ display:grid; grid-template-columns:1fr; gap:14px; }

.pkr-lobby .pkr-row{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.pkr-label{ width:120px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.pkr-buyin{ flex:1; display:grid; gap:6px; }
.pkr-buyin input[type="range"]{ width:100%; }
.pkr-buyin-readout{ font-weight:800; }
.pkr-cta{ justify-content:flex-start; }
.pkr-cta .btn{ min-width:140px; }
.pkr-lobby .toggle{ display:inline-flex; align-items:center; gap:8px; padding:6px 8px; border:1px solid var(--panel-2); border-radius:8px; background:var(--panel); }

/* ---------- Table scaffold ---------- */
.pkr-table{
  display:grid;
  grid-template-rows: auto 1fr;
  gap:10px;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}
.pkr-head{ display:flex; align-items:center; justify-content:space-between; }

/* Felt stays as the middle row and fills all remaining height */
.pkr-felt{
  position:relative;
  overflow:hidden;
  flex:1 1 auto;
  min-height:0;
  border-radius:12px;
  border:1px solid var(--panel-2);
  background:
    radial-gradient(140% 120% at 50% 30%, rgba(0,0,0,.24), rgba(0,0,0,.6)),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  padding:16px;
}

/* ---------- Center board & pot ---------- */
.pkr-board{
  position: absolute;
  z-index: 5;
  pointer-events: none;
  left: 50%;
  top: 50%;  /* CHANGED from 42% - closer to player perspective */
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  gap: 6px;
}
.pkr-board .board-title{
  font-weight:800; color:var(--muted);
  text-transform:uppercase; letter-spacing:.06em;
}
.board-cards{ display:flex; gap:6px; min-height:200px; }
.board-cards .card{
  width:clamp(86px, 8.64vh, 125px); 
  height:clamp(120px, 12vh, 173px); 
  border-radius:8px;
  border:1px solid var(--panel-3); 
  display:grid; 
  place-items:center;
  font-weight:900; 
  background:rgba(0,0,0,.35);
}

/* CHANGE 2: Pot Position - Move down with board */
.pkr-pots{
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 60%;  /* CHANGED from 58% - below board */
  transform: translate(-50%, -50%);
  display: flex;
  gap: 10px;
  justify-content: center;
}
.pkr-pot{
  padding:6px 10px; border:1px solid var(--panel-2);
  border-radius:8px; background:var(--panel); font-weight:700;
}

/* ---------- Seats layer (fills felt) ---------- */
.pkr-seats #pkrSeats{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
}
.pkr-seat{
  position:absolute; width:clamp(180px, 16vh, 220px); height:clamp(90px, 6vh, 94px);
  display:grid; grid-template-columns:56px 1fr; gap:8px; align-items:center;
  padding:8px 12px; border:1px solid var(--panel-2); border-radius:12px;
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.pkr-seat .ava{
  width:56px; height:56px; border-radius:10px;
  border:1px solid var(--panel-3); overflow:hidden; background:var(--panel-2);
}
.pkr-seat .ava img{ width:100%; height:100%; object-fit:contain; }
.pkr-seat .info{ display:grid; gap:2px; min-width:0; }
.pkr-seat .name{ font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pkr-seat .stack{ font-size:14px; color:var(--muted); letter-spacing:0.06em; font-weight: 900; }
.pkr-seat .badges{ display:flex; gap:6px; align-items:center; }
.pkr-badge{ font-size:10px; padding:2px 6px; border:1px solid var(--panel-2); border-radius:999px; color:var(--muted); }
.pkr-seat.dc .name{ text-decoration:wavy underline; opacity:.8; }

/* To-act pulse */
.pkr-seat.toact{
  box-shadow:0 0 0 2px var(--accent) inset, 0 0 0 0 rgba(255,255,255,.2);
  animation:pkrPulse 1.2s ease-out infinite;
}
@keyframes pkrPulse{
  0%{   box-shadow:0 0 0 2px var(--accent) inset, 0 0 0 0 rgba(255,255,255,.20); }
  70%{  box-shadow:0 0 0 2px var(--accent) inset, 0 0 0 12px rgba(255,255,255,0); }
  100%{ box-shadow:0 0 0 2px var(--accent) inset, 0 0 0 0 rgba(255,255,255,0); }
}

/* Enhanced timer with circular progress */
.pkr-timer {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.pkr-timer-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* Start at top */
}

.pkr-timer-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2;
}

.pkr-timer-circle-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  /* Remove smooth transition - update instantly with the number */
  transition: none;
}

.pkr-timer-circle-progress.warning {
  stroke: #f39c12;
}

.pkr-timer-circle-progress.critical {
  stroke: #e74c3c;
  animation: timerPulse 0.5s ease-in-out infinite;
}

.pkr-timer-number {
  position: relative;
  z-index: 1;
  color: #fff;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Your hole cards overlay inside your seat */
.pkr-hole{
  position: absolute;
  left: 50%;
  top: calc(-8px - clamp(101px, 10.2vh, 144px));
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.pkr-hole .card.hole{
  width: clamp(72px, 6.96vh, 98px);
  height: clamp(101px, 10.2vh, 144px);
  border-radius: 6px;
  border: 1px solid var(--panel-3);
  background: rgba(0,0,0,.5);
  display: grid;
  place-items: center;
  font-weight: 900;
}

/* ---------- Actions bar ---------- */
.pkr-actions{
  position:sticky;
  bottom:0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap:8px;
  margin-top:0;
}

.pkr-actions .bet-wrap{ 
  display:flex; 
  gap:8px; 
  align-items:center;
  justify-content: center;
  flex-wrap: wrap;
}

.pkr-actions .btn:disabled{ opacity:.55; cursor:not-allowed; }

.pkr-actions .bet-quick {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.pkr-actions .meta {
  text-align: center;
}

/* Toggles positioned on the right */
.pkr-actions .pkr-row.toggles {
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.3rem 0.3rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-2);
  margin: 0;
}

/* Leave button (top-right) */
.pkr-leave{
  position:relative; z-index:15;
  right:0px;
  padding:4px 8px; border-radius:10px;
  backdrop-filter:blur(6px);
  font-weight:700;
  align-content: center;
  text-size-adjust: auto;
}

/* ---------- Fullscreen "joined" mode ---------- */
#play.play-joined .toolbar{ display:none !important; }
.pkr-root.joined .pkr-head{ display:flex !important; }

.pkr-root.joined{
  grid-template-columns:1fr;
}
.pkr-root.joined .pkr-lobby{ display:none !important; }

.pkr-root.joined #pkrSeats{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
  overflow:visible;
}

/* Bottom-right hole-card dock */
.pkr-hole-dock{
  position:absolute;
  right:20px;
  bottom:20px;
  display:flex; gap:8px;
  z-index:7;
  pointer-events:none;
}

.pkr-hole-dock .card{
  width:clamp(67px, 7.44vh, 106px);
  height:clamp(94px, 10.56vh, 151px);
  border-radius:10px;
  border:1px solid var(--panel-3);
  background:rgba(0,0,0,.55);
  display:grid; 
  place-items:center; 
  font-weight:900;
}

/* ---------- Play wrapper ---------- */
.view#play { display:none; }
.view#play.active {
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

#pkrplaytable{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
  overflow:hidden;
}

.pkr-root { flex:1 1 auto; min-height:0; display:grid; grid-template-columns:1fr; gap:14px; }

#pkrplaytable { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow:hidden; }

.pkr-actions.footer-bar .bet-wrap { display:flex; gap:8px; align-items:center; }

/* Progressive enhancement: ensure full-height viewport on mobile browsers with dynamic bars */
@supports (height: 100dvh) {
  .viewport { min-height: calc(100dvh - 76px - 24px); }
}

#pkrActions .bet-wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#pkrActions .bet-quick { display: flex; gap: 6px; flex-wrap: wrap; }
#pkrActions .bet-quick .btn.ghost { opacity: .85; }
#pkrActions .bet-quick .btn.ghost:disabled { opacity: .4; cursor: not-allowed; }

/* Showdown reveal cards for others */
.pkr-hole.reveal { display: flex; margin-top: 6px; justify-content: center; }
.pkr-hole.reveal .card { transform: scale(.98); opacity: .95; }

/* Winner highlight */
.pkr-seat.pkr-winner { box-shadow: 0 0 0 2px rgba(255,215,0,.7); border-radius: 12px; }
.pkr-seat .win { margin-top: 6px; font-weight: 600; }

/* Best hand label */
.pkr-seat .best { margin-top: 14px; font-size: 12px; opacity: .75; transform: translateX(-90px); width: 98px; text-align: end;}

/* === Poker visibility guard: hide poker UI unless Play is active === */
body:not([data-view="play"]) #play,
body:not([data-view="play"]) .pkr-root,
body:not([data-view="play"]) #pkrplaytable,
body:not([data-view="play"]) #pkrTable,
body:not([data-view="play"]) #pkrLobby,
body:not([data-view="play"]) #pkrActions,
body:not([data-view="play"]) .pkr-felt,
body:not([data-view="play"]) #pkrSeats {
  display: none !important;
  visibility: hidden !important;
}

.card-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1000px;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card.flipped .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-flip-front {
  transform: rotateY(0deg);
}

.card-flip-back {
  transform: rotateY(180deg);
}

.pkr-hand-eval {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 26, 46, 0.95);
  border: 2px solid rgba(255, 184, 74, 0.5);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 200px;
  text-align: center;
  z-index: 150;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.pkr-hand-eval.evaluated {
  opacity: 0.7;
}

.pkr-hand-eval.current-highlight {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 184, 74, 0.6);
  animation: handPulse 0.8s ease-in-out;
}

.pkr-seat.evaluating {
  transform: translate(-50%, -50%) scale(1.05);
  transition: transform 0.3s ease;
  z-index: 100;
}

.pkr-seat.evaluating .ava {
  box-shadow: 0 0 30px rgba(255, 184, 74, 0.8);
}

.hand-name {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  margin-bottom: 6px;
}

.hand-cards {
  display: flex;
  gap: 4px;
  justify-content: center;
  font-size: 12px;
  color: #aaa;
}

.mini-card {
  font-family: monospace;
  font-weight: 600;
}

.card.best-hand-eval {
  position: relative;
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.card.best-hand-eval::before {
  content: '';
  position: absolute;
  inset: -3px;
  border: 3px solid #f39c12;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(243, 156, 18, 0.8), inset 0 0 15px rgba(243, 156, 18, 0.3);
  pointer-events: none;
  z-index: 10;
}

.card.pot-winner {
  position: relative;
  transform: scale(1.08);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card.pot-winner::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 10;
  padding: 4px;
  background: var(--pot-gradient, linear-gradient(135deg, #ffd700 0%, #ffd700 100%));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: winnerBorderPulse 1.8s ease-in-out infinite;
}

.card.pot-winner::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 9;
  background: var(--pot-gradient, linear-gradient(135deg, #ffd700 0%, #ffd700 100%));
  opacity: 0.15;
  filter: blur(6px);
  animation: winnerGlowPulse 2.2s ease-in-out infinite;
}

@keyframes winnerBorderPulse {
  0%, 100% { 
    box-shadow: 
      0 0 12px var(--pot-glow, rgba(255, 215, 0, 0.6)),
      0 0 20px var(--pot-glow-mid, rgba(255, 215, 0, 0.4)),
      inset 0 0 8px var(--pot-glow-inner, rgba(255, 215, 0, 0.15));
    filter: brightness(1) hue-rotate(0deg);
  }
  50% { 
    box-shadow: 
      0 0 16px var(--pot-glow, rgba(255, 215, 0, 0.7)),
      0 0 28px var(--pot-glow-mid, rgba(255, 215, 0, 0.5)),
      inset 0 0 12px var(--pot-glow-inner, rgba(255, 215, 0, 0.2));
    filter: brightness(1.05) hue-rotate(0deg);
  }
}

@keyframes winnerGlowPulse {
  0%, 100% { 
    opacity: 0.15;
    transform: scale(1);
  }
  50% { 
    opacity: 0.25;
    transform: scale(1.1);
  }
}

@keyframes handPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}

.pkr-pot {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(16, 21, 62, 0.95) 100%);
  border: 2px solid;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.pkr-pot.gold {
  border-color: #ffd700;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.pkr-pot.silver {
  border-color: #c0c0c0;
  color: #c0c0c0;
  text-shadow: 0 0 8px rgba(192, 192, 192, 0.4);
}

.pkr-pot.bronze {
  border-color: #cd7f32;
  color: #cd7f32;
  text-shadow: 0 0 8px rgba(205, 127, 50, 0.4);
}

.pkr-pot-animated {
  position: fixed;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(16, 21, 62, 0.95) 100%);
  border: 2px solid;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 300;
  pointer-events: none;
}

.pkr-pot-animated.gold {
  border-color: #ffd700;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.pkr-pot-animated.silver {
  border-color: #c0c0c0;
  color: #c0c0c0;
  text-shadow: 0 0 8px rgba(192, 192, 192, 0.4);
}

.pkr-pot-animated.bronze {
  border-color: #cd7f32;
  color: #cd7f32;
  text-shadow: 0 0 8px rgba(205, 127, 50, 0.4);
}

.pkr-toggles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-bottom: 12px;
}

.pkr-setting-row {
  display: flex;
  align-items: center;
}

.pkr-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s;
  user-select: none;
}

.pkr-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pkr-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.pkr-checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pkr-checkbox-text strong {
  font-size: 14px;
  color: #fff;
}

.pkr-checkbox-text small {
  font-size: 11px;
  color: #aaa;
  line-height: 1.3;
}

.pkr-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 13px;
  color: #fff;
}

.pkr-toggle-label:hover {
  background: rgba(255, 255, 255, 0.15);
}

.pkr-toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Responsive seat sizing */
@media (max-width: 1400px) {
  .pkr-seat {
    width: 200px;
    height: 80px;
  }
  .pkr-seat .ava {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 1000px) {
  .pkr-seat {
    width: 180px;
    height: 72px;
  }
  .pkr-seat .ava {
    width: 42px;
    height: 42px;
  }
  .pkr-seat .name {
    font-size: 13px;
  }
  .pkr-seat .stack {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .pkr-seat {
    width: 160px;
    height: 68px;
  }
  .pkr-seat .ava {
    width: 38px;
    height: 38px;
  }
}

/* =======================================================
   NEW LOBBY V2 INTERFACE
   ======================================================= */

.pkr-lobby-v2 {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  margin: 0px;
  padding: 12px 10px;
}

.panel.pkr-lobby-v2 {
  height: auto;
  min-height: fit-content;
}

/* Queue Status Banner */
.pkr-queue-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--panel) 0%, rgba(229, 140, 44, 0.1) 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.pkr-queue-status.in-queue {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.15) 0%, rgba(39, 174, 96, 0.1) 100%);
  border-color: rgba(46, 204, 113, 0.4);
  animation: queuePulse 2s ease-in-out infinite;
}

@keyframes queuePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
}

.status-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.status-text {
  flex: 1;
}

.status-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.status-subtitle {
  font-size: 14px;
  color: var(--muted);
}

/* Section Styling */
.pkr-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.3s ease;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.section-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Blind Level Grid */
.pkr-blind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.blind-card {
  position: relative;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.blind-card:hover {
  border-color: rgba(255, 184, 74, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.blind-card.active {
  background: linear-gradient(135deg, rgba(255, 184, 74, 0.2) 0%, rgba(229, 140, 44, 0.15) 100%);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 184, 74, 0.2);
}

.blind-card.active::before {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #0b0d11;
}

.blind-stakes {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.blind-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.blind-range {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Buy-in Control */
.pkr-buyin-control {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.buyin-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.buyin-icon {
  font-size: 28px;
}

.buyin-amount {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.pkr-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.pkr-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 184, 74, 0.4);
  transition: all 0.2s ease;
}

.pkr-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 184, 74, 0.6);
}

.pkr-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(255, 184, 74, 0.4);
  transition: all 0.2s ease;
}

.pkr-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 184, 74, 0.6);
}

.pkr-slider:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.buyin-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* Timer Buttons */
.pkr-timer-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.timer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: inherit;
}

.timer-btn:hover {
  border-color: rgba(255, 184, 74, 0.5);
  transform: translateY(-2px);
}

.timer-btn.active {
  background: linear-gradient(135deg, rgba(255, 184, 74, 0.2) 0%, rgba(229, 140, 44, 0.15) 100%);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 184, 74, 0.2);
}

.timer-value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.timer-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Queue Action Buttons */
.pkr-queue-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-queue {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-queue.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0d11;
  
  border: 1px solid #0b0d11;
}

.btn-queue.primary:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn-queue.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-queue.danger {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.15) 100%);
  color: #e74c3c;
  border: 2px solid rgba(231, 76, 60, 0.4);
}

.btn-queue.danger:hover {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.3) 0%, rgba(192, 57, 43, 0.25) 100%);
  border-color: #e74c3c;
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 18px;
  line-height: 1;
}

.btn-text {
  line-height: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pkr-blind-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .buyin-amount {
    font-size: 28px;
  }
  
  .pkr-timer-buttons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .pkr-lobby-v2 {
    padding: 12px 10px;
    gap: 20px;
  }
  
  .pkr-blind-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .blind-stakes {
    font-size: 18px;
  }
  
  .pkr-queue-actions {
    flex-direction: column;
  }
}

/* Bet badge on seats */
.pkr-bet-badge {
  position: absolute;
  top: -24px;
  left: 0px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(16, 21, 62, 0.95) 100%);
  border: 2px solid;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  z-index: 10;
}

@keyframes betBadgeAppear {
  0% {
    transform: scale(0) translateY(10px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Bet badge on seats */
.pkr-bet-badge {
  position: absolute;
  top: -24px;
  left: 0px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(16, 21, 62, 0.95) 100%);
  border: 2px solid;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  z-index: 10;
}

.pkr-bet-badge.animating {
  /* Used during animation to pots */
  pointer-events: none;
}

.pkr-bet-badge.gold {
  border-color: #ffd700;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
}

.pkr-bet-badge.silver {
  border-color: #c0c0c0;
  color: #c0c0c0;
  text-shadow: 0 0 6px rgba(192, 192, 192, 0.4);
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(192, 192, 192, 0.1) 100%);
}

.pkr-bet-badge.bronze {
  border-color: #cd7f32;
  color: #cd7f32;
  text-shadow: 0 0 6px rgba(205, 127, 50, 0.4);
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(205, 127, 50, 0.1) 100%);
}

/* Animation when bet is placed */
.pkr-bet-badge:not(.animating) {
  animation: betBadgeAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes betBadgeAppear {
  0% {
    transform: scale(0) translateY(10px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Hover effect for clickable names */
.pkr-seat .info .name[style*="cursor: pointer"]:hover {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.2s ease;
}

/* Optional: Add a subtle glow effect on avatar hover */
.ava[style*="cursor: pointer"]:hover {
  border-radius: inherit;
  border: 2px solid var(--accent);
}

/* Bet badge positioned using coordinate map */
.pkr-bet-badge {
  position: absolute;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(16, 21, 62, 0.95) 100%);
  border: 2px solid;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 15;
  pointer-events: none;
}

.pkr-bet-badge.animating {
  /* Used during animation to pots */
  pointer-events: none;
}

.pkr-bet-badge.gold {
  border-color: #ffd700;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
}

.pkr-bet-badge.silver {
  border-color: #c0c0c0;
  color: #c0c0c0;
  text-shadow: 0 0 6px rgba(192, 192, 192, 0.4);
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(192, 192, 192, 0.1) 100%);
}

.pkr-bet-badge.bronze {
  border-color: #cd7f32;
  color: #cd7f32;
  text-shadow: 0 0 6px rgba(205, 127, 50, 0.4);
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(205, 127, 50, 0.1) 100%);
}

/* Animation when bet is placed */
.pkr-bet-badge:not(.animating) {
  animation: betBadgeAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes betBadgeAppear {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

#helperValidationCommit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

#helperValidationCommit .commit-hash {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

#helperValidationCommit .commit-copy {
  background: transparent;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  color: var(--text-secondary, #888);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#helperValidationCommit .commit-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent, #ffb84a);
}

#helperValidationCommit .commit-copy:active {
  transform: scale(0.95);
}

#helperValidationCommit .commit-copy svg {
  width: 14px;
  height: 14px;
}

/* Own seat: compact horizontal layout */
.pkr-own-seat {
  width: clamp(340px, 17vw, 380px);
  height: 42px;
  grid-template-columns: 34px 1fr;
  gap: 0px;
  align-items: center;
  padding: 4px 4px;
  overflow: visible;
  position: relative;
}

/* Folded own cards styling */
.pkr-hole.folded {
  opacity: 0.7;
}

.pkr-hole.folded .card.hole {
  position: relative;
  filter: grayscale(0.8) brightness(0.7);
  opacity: 0.85;
}
/*
.pkr-hole.folded .card.hole::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.3) 0px,
    rgba(0, 0, 0, 0.3) 4px,
    transparent 4px,
    transparent 8px
  );
  border-radius: 6px;
  pointer-events: none;
  z-index: 10;
}*/

.pkr-hole.folded::after {
  content: 'FOLDED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 18px;
  font-weight: 900;
  color: rgba(231, 76, 60, 0.9);
  text-shadow: 
    0 0 4px rgba(0, 0, 0, 0.8),
    0 0 8px rgba(0, 0, 0, 0.6);
  letter-spacing: 1px;
  z-index: 11;
  pointer-events: none;
}

/* Remove cursor pointer from folded cards */
.pkr-hole.folded .card.hole {
  cursor: default !important;
}
/*

@keyframes foldCards {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1); opacity: 0.85; }
}

.pkr-hole.folded .card.hole {
  animation: foldCards 0.4s ease-out;
}
*/
.pkr-own-seat .ava {
  width: 30px;
  height: 30px;
  /* margin-top: -40px;  Stick up above the bar */
  border: 2px solid var(--panel-2);
}

.pkr-own-seat .info .name {
  display: none;
}

.pkr-own-seat .info {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
}

/* Best hand label styling for own seat - left side */
.pkr-own-seat .best {
  font-size: 11px;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  text-align: left;
  margin: 0;
  transform: none;
}

/* Stack - absolutely centered in entire seat */
.pkr-own-seat .stack {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 16px;
  white-space: nowrap;
  margin: 0;
  z-index: 1;
}

/* Badges - right side, before timer */
.pkr-own-seat .badges {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}

/* Timer - at the very end, inline */
.pkr-own-seat .pkr-timer {
  position: relative;
  right: auto;
  top: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

.pkr-own-hole .card.hole {
  width: clamp(81px, 7.83vh, 111px);
  height: clamp(113px, 11.48vh, 162px);
}

/* Adjust hole card position for compact seat */
.pkr-own-hole {
  top: calc(-8px - clamp(113px, 11.48vh, 162px));
}

.pkr-root.panel {
  border: 0px;
  border-radius: 0px;
  background: rgba(0, 0, 0, 0)
}