/* ==========================================================================
   ANDAR BAHAR - AUTHENTIC 2-ROUND CASINO TABLE STYLES
   1:1 Matched to Reference Video (WhatsApp Video 2026-10-15 at 9.16.11 PM.mp4)
   Features:
   - Ultra-HD, Crystal-Clear Casino Bet Tokens (Chips 1, 2, 5, 10, 20, 50, 100)
   - Seamlessly Seated Indian Dealer Lady on High-Back Luxury Executive Chair
   - 100% Fully Mobile-Responsive Architecture (Desktop, Landscape & Portrait)
   - Rock-Solid Anchored Player Seats Around Table Rim
   ========================================================================== */

#screenAndarBahar {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: radial-gradient(circle at center, #3d0714 0%, #20020a 50%, #0d0004 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px clamp(4px, 1.5vw, 14px);
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow: hidden;
  position: relative;
  font-family: 'Outfit', sans-serif;
}

/* Background Damask Pattern Overlay */
#screenAndarBahar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(#600c1e 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.28;
  pointer-events: none;
}

/* ==========================================================================
   TOP BAR: Menu, Round Counter, Status Plaque, Ruler (i), Chat
   ========================================================================== */
.ab-top-bar {
  width: 100%;
  max-width: 920px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px;
  box-sizing: border-box;
  position: relative;
  z-index: 30;
  flex-shrink: 0;
}

.ab-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ab-menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(18, 12, 24, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
  transition: transform 0.15s;
}

.ab-menu-btn:active {
  transform: scale(0.92);
}

.ab-menu-icon {
  display: grid;
  grid-template-columns: repeat(2, 5px);
  gap: 2.5px;
}

.ab-menu-dot {
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 1px;
}

.ab-menu-label {
  font-size: 7.5px;
  color: #e2e8f0;
  font-weight: 700;
  text-transform: uppercase;
}

.ab-round-counter {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: clamp(13px, 1.8vw, 16px);
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

/* Center Floating Status Plaque */
.ab-status-plaque {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 4px;
  background: linear-gradient(180deg, rgba(30, 10, 20, 0.95) 0%, rgba(10, 2, 6, 0.98) 100%);
  border: 1.5px solid #ca8a04;
  border-radius: 18px;
  padding: 3px clamp(12px, 2.5vw, 24px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.8), 0 0 10px rgba(234, 179, 8, 0.35);
  z-index: 25;
}

.ab-status-title {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: clamp(12px, 1.8vw, 15px);
  color: #fef08a;
  letter-spacing: 1px;
  white-space: nowrap;
  text-shadow: 0 2px 4px #000;
}

.ab-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ab-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(18, 12, 24, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
  transition: transform 0.15s;
}

.ab-icon-btn:active {
  transform: scale(0.92);
}

.ab-icon-btn span:last-child {
  font-size: 7px;
  color: #cbd5e1;
  text-transform: uppercase;
  margin-top: -2px;
}

/* ==========================================================================
   CASINO TABLE ARENA (Semi-Circular Azure Felt Table & Seated Dealer)
   ========================================================================== */
.ab-table-container {
  width: 100%;
  max-width: 900px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
  margin-top: clamp(28px, 5vh, 48px);
}

/* Stage Wrapper holding Dealer & Table Felt with Proper Stacking Order */
.ab-table-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: min(96vw, 860px);
}

/* Semi-Circular Azure Blue Felt Table */
.ab-table-felt {
  width: 100%;
  height: clamp(240px, 46vh, 330px);
  background: radial-gradient(ellipse at 50% 25%, #0099cc 0%, #0077aa 40%, #004c70 70%, #00334d 100%);
  border-top-left-radius: 36px;
  border-top-right-radius: 36px;
  border-bottom-left-radius: clamp(240px, 45vw, 380px) clamp(170px, 30vh, 230px);
  border-bottom-right-radius: clamp(240px, 45vw, 380px) clamp(170px, 30vh, 230px);
  border: clamp(6px, 1vw, 10px) solid #7c3a06;
  outline: 3px solid #facc15;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), inset 0 0 35px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: visible;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-sizing: border-box;
  padding: clamp(8px, 1.8vh, 16px) clamp(12px, 3vw, 32px);
}

/* 3D Indian Dealer Lady Seated On Executive Chair Behind Table */
.ab-dealer-wrap {
  position: absolute;
  bottom: calc(100% - 28px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(150px, 22vw, 215px);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

.ab-dealer-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.9));
}

/* Spotlights on Andar & Bahar */
.ab-spotlight-left,
.ab-spotlight-right {
  position: absolute;
  top: 0;
  width: clamp(100px, 20vw, 160px);
  height: 100%;
  background: radial-gradient(ellipse at 50% 20%, rgba(254, 240, 138, 0.22) 0%, rgba(234, 179, 8, 0.08) 50%, transparent 80%);
  pointer-events: none;
  z-index: 6;
}
.ab-spotlight-left { left: 8%; }
.ab-spotlight-right { right: 8%; }

/* Table Zones: ANDAR (Left), JOKER (Center), BAHAR (Right) */
.ab-zone-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 12;
  transition: transform 0.15s;
}

.ab-zone-box:active {
  transform: scale(0.97);
}

.ab-zone-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.ab-zone-letter-badge {
  width: clamp(22px, 3vw, 26px);
  height: clamp(22px, 3vw, 26px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: clamp(13px, 1.8vw, 15px);
  color: #ffffff;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.badge-andar { background: #ca8a04; }
.badge-bahar { background: #dc2626; }

.ab-zone-title-text {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(15px, 2.2vw, 19px);
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.7);
}

.ab-zone-multiplier {
  font-family: 'Cinzel', 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(17px, 2.5vw, 22px);
  color: #facc15;
  text-shadow: 0 0 10px #ca8a04, 0 2px 4px #000;
  letter-spacing: 0.5px;
}

/* Card Slots on Table */
.ab-card-slot {
  width: clamp(52px, 7.5vw, 68px);
  height: clamp(74px, 12vh, 96px);
  border: 1.5px dashed rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(0, 0, 0, 0.15);
}

/* Center Joker Card Box */
.ab-joker-center-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 14;
}

.ab-joker-label {
  font-size: clamp(10px, 1.4vw, 12px);
  font-weight: 800;
  color: #fde047;
  letter-spacing: 1px;
  margin-bottom: 2px;
  text-shadow: 0 1px 3px #000;
}

/* Table Total Bet Bars (Center & Sides) */
.ab-table-bet-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 5, 16, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 2px clamp(8px, 1vw, 12px);
  margin-top: 6px;
  min-width: clamp(56px, 8vw, 70px);
  justify-content: space-between;
}

.ab-bet-subpill {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
}

.ab-bet-subpill.pill-a { background: #16a34a; }
.ab-bet-subpill.pill-b { background: #dc2626; }

.ab-table-bet-val {
  font-size: clamp(12px, 1.6vw, 14px);
  font-weight: 800;
  color: #ffffff;
}

/* ==========================================================================
   CARDS RENDERING (Playing Card Face & Glow)
   ========================================================================== */
.ab-playing-card {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 6px;
  box-sizing: border-box;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ab-playing-card.red { color: #dc2626; }
.ab-playing-card.black { color: #0f172a; }

.ab-card-corner-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(11px, 1.6vw, 14px);
}

.ab-card-center-suit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(20px, 3.2vw, 28px);
}

/* Glowing Border for Winning Card and Joker Match */
.ab-playing-card.card-winner-glow {
  box-shadow: 0 0 16px #facc15, 0 0 30px #eab308;
  outline: 3px solid #facc15;
  animation: cardWinPulse 0.8s infinite alternate ease-in-out;
  z-index: 20;
}

@keyframes cardWinPulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.08); filter: brightness(1.2); }
}

/* Flying Card from Dealer */
.ab-flying-card {
  position: absolute;
  width: clamp(48px, 7vw, 62px);
  height: clamp(68px, 10vh, 88px);
  background: radial-gradient(circle, #b91c1c 20%, #7f1d1d 80%);
  border: 2px solid #ffffff;
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.7);
  pointer-events: none;
  z-index: 50;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   5 MULTIPLAYER SEATS ANCHORED AROUND TABLE RIM
   ========================================================================== */
.ab-players-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
}

.ab-player-seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

/* Exact Rim Coordinates locked to Felt Shape */
#screenAndarBahar .seat-0 { left: clamp(-20px, -2.5vw, -10px); top: 52%; transform: translateY(-50%); }    /* GAJJU (left rim) */
#screenAndarBahar .seat-1 { left: clamp(16%, 20vw, 22%); bottom: clamp(-20px, -2.5vh, -12px); }          /* SRJ (lower left rim) */
#screenAndarBahar .seat-2 { left: 50%; bottom: clamp(-28px, -3.5vh, -18px); transform: translateX(-50%); } /* MAIN USER (center bottom) */
#screenAndarBahar .seat-3 { right: clamp(16%, 20vw, 22%); bottom: clamp(-20px, -2.5vh, -12px); }         /* Manish sain (lower right rim) */
#screenAndarBahar .seat-4 { right: clamp(-20px, -2.5vw, -10px); top: 52%; transform: translateY(-50%); }   /* guest329844 (right rim) */

/* Player Avatar Box */
.ab-seat-avatar-wrap {
  width: clamp(46px, 6vw, 58px);
  height: clamp(46px, 6vw, 58px);
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ab-seat-avatar-img {
  width: clamp(42px, 5.2vw, 52px);
  height: clamp(42px, 5.2vw, 52px);
  border-radius: 50%;
  border: 2px solid #ffffff;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.8);
  background: #1a0f2e;
}

/* Neon Green Circular Countdown Progress Ring */
.ab-seat-timer-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.ab-timer-circle {
  fill: none;
  stroke: #4ade80;
  stroke-width: 4;
  stroke-dasharray: 150;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px #22c55e);
  transition: stroke-dashoffset 0.1s linear;
}

/* Player Bet Indicators Above Avatar */
.ab-seat-bets {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 2px;
  align-items: center;
}

.ab-seat-bet-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  padding: 1px 8px;
  min-width: 44px;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.ab-seat-bet-bar.bar-a { background: #16a34a; }
.ab-seat-bet-bar.bar-b { background: #dc2626; }

.ab-seat-side-tag {
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 8px;
  margin-top: 2px;
  text-shadow: 0 1px 2px #000;
}
.ab-seat-side-tag.tag-andar { background: #16a34a; color: #ffffff; }
.ab-seat-side-tag.tag-bahar { background: #dc2626; color: #ffffff; }

.ab-seat-name {
  font-size: clamp(10px, 1.4vw, 12px);
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px #000, 0 2px 4px #000;
  margin-top: 2px;
  max-width: clamp(55px, 8vw, 75px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* Main User Balance Pill Underneath Avatar */
.ab-user-balance-pill {
  display: flex;
  align-items: center;
  background: rgba(14, 8, 22, 0.95);
  border: 1.5px solid #ca8a04;
  border-radius: 18px;
  padding: 2px clamp(8px, 1.5vw, 12px) 2px 5px;
  margin-top: 3px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.85);
  cursor: pointer;
  white-space: nowrap;
  z-index: 30;
}

.ab-user-coin-icon {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #fef08a 20%, #eab308 60%, #854d0e 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #582b02;
  margin-right: 5px;
  border: 1px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.ab-user-balance-text {
  font-weight: 900;
  font-size: clamp(12px, 1.6vw, 14px);
  color: #ffffff;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   WINNER PRESENTATION: Sunburst Medallion & Rays (Matched to Frame 029 & 064)
   ========================================================================== */
.ab-winner-medallion {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: radial-gradient(circle, #ffd700 0%, #b45309 60%, #78350f 100%);
  border: 2px solid #fef08a;
  border-radius: 16px;
  padding: 3px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 20px #facc15, 0 4px 10px rgba(0,0,0,0.8);
  z-index: 30;
  pointer-events: none;
}

.ab-winner-medallion.active {
  animation: winnerSunburst 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes winnerSunburst {
  0% { transform: translateX(-50%) scale(0.2); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.ab-winner-tag {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 11px;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px #000;
}

.ab-winner-amt {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 16px;
  color: #ffffff;
  text-shadow: 0 2px 4px #000, 0 0 8px #fef08a;
}

/* Winner Avatar Radiant Rays */
.ab-seat-avatar-wrap.winner-radiant {
  box-shadow: 0 0 25px #facc15, 0 0 45px #eab308;
  animation: winnerGlow 1s infinite alternate;
}

@keyframes winnerGlow {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

/* ==========================================================================
   BOTTOM CONSOLE: Chips & Action Buttons (Matched to Frame 016)
   ========================================================================== */
.ab-bottom-console {
  width: 100%;
  max-width: 900px;
  background: linear-gradient(180deg, rgba(22, 12, 34, 0.95) 0%, rgba(12, 4, 18, 0.98) 100%);
  border: 1.5px solid rgba(234, 179, 8, 0.45);
  border-radius: 20px;
  padding: clamp(6px, 1.2vh, 10px) clamp(10px, 1.8vw, 18px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 26px rgba(0,0,0,0.85);
  margin-top: clamp(4px, 1vh, 8px);
  z-index: 25;
  flex-shrink: 0;
  gap: 12px;
}

/* Chips Carousel */
.ab-chips-tray {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 14px);
  overflow-x: auto;
  padding: 4px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-width: 0;
}

.ab-chips-tray::-webkit-scrollbar {
  display: none;
}

.ab-chip-btn {
  width: clamp(44px, 4.2vw, 54px);
  height: clamp(44px, 4.2vw, 54px);
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  flex-shrink: 0;
}

.ab-chip-btn:active {
  transform: scale(0.92);
}

.ab-chip-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.7));
  transition: transform 0.18s, filter 0.18s;
  pointer-events: none;
}

.ab-chip-btn.active .ab-chip-img {
  transform: scale(1.22) translateY(-6px);
  filter: drop-shadow(0 0 14px #facc15) drop-shadow(0 0 24px #eab308) drop-shadow(0 8px 16px rgba(0,0,0,0.9));
}

/* Action Buttons: Andar & Bahar */
.ab-actions-group {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 16px);
  flex-shrink: 0;
}

.ab-action-pill-btn {
  min-width: clamp(90px, 9vw, 118px);
  height: clamp(42px, 4.2vw, 50px);
  border-radius: 25px;
  font-family: 'Cinzel', 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(15px, 1.6vw, 18px);
  color: #ffffff;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.7), inset 0 2px 4px rgba(255,255,255,0.7);
  border: 2px solid #ffffff;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
}

.ab-action-pill-btn:active {
  transform: scale(0.94);
}

.ab-btn-andar {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  border-color: #86efac;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.ab-btn-andar:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.6), 0 4px 14px rgba(0,0,0,0.7);
}

.ab-btn-bahar {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  border-color: #fca5a5;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.ab-btn-bahar:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6), 0 4px 14px rgba(0,0,0,0.7);
}

/* ==========================================================================
   RULES ("RULER") MODAL
   ========================================================================== */
.ab-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 12px;
  box-sizing: border-box;
}

.ab-modal-card {
  width: 100%;
  max-width: 500px;
  background: linear-gradient(180deg, #200412 0%, #11010a 100%);
  border: 2px solid #ca8a04;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.9), 0 0 20px rgba(234, 179, 8, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f1f5f9;
}

.ab-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: linear-gradient(90deg, #4a041f 0%, #1f020d 100%);
  border-bottom: 1px solid rgba(234, 179, 8, 0.4);
}

.ab-modal-hdr-title {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 17px;
  color: #fef08a;
  letter-spacing: 1px;
}

.ab-modal-close-x {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.ab-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.ab-rule-item {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #facc15;
  border-radius: 6px;
  padding: 8px 12px;
}

.ab-rule-item strong {
  color: #fde047;
}

/* ==========================================================================
   MOBILE & VIEWPORT RESPONSIVENESS
   ========================================================================== */

/* Landscape Mode for Smartphones & Small Screens */
@media (max-height: 500px) {
  #screenAndarBahar {
    padding: 2px 6px;
  }
  .ab-table-container {
    margin-top: 24px;
  }
  .ab-table-stage {
    width: min(96vw, 860px);
  }
  .ab-dealer-wrap {
    width: 120px;
    bottom: calc(100% - 18px);
  }
  .ab-table-felt {
    width: 100%;
    height: clamp(165px, 48vh, 195px);
    padding: 4px 14px;
    border-width: 6px;
  }
  .ab-card-slot {
    width: 44px;
    height: 62px;
  }
  .ab-playing-card {
    padding: 2px 4px;
  }
  .ab-seat-avatar-wrap {
    width: 40px;
    height: 40px;
  }
  .ab-seat-avatar-img {
    width: 36px;
    height: 36px;
  }
  .ab-bottom-console {
    padding: 4px 8px;
    margin-top: 2px;
  }
  .ab-chip-btn {
    width: 38px;
    height: 38px;
  }
  .ab-action-pill-btn {
    min-width: 76px;
    height: 36px;
    font-size: 13px;
  }
}

/* Mobile Portrait Mode */
@media (max-width: 600px) and (orientation: portrait), (max-width: 520px) {
  .ab-table-container {
    margin-top: 42px;
  }
  .ab-table-stage {
    width: 98vw;
  }
  .ab-table-felt {
    width: 100%;
    height: clamp(230px, 36vh, 280px);
    padding: 8px 10px;
    border-bottom-left-radius: 220px 150px;
    border-bottom-right-radius: 220px 150px;
  }
  .ab-dealer-wrap {
    width: clamp(130px, 34vw, 165px);
    bottom: calc(100% - 24px);
  }
  .ab-card-slot {
    width: 48px;
    height: 70px;
  }
  .ab-zone-title-text {
    font-size: 14px;
    letter-spacing: 1px;
  }
  .ab-zone-multiplier {
    font-size: 16px;
  }
  .ab-table-bet-pill {
    min-width: 46px;
    padding: 1px 6px;
  }
  #screenAndarBahar .seat-0 { left: -10px; }
  #screenAndarBahar .seat-4 { right: -10px; }
  #screenAndarBahar .seat-1 { left: 14%; bottom: -14px; }
  #screenAndarBahar .seat-3 { right: 14%; bottom: -14px; }
  #screenAndarBahar .seat-2 { bottom: -20px; }
  .ab-bottom-console {
    flex-direction: column;
    padding: 6px 10px;
    gap: 8px;
    width: 98vw;
  }
  .ab-chips-tray {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }
  .ab-chip-btn {
    width: 42px;
    height: 42px;
  }
  .ab-actions-group {
    width: 100%;
    display: flex;
    gap: 12px;
  }
  .ab-action-pill-btn {
    flex: 1;
    height: 44px;
    font-size: 16px;
  }
}
