/* momen.evil */
/* 3RB Games Platform - Discord Activity styling */

:root {
  --table-green-deep: #052914;
  --table-green-felt: #0c4d29;
  --gold-accent: #f59e0b;
  --gold-light: #fbbf24;
  --gold-glow: rgba(245, 158, 11, 0.45);
  --leather-rail: #1a120c;
  --text-light: #f9fafb;
  --text-muted: #9ca3af;
  --card-width: 90px;
  --card-height: 135px;
  --tile-width: 54px;
  --tile-height: 108px;
  /* Discord Activities Official Safe Area Insets (Mobile & Desktop) */
  --discord-sait: var(--discord-safe-area-inset-top, env(safe-area-inset-top, 0px));
  --discord-saib: var(--discord-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --discord-sail: var(--discord-safe-area-inset-left, env(safe-area-inset-left, 0px));
  --discord-sair: var(--discord-safe-area-inset-right, env(safe-area-inset-right, 0px));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

/* Sleek Luxury Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 15, 12, 0.75);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d97706, #f59e0b);
  border-radius: 6px;
  border: 1px solid rgba(10, 15, 12, 0.9);
}
::-webkit-scrollbar-thumb:hover {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

body {
  font-family: 'Cairo', 'Readex Pro', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  background: #050403 !important;
  color: var(--text-light);
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  position: fixed !important;
  inset: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* 16:9 Activity container with table background - auto-adapts to Discord iframe */
.app-container {
  width: 100% !important;
  max-width: 100vw !important;
  height: 100% !important;
  max-height: 100dvh !important;
  position: fixed !important;
  inset: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  background: #050403 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

/* Top navigation bar with smooth collapse */
.top-nav {
  position: relative;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 24px;
  background: rgba(8, 8, 12, 0.82) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
}

.top-nav.nav-collapsed {
  transform: translateY(-100%);
  margin-top: -62px;
  opacity: 0;
  pointer-events: none;
}

/* Floating Gold Pull-Down Tab (Roll-up / Roll-down toggle) */
.top-nav-toggle-tab {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  background: linear-gradient(180deg, rgba(20, 32, 24, 0.96), rgba(8, 16, 12, 0.98));
  border: 1.5px solid var(--gold-accent);
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 3px 18px 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold-light);
  font-family: 'Cairo', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.75), 0 0 14px rgba(245, 158, 11, 0.35);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.top-nav-toggle-tab:hover {
  background: linear-gradient(180deg, #f59e0b, #d97706);
  color: #000;
  padding-bottom: 8px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.7);
}

.top-nav-toggle-tab .toggle-tab-icon {
  font-size: 0.75rem;
  transition: transform 0.35s ease;
  display: inline-block;
}

.top-nav.nav-collapsed ~ .top-nav-toggle-tab .toggle-tab-icon {
  transform: rotate(180deg);
}

.top-nav.nav-collapsed ~ .top-nav-toggle-tab {
  top: 0 !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.35), rgba(10, 20, 15, 0.98));
  border-color: #fbbf24;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5);
  animation: tabGlowPulse 2.5s infinite alternate;
}

@keyframes tabGlowPulse {
  0% { box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3); }
  100% { box-shadow: 0 6px 26px rgba(245, 158, 11, 0.7); }
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Master .brand-logo-badge is styled in VIP Brand section with animations */

.brand-title {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  white-space: nowrap !important;
  letter-spacing: 0.2px !important;
}

.status-indicator {
  font-size: 0.85rem;
  color: #10b981;
  font-weight: 600;
  margin-right: 6px;
}

.presence-badge {
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
  border-radius: 9999px !important;
  padding: 2px 10px !important;
  color: #10b981 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.presence-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  box-shadow: 0 0 6px #10b981 !important;
}

.presence-avatar-thumb-wrap {
  display: flex !important;
  align-items: center !important;
}

.presence-top-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  border: 1.5px solid #d4af37 !important;
  object-fit: cover !important;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4) !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: rgba(18, 18, 22, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e5e7eb !important;
  padding: 5px 14px !important;
  border-radius: 9999px !important;
  cursor: pointer;
  font-size: 0.82rem !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: inline-flex;
  align-items: center !important;
  gap: 6px !important;
}

/* Universal guard: inline display none must never be overridden by stylesheet */
[style*="display: none"],
[style*="display:none"],
.icon-btn[style*="display: none"],
.icon-btn[style*="display:none"] {
  display: none !important;
}

.icon-btn:hover {
  background: rgba(212, 175, 55, 0.18) !important;
  border-color: rgba(212, 175, 55, 0.5) !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3) !important;
}

/* Lobby View */
.lobby-view {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 20px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b rgba(10, 15, 12, 0.75);
}

.lobby-hero {
  text-align: center;
  margin-top: 2px;
  margin-bottom: 14px;
}

.royal-crest-badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 2px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.lobby-hero h1 {
  font-size: 1.85rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff, #fef08a, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.lobby-hero p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.games-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
}

.game-card {
  flex: 1;
  background: rgba(12, 22, 16, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold-accent);
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.3);
}

.card-cover-wrapper {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
}

.card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover .card-cover-img {
  transform: scale(1.06);
}

.card-cover-img {
  pointer-events: none;
}

.cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(12, 22, 16, 1) 0%, rgba(12, 22, 16, 0.2) 70%);
  pointer-events: none !important;
}

.game-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  pointer-events: none !important;
}

.game-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-card-body h2 {
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 800;
}

.game-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: 'Cairo', sans-serif;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: 'Cairo', sans-serif;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Gameplay Table */
.game-view {
  position: relative;
  z-index: 10;
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 16px 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.game-board-canvas,
#activeGameContainer {
  flex: 1 1 0% !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  overflow: hidden !important;
}

.room-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  min-height: 34px;
  flex-shrink: 0;
}

.room-header-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.room-badge {
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 700;
}

.exit-btn {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.exit-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

.basra-table, .domino-table, .shayeb-table, .kazzab-table, .royal-felt-table {
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 4px 14px 6px !important;
  background: transparent !important;
  border-radius: 0;
  box-shadow: none !important;
  overflow: hidden;
}

/* Seamless Luxury Table Rails (Zero Intrusive Boxes!) */
.table-rail-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 12px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 15;
  width: 100%;
}

.table-rail-area.opponent-rail {
  margin-top: 0 !important;
  padding: 2px 14px !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative;
  min-height: 52px !important;
  max-height: 60px !important;
  z-index: 25;
}

.table-rail-area.opponent-rail .player-floating-tag {
  order: 1;
  padding: 4px 14px;
  font-size: 0.85rem;
  transform: none !important;
}

.table-rail-area.opponent-rail .opponent-cards-fan,
.table-rail-area.opponent-rail .opponent-domino-rack {
  order: 2;
  margin: 0 auto;
  gap: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none !important;
}

.table-rail-area.opponent-rail .opponent-domino-rack .domino-tile {
  width: 28px !important;
  height: 56px !important;
}

.table-rail-area.my-rail {
  margin-bottom: 2px;
  padding: 2px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  position: relative !important;
  min-height: 85px !important;
  width: 100% !important;
}

.table-rail-area.my-rail .player-floating-tag {
  position: absolute !important;
  left: 20px !important;
  right: auto !important;
  bottom: 8px !important;
  z-index: 25 !important;
  width: fit-content !important;
  max-width: 240px !important;
  min-width: 0 !important;
}

[dir="rtl"] .table-rail-area.my-rail .player-floating-tag {
  left: 20px !important;
  right: auto !important;
}

.table-rail-area.my-rail .my-cards-rack,
.table-rail-area.my-rail .domino-hand,
.table-rail-area.my-rail .hand-two-row-rack {
  margin: 0 auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 20 !important;
  max-width: calc(100% - 420px) !important;
  transform: none !important;
}

@media (max-width: 900px) {
  .table-rail-area.my-rail .player-floating-tag {
    position: static !important;
    transform: scale(0.85);
  }
  .table-rail-area.my-rail .my-cards-rack,
  .table-rail-area.my-rail .domino-hand,
  .table-rail-area.my-rail .hand-two-row-rack {
    transform: none !important;
    max-width: 100% !important;
  }
}

/* Floating Glassmorphic Player Pills */
.player-floating-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 22, 16, 0.82);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 36px;
  padding: 6px 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
}

.table-rail-area.active-turn .player-floating-tag {
  border-color: #10b981;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5), 0 0 10px rgba(245, 158, 11, 0.3);
}

.table-rail-area.my-turn-glow .player-floating-tag {
  border-color: var(--gold-accent);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.6);
}

.player-floating-tag .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold-accent);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  object-fit: cover;
}

.player-floating-tag .meta {
  display: flex;
  flex-direction: column;
}

.player-floating-tag .name {
  font-weight: 800;
  font-size: 0.98rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-badge {
  font-size: 0.82rem;
  color: var(--gold-light);
  font-weight: 600;
}

.turn-tag {
  background: #10b981;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.wait-tag {
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* Opponent Hand: Elegant Fanned Arc on Top Rail */
.opponent-cards-fan {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.opponent-cards-fan .card {
  transform: scale(0.50) translateY(-14px);
  margin-left: -38px;
  box-shadow: -3px 5px 12px rgba(0, 0, 0, 0.75);
  transition: transform 0.25s ease;
  transform-origin: top center;
}

.opponent-cards-fan .card.card-pickable-target {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.opponent-cards-fan .card.card-pickable-target:hover {
  transform: scale(0.72) translateY(6px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
  z-index: 20;
}

/* Player Hand: Bottom Rail Rack (Center aligned, dynamic card fan) */
.my-cards-rack {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  min-height: 110px !important;
  padding: 2px 10px !important;
}

.my-cards-rack .card.playable {
  cursor: pointer;
  border: 2px solid transparent;
}

.my-cards-rack .card:hover:not(.card-selected) {
  transform: translateY(-20px) scale(1.08) !important;
  border-color: var(--gold-accent) !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.6) !important;
  z-index: 60 !important;
}

.my-cards-rack .card.card-selected,
.my-cards-rack .card.selected {
  transform: translateY(-24px) scale(1.08) !important;
  border-color: var(--gold-accent) !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.9), 0 0 24px rgba(245, 158, 11, 0.85) !important;
  z-index: 65 !important;
}

/* Table Center: Open Felt directly centered over 3RB Emblem */
.table-center.basra-center,
.table-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 140px;
  margin: auto 0;
  padding: 0;
}

.table-center.kout-center,
.table-center.trix-center,
.table-center.kazzab-center,
.table-center.shayeb-center {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding-top: clamp(24px, 5vh, 60px) !important;
  z-index: 15 !important;
}

.ground-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 760px;
  min-height: 120px;
  max-height: 250px;
  padding: 6px;
  margin: auto;
  background: transparent !important;
  border: none !important;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.ground-area.baloot-ground {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  min-height: 140px !important;
  max-width: 540px !important;
  width: auto !important;
  margin: 0 auto !important;
  position: relative !important;
  z-index: 20 !important;
}

/* Dynamic density scaling for Basra ground cards to keep table neat */
.ground-area.ground-spacious .card {
  width: 84px !important;
  height: 122px !important;
}

.ground-area.ground-compact {
  gap: 10px !important;
  max-width: 700px !important;
}
.ground-area.ground-compact .card {
  width: 72px !important;
  height: 104px !important;
}

.ground-area.ground-dense {
  gap: 6px !important;
  max-width: 640px !important;
}
.ground-area.ground-dense .card {
  width: 62px !important;
  height: 90px !important;
}

.ground-area.ground-fanned {
  gap: 0 !important;
  max-width: 680px !important;
  direction: ltr !important;
}
.ground-area.ground-fanned .card {
  width: 62px !important;
  height: 90px !important;
  margin-left: -22px !important;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.45) !important;
  transition: all 0.25s ease !important;
}
.ground-area.ground-fanned .card:first-child {
  margin-left: 0 !important;
}
.ground-area.ground-fanned .card:hover {
  transform: translateY(-16px) scale(1.15) !important;
  z-index: 35 !important;
}

.empty-ground-hint {
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Card Drop Animation onto Ground */
.card-drop-anim {
  animation: cardDropOntoTable 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes cardDropOntoTable {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(1.15);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Golden capture highlight when cards are about to be gathered */
.card-capture-highlight {
  box-shadow: 0 0 24px #fbbf24, 0 0 38px rgba(245, 158, 11, 0.85), 0 4px 14px rgba(0,0,0,0.6) !important;
  border: 2.5px solid #fef08a !important;
  transform: translateY(-8px) scale(1.08) !important;
  z-index: 30 !important;
  transition: all 0.26s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Realistic Flying Glide to Loot Pile */
.card-captured-to-me {
  transition: transform 0.45s cubic-bezier(0.2, 0.85, 0.4, 1), opacity 0.45s ease, filter 0.45s ease !important;
  transform: translate(-300px, 90px) scale(0.38) rotate(-22deg) !important;
  opacity: 0.2 !important;
  filter: drop-shadow(0 0 18px var(--gold-accent));
  pointer-events: none !important;
  z-index: 99 !important;
}

html[dir="rtl"] .card-captured-to-me {
  transform: translate(-300px, 90px) scale(0.38) rotate(-22deg) !important;
}

.card-captured-to-opp {
  transition: transform 0.45s cubic-bezier(0.2, 0.85, 0.4, 1), opacity 0.45s ease, filter 0.45s ease !important;
  transform: translate(0px, -230px) scale(0.38) rotate(18deg) !important;
  opacity: 0.2 !important;
  filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.8));
  pointer-events: none !important;
  z-index: 99 !important;
}

.card-played-slap-table {
  animation: cardSlapImpact 0.16s ease-out both !important;
  z-index: 25 !important;
  border-color: var(--gold-accent) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8), 0 0 20px var(--gold-accent) !important;
}

@keyframes cardSlapImpact {
  0% {
    transform: translateY(35px) scale(1.22);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0) scale(1.05);
    opacity: 1;
  }
}

/* Card Played Active Click Pop */
.card-played-active {
  transform: translateY(-32px) scale(1.16) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 25px var(--gold-accent) !important;
  transition: all 0.12s ease-out !important;
}

/* Captured Loot Deck (Gathered Cards Pile) & Deck Indicator */
.captured-loot-deck {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.deck-indicator {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.mini-deck {
  width: 50px;
  height: 74px;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
  border: 1.5px solid var(--gold-accent);
  box-shadow: 2px 2px 0 #0f172a, 4px 4px 0 #1e293b, 0 6px 14px rgba(0, 0, 0, 0.75);
  flex-shrink: 0;
}

.mini-deck img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-deck.loot-deck {
  box-shadow: 2px 2px 0 #0f172a, 4px 4px 0 #1e293b, 6px 6px 0 #334155, 0 8px 20px rgba(0, 0, 0, 0.75);
}

.deck-count {
  font-size: 0.76rem;
  font-family: 'Cairo', sans-serif;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.center-pile-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pile-card-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.deck-top-card {
  width: 58px;
  height: 86px;
  border-radius: 7px;
  overflow: hidden;
  border: 1.5px solid var(--gold-accent);
  box-shadow: 2px 2px 0 #0f172a, 4px 4px 0 #1e293b, 0 8px 18px rgba(0, 0, 0, 0.8);
}

.pile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pile-count-badge {
  font-size: 0.75rem;
  font-family: 'Cairo', sans-serif;
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Vector Playing Cards */
.card {
  width: var(--card-width);
  height: var(--card-height);
  background: #ffffff;
  border-radius: 9px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
  will-change: transform;
}

.card-svg-face {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  border-radius: 8px;
  pointer-events: none;
}

.card.playable {
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, outline 0.22s ease;
}

.card.playable:hover {
  transform: translateY(-22px) scale(1.1) rotate(-1deg) !important;
  outline: 2.5px solid var(--gold-accent);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.8), 0 0 24px rgba(245, 158, 11, 0.65), 0 0 8px #fbbf24;
  z-index: 25;
}

.card.playable:active {
  transform: translateY(-10px) scale(1.02) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.9), 0 0 30px var(--gold-light);
  outline-color: #fbbf24;
}

.card-front.red-suit {
  color: #dc2626;
}

.card-front.black-suit {
  color: #111827;
}

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.card-corner.bottom-right {
  transform: rotate(180deg);
}

.card-rank {
  font-weight: 800;
  font-size: 1.15rem;
  font-family: 'Outfit', sans-serif;
}

.card-suit-small {
  font-size: 0.95rem;
}

.card-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-suit-big {
  font-size: 2.2rem;
}

.komi-card {
  border: 2px solid var(--gold-accent);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

.komi-badge {
  font-size: 0.65rem;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
}

/* 3RB Custom card back */
.card-back {
  background: #0d1b2a;
  border: 1px solid var(--gold-accent);
  padding: 0;
  overflow: hidden;
}

.card-back-pattern {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  overflow: hidden;
}

.card-back-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 3D Ivory Domino Tiles */
/* 3D Ivory Domino Tiles */
.domino-tile {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f4f1ea 60%, #e5dfd2 100%);
  border-radius: 8px;
  border: 1.5px solid #dcd6c8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 1px #ffffff, inset 0 -1px 2px #b0a996;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.domino-tile.tile-vertical {
  width: 44px;
  height: 88px;
}

.domino-tile.tile-horizontal {
  width: 88px;
  height: 44px;
}

/* Player hand tiles */
.domino-hand .domino-tile {
  width: 52px;
  height: 104px;
}

.domino-tile.playable-tile {
  cursor: pointer;
  border-color: var(--gold-accent);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.domino-tile.playable-tile:hover {
  transform: translateY(-20px) scale(1.1) !important;
  outline: 2.5px solid var(--gold-accent);
  border-color: #fbbf24 !important;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.85), 0 0 24px rgba(245, 158, 11, 0.7), 0 0 8px #fbbf24 !important;
  z-index: 25;
}

.domino-tile.playable-tile:active {
  transform: translateY(-10px) scale(1.02) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.9), 0 0 32px var(--gold-light) !important;
  outline-color: #fbbf24;
}

.domino-svg-face {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  pointer-events: none;
}

.domino-tile.tile-horizontal .domino-svg-face {
  width: 100%;
  height: 100%;
}

.domino-tile.tile-vertical .domino-svg-face {
  width: 100%;
  height: 100%;
}

.domino-tile.spinner-tile {
  border-color: var(--gold-accent) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.7), 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

.tile-back-design {
  width: 100%;
  height: 100%;
  background: #111827;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tile-brand {
  font-family: 'Outfit', sans-serif;
  color: var(--gold-accent);
  font-weight: 800;
  font-size: 0.8rem;
}

/* Domino board area */
.domino-board-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  position: relative;
  width: 100%;
}

/* Luxury Boneyard Station on Side Flank */
.domino-boneyard-dock {
  position: absolute;
  right: 22px;
  top: 48%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  z-index: 25;
  user-select: none;
}

.boneyard-stack-wrapper {
  position: relative;
  width: 48px;
  height: 84px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.boneyard-stack-wrapper.boneyard-must-draw-pulse {
  animation: boneyardPulse 1.8s infinite ease-in-out;
}

.boneyard-stack-wrapper.boneyard-must-draw-pulse:hover {
  transform: scale(1.08) translateY(-4px);
}

.boneyard-stack-wrapper.boneyard-empty {
  cursor: default;
  opacity: 0.5;
}

.boneyard-stack-tile {
  position: absolute;
  width: 44px;
  height: 80px;
  border-radius: 7px;
  background: #111827;
  border: 1.5px solid var(--gold-accent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.65);
}

.stack-tile-3 {
  top: 6px;
  left: 4px;
  background: #182232;
  border-color: rgba(245, 158, 11, 0.4);
  transform: rotate(4deg);
}

.stack-tile-2 {
  top: 3px;
  left: 2px;
  background: #131c28;
  border-color: rgba(245, 158, 11, 0.6);
  transform: rotate(-2deg);
}

.stack-tile-1 {
  top: 0;
  left: 0;
  background: #0f172a;
  border-color: var(--gold-accent);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.8), 0 0 14px rgba(245, 158, 11, 0.35);
}

.boneyard-stack-empty-slot {
  width: 44px;
  height: 80px;
  border-radius: 7px;
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
}

.boneyard-dock-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(8, 16, 12, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 4px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
}

.boneyard-title-text {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
}

.boneyard-count-pill {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: rgba(245, 158, 11, 0.22);
  padding: 1px 8px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.pass-dock-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  font-size: 0.78rem;
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.pass-dock-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.65);
}

.boneyard-floating-hint {
  position: absolute;
  top: -46px;
  right: 50%;
  transform: translateX(50%);
  background: rgba(220, 38, 38, 0.94);
  color: #fff;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 50;
}

@keyframes boneyardPulse {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.85));
    transform: scale(1.05);
  }
}

/* =========================================================================
   Authentic Egyptian Domino Felt Canvas (Zero Dark Boxes, Zero Scrollbars!)
   ========================================================================= */
.domino-felt-table {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.domino-board-canvas-area {
  flex: 1 1 0% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  padding: 0 12px !important;
}

.domino-snake-viewport {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}

.domino-chain-track {
  position: relative !important;
  display: block !important;
  margin: auto !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Placed domino tiles on green felt surface - Touching end-to-end with 0px gap */
.domino-chain-track .domino-tile {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7) !important;
  border-radius: 4px !important;
  background: transparent !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}

.domino-chain-track .domino-tile .domino-svg-face {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: fill !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  display: block !important;
  pointer-events: none !important;
}

.domino-chain-track .domino-tile.newly-placed-tile {
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.8), 0 4px 12px rgba(0, 0, 0, 0.8) !important;
}

/* Open Ends Interactive Glow Targets directly on the end domino tiles */
.domino-chain-track .domino-tile.chain-end-target {
  cursor: pointer !important;
  box-shadow: 0 0 18px #f59e0b, 0 0 32px rgba(245, 158, 11, 0.9) !important;
  border: 2px solid #fbbf24 !important;
  animation: endTileBeacon 1s infinite alternate ease-in-out !important;
  z-index: 25 !important;
}

.domino-chain-track .domino-tile.chain-end-target:hover,
.domino-chain-track .domino-tile.chain-end-hovered {
  transform: scale(1.08) !important;
  box-shadow: 0 0 24px #10b981, 0 0 38px rgba(16, 185, 129, 0.95) !important;
  border-color: #34d399 !important;
}

/* Floating Branch Chooser Prompt for Domino */
.domino-branch-chooser-prompt {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 20, 16, 0.95);
  border: 2px solid var(--gold-accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 24px rgba(245, 158, 11, 0.5);
  border-radius: 18px;
  padding: 8px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 999;
  user-select: none;
}

.domino-branch-chooser-prompt .chooser-label {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.domino-branch-chooser-prompt .chooser-actions {
  display: flex;
  gap: 12px;
}

.domino-branch-chooser-prompt .branch-btn {
  background: linear-gradient(135deg, #1e3a29, #0f2418);
  border: 1.5px solid #fbbf24;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.domino-branch-chooser-prompt .branch-btn:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.6);
}

/* Forbidden Draw Visual State */
.domino-boneyard-flank-dock.draw-forbidden .boneyard-pile-btn {
  opacity: 0.65;
  filter: grayscale(0.4);
  cursor: not-allowed;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.domino-boneyard-flank-dock.draw-forbidden .pile-title {
  color: #f87171 !important;
}

@keyframes endTileBeacon {
  0% { filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6)); }
  100% { filter: drop-shadow(0 0 16px rgba(245, 158, 11, 1)); }
}

/* Opening double felt center target when 0 tiles on table */
.opening-center-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 32px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(245, 158, 11, 0.5);
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.opening-center-target:hover,
.opening-center-target.can-place-first {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.6);
  transform: scale(1.05);
}

.opening-center-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.opening-center-text {
  font-family: 'Cairo', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

/* =========================================================================
   Central Scattered Domino Pile & Deal Animation (Exact User Drawing)
   ========================================================================= */
.domino-center-shuffled-pile,
#dominoShuffledPile {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@keyframes pileAppearCenter {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.domino-center-shuffled-pile.pile-transition-to-bank {
  transform: translate(280px, -50%) scale(0.2);
  opacity: 0;
}

.shuffled-pile-tile {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 62px;
  margin-top: -31px;
  margin-left: -16px;
  background: linear-gradient(145deg, #ffffff 0%, #f6f3eb 100%);
  border: 1.8px solid #1a2233;
  border-radius: 6px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.12);
  transition: all 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-sizing: border-box;
}

.shuffled-pile-tile::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 14%;
  right: 14%;
  height: 1px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.flying-deal-tile {
  position: fixed !important;
  pointer-events: none !important;
  z-index: 99999 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8) !important;
  will-change: left, top, transform !important;
}

.domino-tile.deal-slotted-tile {
  animation: none !important;
}

.domino-dealing-status-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 24, 16, 0.92);
  border: 1.5px solid var(--gold-accent);
  color: var(--gold-light);
  padding: 6px 18px;
  border-radius: 20px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  z-index: 30;
  white-space: nowrap;
}

.tile-flip-reveal-anim {
  animation: tileFlipReveal 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes tileFlipReveal {
  0% { transform: perspective(600px) rotateY(90deg) scale(0.85); opacity: 0.2; }
  100% { transform: perspective(600px) rotateY(0deg) scale(1); opacity: 1; }
}



/* Player Hand Tile Selection */
.domino-hand .domino-tile.playable-tile.tile-selected-choice {
  transform: translateY(-20px) scale(1.1) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.9), 0 0 28px rgba(245, 158, 11, 0.9) !important;
  z-index: 35 !important;
}

/* Invalid drop tactile snap-back animation */
@keyframes tileSnapBackShake {
  0% { transform: scale(0.95); box-shadow: 0 0 16px rgba(239, 68, 68, 0.8); }
  20% { transform: translateX(-6px) rotate(-3deg); }
  40% { transform: translateX(6px) rotate(3deg); }
  60% { transform: translateX(-3px) rotate(-1deg); }
  80% { transform: translateX(3px) rotate(1deg); }
  100% { transform: translateX(0) scale(1) rotate(0deg); box-shadow: none; }
}

.tile-invalid-snap {
  animation: tileSnapBackShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
  border-color: #ef4444 !important;
}

.chain-drop-slot.slot-invalid-hover {
  border-color: rgba(239, 68, 68, 0.7) !important;
  background: rgba(239, 68, 68, 0.18) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6) !important;
  cursor: not-allowed !important;
}

/* Opponent Domino Face-down Horizontal Rack */
.opponent-domino-rack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.opponent-domino-rack .domino-tile {
  width: 26px !important;
  height: 52px !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
}

.opponent-domino-rack .tile-back-design {
  padding: 2px;
}

.opponent-domino-rack .tile-brand {
  font-size: 0.58rem;
}

/* User Profile Hero Badge in Main Lobby */
.user-hero-profile {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(12, 24, 18, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--gold-accent);
  border-radius: 40px;
  padding: 8px 22px 8px 12px;
  margin-top: 14px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.25);
  transition: all 0.3s ease;
}

.user-hero-profile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 28px rgba(245, 158, 11, 0.45);
  border-color: #fbbf24;
}

.user-profile-avatar-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  max-width: 46px;
  max-height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

.user-profile-avatar {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  max-width: 46px !important;
  max-height: 46px !important;
  border-radius: 50% !important;
  border: 2px solid var(--gold-accent);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
  object-fit: cover !important;
  display: block;
}

.user-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid #0f1914;
  box-shadow: 0 0 6px #10b981;
}

.user-profile-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: start;
}

.user-profile-name {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.3px;
}

.user-profile-rp {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}

.rp-crown {
  font-size: 0.95rem;
}

.rp-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  color: var(--gold-light);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.rp-tier-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(16, 185, 129, 0.2));
  border: 1px solid var(--gold-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 10px;
}

/* =========================================================================
   Boneyard Station & Modal (Image 4 Design)
   ========================================================================= */
.domino-boneyard-flank-dock {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 30;
}

.boneyard-pile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(10, 24, 16, 0.88);
  border: 1.5px solid var(--gold-accent);
  border-radius: 16px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.boneyard-pile-btn:hover {
  transform: scale(1.08) translateY(-2px);
  border-color: #fbbf24;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.5);
}

.boneyard-pile-btn.pulse-draw-glow {
  animation: boneyardGlowPulse 1.4s infinite alternate ease-in-out;
  border-color: #10b981;
}

@keyframes boneyardGlowPulse {
  0% { transform: scale(1); box-shadow: 0 0 14px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1.08); box-shadow: 0 0 28px rgba(16, 185, 129, 0.95); }
}

.boneyard-pile-icon {
  font-size: 1.8rem;
  color: var(--gold-light);
}

.boneyard-pile-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pile-title {
  font-family: 'Cairo', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
}

.pile-count {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold-light);
}

.domino-pass-btn {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 6px 14px;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
  transition: all 0.2s ease;
}

.domino-pass-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.8);
}

.domino-pass-btn.pulse-pass-glow {
  animation: pulsePassGlow 1.2s infinite alternate ease-in-out;
}

/* Must Pass Alert Banner */
.domino-must-pass-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(185, 28, 28, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(248, 113, 113, 0.8);
  border-radius: 999px;
  padding: 6px 18px;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 8px 26px rgba(220, 38, 38, 0.55), 0 0 20px rgba(239, 68, 68, 0.35);
  margin-bottom: 8px;
  user-select: none;
  animation: pulsePassGlow 1.2s infinite alternate ease-in-out;
}

.must-pass-quick-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  border: none;
  border-radius: 999px;
  padding: 4px 14px;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.must-pass-quick-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.85);
}

@keyframes pulsePassGlow {
  from {
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    border-color: rgba(248, 113, 113, 0.4);
    transform: translateY(0);
  }
  to {
    box-shadow: 0 10px 32px rgba(220, 38, 38, 0.85), 0 0 22px rgba(248, 113, 113, 0.7);
    border-color: rgba(248, 113, 113, 1);
    transform: translateY(-2px);
  }
}

/* Boneyard Modal Dialog (Exact Image 4 Replica) */
.domino-boneyard-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  direction: rtl;
  font-family: 'Cairo', sans-serif;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.boneyard-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.boneyard-modal-card {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 520px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.4) rgba(0, 0, 0, 0.2);
  background: radial-gradient(circle at center, #1b4b22 0%, #103316 65%, #0a1f0e 100%);
  border: 4px solid #2d7335;
  border-radius: 30px;
  padding: 24px 28px;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.9), inset 0 0 30px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.boneyard-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 12px;
}

.boneyard-modal-title {
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.boneyard-modal-close {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.boneyard-modal-close:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: #ef4444;
}

.boneyard-modal-instruction {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  margin: 0 0 16px;
}

.boneyard-grid-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
}

/* Face-down cards with glowing green borders as shown in Image 4 */
.boneyard-grid-tile {
  width: 44px;
  height: 76px;
  border-radius: 7px;
  background: #ffffff;
  border: 2px solid #a3e635;
  box-shadow: 0 0 16px rgba(163, 230, 53, 0.85), 0 4px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.boneyard-grid-tile.can-pick-tile:hover {
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 0 28px rgba(163, 230, 53, 1), 0 8px 18px rgba(0, 0, 0, 0.7);
  border-color: #bef264;
}

.boneyard-grid-tile.tile-picking-anim {
  animation: tilePickPop 0.3s ease-out forwards;
}

@keyframes tilePickPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.25) translateY(-8px); filter: brightness(1.4); }
  100% { transform: scale(0.4) translateY(30px); opacity: 0; }
}

.boneyard-modal-footer {
  margin-top: 14px;
}

.boneyard-remaining-pill {
  display: inline-block;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 16px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
}

.boneyard-remaining-pill strong {
  color: var(--gold-light);
}

/* =========================================================================
   Discord Only Access Restriction Screen (Google Browser Block)
   ========================================================================= */
.discord-only-gate {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999999 !important;
  background: radial-gradient(circle at center, #1a1e36 0%, #0e1122 65%, #070810 100%);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  direction: rtl;
  font-family: 'Cairo', sans-serif;
}

.discord-only-card {
  background: rgba(17, 21, 35, 0.95);
  border: 1.5px solid rgba(88, 101, 242, 0.5);
  border-radius: 26px;
  padding: 32px 36px;
  max-width: 540px;
  width: 100%;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(88, 101, 242, 0.25);
}

.gate-icon-pulse {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.discord-gate-title {
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 10px;
}

.discord-gate-subtitle {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 22px;
}

.discord-gate-subtitle strong {
  color: #5865f2;
}

.discord-instructions-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: right;
}

.instructions-header {
  color: #f59e0b;
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.instructions-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-badge {
  background: #5865f2;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-info strong {
  display: block;
  color: #ffffff;
  font-size: 0.88rem;
}

.step-info p {
  color: #94a3b8;
  font-size: 0.78rem;
  margin: 2px 0 0;
}

.discord-open-app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.45);
  transition: all 0.25s ease;
}

.discord-open-app-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.65);
  background: linear-gradient(135deg, #6774f4 0%, #515dd1 100%);
}

.discord-gate-footer {
  margin-top: 18px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* =========================================================================
   Discord Mandatory Authorization Gate (Required Profile & Avatar)
   ========================================================================= */
.discord-auth-gate {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999999 !important;
  background: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 65%, #020617 100%);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  direction: rtl;
  font-family: 'Cairo', sans-serif;
  backdrop-filter: blur(10px);
}

.discord-auth-card {
  background: rgba(15, 23, 42, 0.96);
  border: 2px solid #5865f2;
  border-radius: 26px;
  padding: 30px 34px;
  max-width: 500px;
  width: 100%;
  margin: auto !important;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 45px rgba(88, 101, 242, 0.35);
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-gate-emblem {
  margin-bottom: 12px;
}

.auth-gate-emblem .gate-icon-pulse {
  font-size: 3.2rem;
  filter: drop-shadow(0 4px 12px rgba(88, 101, 242, 0.5));
  animation: pulseDot 1.5s infinite alternate;
}

.auth-gate-title {
  color: #f8fafc;
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 10px;
}

.auth-gate-desc {
  color: #cbd5e1;
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 0 0 18px;
}

.auth-gate-desc strong {
  color: #818cf8;
}

.auth-why-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}

.auth-why-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: #e2e8f0;
  font-weight: 600;
}

.auth-why-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.auth-warning-notice {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
  color: #fca5a5;
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 700;
  text-align: center;
}

.auth-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-discord-authorize-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #5865f2 0%, #4338ca 100%);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 16px;
  border: 1px solid #818cf8;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.5), 0 0 15px rgba(88, 101, 242, 0.3);
  transition: all 0.25s ease;
  width: 100%;
}

.btn-discord-authorize-glow:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.7), 0 0 25px rgba(88, 101, 242, 0.5);
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.btn-discord-authorize-glow:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* =========================================================================
   Discord Activity Viewport Responsive Optimization (Desktop, Laptop, Mobile)
   Accounts for Discord iframe sidebars, headers, and mobile landscape safe zones
   ========================================================================= */
@media (max-height: 640px) {
  .top-nav {
    min-height: 38px !important;
    padding: 2px 14px !important;
  }
  .brand-logo-badge {
    font-size: 0.78rem !important;
    padding: 2px 6px !important;
  }
  .brand-title {
    font-size: 0.82rem !important;
  }
  .room-header-bar {
    min-height: 26px !important;
    margin-bottom: 0 !important;
  }
  .room-badge {
    font-size: 0.72rem !important;
    padding: 2px 8px !important;
  }
  .table-rail-area {
    padding: 2px 10px !important;
  }
  .player-floating-tag {
    padding: 2px 10px !important;
    font-size: 0.74rem !important;
  }
  .player-floating-tag .avatar {
    width: 28px !important;
    height: 28px !important;
  }
  .opponent-domino-rack .domino-tile {
    width: 22px !important;
    height: 44px !important;
  }
  .domino-hand .domino-tile {
    width: 32px !important;
    height: 64px !important;
  }
  .domino-chain-track {
    transform: scale(0.85) !important;
  }
  .domino-boneyard-flank-dock {
    right: 8px !important;
    gap: 4px !important;
  }
  .boneyard-pile-btn {
    padding: 4px 8px !important;
  }
  .boneyard-pile-icon {
    font-size: 1.25rem !important;
  }
}

@media (max-height: 480px) {
  .top-nav {
    min-height: 32px !important;
    padding: 1px 10px !important;
  }
  .room-header-bar {
    display: none !important;
  }
  .table-rail-area {
    padding: 1px 6px !important;
  }
  .player-floating-tag {
    padding: 1px 6px !important;
    font-size: 0.68rem !important;
  }
  .player-floating-tag .avatar {
    width: 22px !important;
    height: 22px !important;
  }
  .opponent-domino-rack .domino-tile {
    width: 18px !important;
    height: 36px !important;
  }
  .domino-hand .domino-tile {
    width: 26px !important;
    height: 52px !important;
  }
  .domino-chain-track {
    transform: scale(0.72) !important;
  }
  .domino-boneyard-flank-dock {
    right: 4px !important;
    top: 36px !important;
    transform: none !important;
  }
  .boneyard-pile-btn {
    padding: 3px 6px !important;
  }
  .boneyard-pile-meta {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .domino-chain-track {
    transform: scale(0.8) !important;
  }
  .domino-hand .domino-tile {
    width: 28px !important;
    height: 56px !important;
  }
  .domino-boneyard-flank-dock {
    right: 4px !important;
  }
}

.open-ends-status {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ends-indicators-bar {
  display: flex;
  gap: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  padding: 4px 18px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
}

.end-pill {
  color: #e2e8f0;
}

.end-pill strong {
  color: var(--gold-light);
  font-size: 1rem;
}

.board-hint-text {
  font-family: 'Cairo', sans-serif;
  color: var(--gold-light);
  font-size: 0.9rem;
  font-weight: 700;
}

.boneyard-must-draw-pulse {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.3) !important;
  animation: pulse-glow 1.2s infinite alternate ease-in-out;
}

.pass-must-pass-pulse {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.3) !important;
  animation: pulse-glow 1.2s infinite alternate ease-in-out;
}

.end-tag {
  color: var(--gold-light);
}

/* Basra & Azneef splash celebrations */
.basra-splash, .points-splash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  pointer-events: none;
}

.splash-content {
  background: radial-gradient(circle, #b91c1c, #7f1d1d);
  border: 3px solid #fbbf24;
  border-radius: 24px;
  padding: 24px 44px;
  text-align: center;
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.7);
  color: #fff;
}

.splash-content.komi-splash {
  background: radial-gradient(circle, #7c3aed, #4c1d95);
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.7);
}

.splash-content.azneef-splash {
  background: radial-gradient(circle, #059669, #065f46);
  box-shadow: 0 0 60px rgba(16, 185, 129, 0.7);
}

.points-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fbbf24;
}

/* General Smooth Pop for Modals and Elements */
.animate-pop {
  animation: modalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.93);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Splash specific pop animation preserving centered transform */
.basra-splash.animate-pop, .points-splash.animate-pop {
  animation: splashPopIn 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) both !important;
}

@keyframes splashPopIn {
  from {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Game Over Modal */
.game-over-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 80;
  text-align: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.game-over-box {
  background: #0c1511;
  border: 3px solid var(--gold-accent);
  border-radius: 24px;
  padding: 28px 36px;
  max-width: 500px;
  width: 90%;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.4) rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 50px rgba(245, 158, 11, 0.4);
}

.game-over-box.box-winner {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #13241b, #09120e);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.92), 0 0 55px rgba(245, 158, 11, 0.45);
}

.game-over-box.box-loser {
  border-color: #ef4444;
  background: linear-gradient(180deg, #241315, #12090a);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.92), 0 0 55px rgba(239, 68, 68, 0.38);
}

.result-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.result-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: 5px;
  line-height: 1;
  margin: 0;
}

.headline-winner {
  background: linear-gradient(135deg, #ffffff 0%, #fbbf24 45%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.7));
  animation: winnerGlow 1.8s ease-in-out infinite alternate;
}

@keyframes winnerGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.5)); }
  100% { transform: scale(1.04); filter: drop-shadow(0 0 32px rgba(245, 158, 11, 0.9)); }
}

.headline-loser {
  background: linear-gradient(135deg, #ffffff 0%, #f87171 45%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(239, 68, 68, 0.6));
  animation: loserPulse 1.8s ease-in-out infinite alternate;
}

@keyframes loserPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.45)); }
  100% { transform: scale(1.02); filter: drop-shadow(0 0 28px rgba(239, 68, 68, 0.8)); }
}

.result-submsg {
  font-size: 1.05rem;
  color: #e2e8f0;
  font-weight: 700;
  margin: 6px 0 0;
}

.result-stats-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  color: #d1d5db;
}

.highlight-gold {
  color: var(--gold-light);
  font-weight: 800;
  font-size: 1.1rem;
}

.result-rp-status {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
}

.rp-tag-bot {
  font-size: 0.8rem;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 5px 12px;
  border-radius: 10px;
  line-height: 1.4;
}

.rp-tag-gain {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 6px 16px;
  border-radius: 12px;
}

.rp-tag-loss {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 6px 16px;
  border-radius: 12px;
}

.game-over-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Rich Game Over Statistics Breakdown */
.game-over-meta-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 6px 0;
}

.game-over-meta-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.game-over-meta-pill.pill-gold {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.game-over-teams-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.game-over-team-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.game-over-team-card.team-winner {
  border-color: rgba(245, 158, 11, 0.6);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(0, 0, 0, 0.3));
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

.team-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.game-over-team-card.team-winner .team-card-title {
  color: #fbbf24;
}

.team-card-players {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-player-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 8px;
  border-radius: 20px;
}

.team-player-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.team-card-score-big {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin: 4px 0;
}

.game-over-team-card.team-winner .team-card-score-big {
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

.team-card-stats-row {
  display: flex;
  justify-content: space-around;
  font-size: 0.75rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
}

.team-card-stat strong {
  color: #f1f5f9;
}

/* Individual / Multi-Player Scoreboard Table */
.game-over-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.game-over-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: right;
}

[dir="ltr"] .game-over-stats-table {
  text-align: left;
}

.game-over-stats-table th {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.game-over-stats-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.game-over-stats-table tr:last-child td {
  border-bottom: none;
}

.game-over-stats-table tr.row-winner td {
  background: rgba(245, 158, 11, 0.08);
  font-weight: 800;
  color: #fbbf24;
}

.player-cell-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-cell-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-num-gold {
  color: #fbbf24;
  font-weight: 800;
}

/* Online Presence Badges */
.presence-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.presence-avatars-row {
  display: flex;
  align-items: center;
  margin-inline-start: 6px;
}

.presence-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
  margin-inline-start: -7px;
  object-fit: cover;
  transition: transform 0.2s ease;
  background: #1e293b;
}

.presence-avatar-mini:hover {
  transform: translateY(-3px) scale(1.15);
  z-index: 5;
}

.presence-more-pill {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  background: #1e293b;
  border-radius: 10px;
  padding: 1px 6px;
  margin-inline-start: 2px;
}

/* Live Rooms Panel */
.live-rooms-panel {
  width: 100%;
  max-width: 1080px;
  margin: 50px auto 40px;
  background: rgba(10, 8, 6, 0.88);
  border: 1.5px solid rgba(212, 168, 67, 0.4);
  border-radius: 20px;
  padding: 18px 24px;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
}

.rooms-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.panel-title-area h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.panel-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.rooms-count-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
}

.rooms-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.no-rooms-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.no-rooms-icon {
  font-size: 2rem;
  opacity: 0.4;
  margin-bottom: 8px;
}

.live-room-card {
  background: rgba(18, 28, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
}

.live-room-card:hover {
  border-color: var(--gold-accent);
  background: rgba(24, 38, 30, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.room-host-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.host-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
}

.host-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--gold-accent);
  object-fit: cover;
}

.host-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #111827;
}

.host-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.host-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.room-id-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-game-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold-light);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.room-body-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: #d1d5db;
  padding: 4px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  gap: 8px;
  overflow: hidden;
}

.room-game-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.room-specs {
  display: flex;
  gap: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.room-specs strong {
  color: var(--gold-light);
}

.room-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  gap: 8px;
  overflow: hidden;
}

.status-waiting {
  font-size: 0.78rem;
  color: #34d399;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.status-looking-team {
  color: #38bdf8 !important;
  font-weight: 700 !important;
}

.join-room-action-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
  white-space: nowrap;
}

.join-room-action-btn:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: scale(1.04);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* English / LTR adjustments */
html[dir="ltr"] .host-online-dot {
  right: auto;
  left: 0;
}

html[dir="ltr"] .game-type-badge {
  right: auto;
  left: 12px;
}

/* Turn Glow FX */
.my-turn-glow {
  animation: turnPulse 1.8s infinite alternate ease-in-out;
}

@keyframes turnPulse {
  0% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }
  100% { box-shadow: 0 0 35px rgba(245, 158, 11, 0.5); }
}

.animate-fade {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bot Difficulty Selection Modal */
.difficulty-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.difficulty-box {
  background: linear-gradient(150deg, rgba(16, 12, 8, 0.98) 0%, rgba(10, 7, 5, 0.99) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 24px;
  max-width: 530px;
  width: 94%;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  padding: 22px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.45) rgba(0, 0, 0, 0.25);
  direction: rtl !important;
  text-align: right;
}

.difficulty-box::-webkit-scrollbar {
  width: 6px;
}

.difficulty-box::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

.difficulty-box::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.45);
  border-radius: 4px;
}

.difficulty-box::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.75);
}

.diff-header {
  text-align: center;
  position: relative;
  padding-bottom: 4px;
}

.diff-crest {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 2px;
  font-weight: 800;
  color: #fef08a;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(180, 83, 9, 0.3) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 14px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.diff-header h2 {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 15px rgba(245, 158, 11, 0.25);
  margin: 0 0 4px 0;
}

.diff-game-tag {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f59e0b;
  margin: 0;
}

.diff-options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diff-card-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(245, 158, 11, 0.02) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.18);
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: right;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Cairo', sans-serif;
  color: #fff;
  overflow: hidden;
}

.diff-card-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(180, 83, 9, 0.05) 100%);
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateX(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.diff-card-btn.selected {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(180, 83, 9, 0.12) 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3), inset 0 0 10px rgba(245, 158, 11, 0.1);
  transform: translateX(-2px);
}

.diff-card-btn.diff-impossible.selected {
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(220, 38, 38, 0.18) 100%);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.45);
}

.diff-badge-indicator {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.diff-badge-easy {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.diff-badge-medium {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.diff-badge-hard {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.diff-badge-impossible {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(168, 85, 247, 0.2) 100%);
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.diff-badge-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.diff-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.diff-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.diff-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  transition: color 0.2s ease;
}

.diff-card-btn.selected .diff-name {
  color: #fef08a;
}

.diff-tier-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.2;
}

.tier-easy {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tier-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tier-hard {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tier-impossible {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.diff-desc {
  font-size: 0.76rem;
  color: #a1a1aa;
  line-height: 1.3;
}

.diff-card-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.diff-card-btn.selected .diff-card-check {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #fbbf24;
  color: #000;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  transform: scale(1.05);
}

.diff-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #0f0c08;
  box-shadow: 0 -12px 25px rgba(10, 7, 5, 0.98);
  border-top: 1px solid rgba(245, 158, 11, 0.25);
  padding: 12px 0 2px;
  margin-top: auto;
  flex-shrink: 0;
}

.diff-actions button {
  flex: 1;
  padding: 12px;
  font-size: 0.95rem;
  border-radius: 12px;
  font-weight: 800;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: all 0.22s ease;
}

.diff-actions .btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  border: 1px solid #fbbf24;
  color: #000;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}

.diff-actions .btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
}

.diff-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #e4e4e7;
}

.diff-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fff;
}

/* Card Dealing & Playing Micro-Animations */
@keyframes dealCardIn {
  0% {
    opacity: 0;
    transform: translateY(-45px) scale(0.65) rotate(-6deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

.card-deal-anim {
  animation: dealCardIn 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1) backwards;
}

@keyframes dropCardIn {
  0% {
    opacity: 0;
    transform: scale(1.25) translateY(-25px);
    box-shadow: 0 25px 35px rgba(0, 0, 0, 0.7);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  }
}

.card-drop-anim {
  animation: dropCardIn 0.3s cubic-bezier(0.25, 1, 0.5, 1) backwards;
}

@keyframes playCardSlide {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.08); box-shadow: 0 0 22px var(--gold-accent); }
  100% { transform: translateY(-60px) scale(0.85); opacity: 0; }
}

.card-played-active {
  animation: playCardSlide 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none;
}

/* Capture Glow Effect */
@keyframes captureGlow {
  0% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
  50% { box-shadow: 0 0 26px #10b981, 0 0 14px #fbbf24; }
  100% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
}

.capture-pulse {
  animation: captureGlow 0.5s ease-in-out;
}

/* Domino Tile Drawing & Snapping Animations */
@keyframes drawTileIn {
  0% {
    opacity: 0;
    transform: translateY(-35px) scale(0.7) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

.tile-draw-anim {
  animation: drawTileIn 0.32s cubic-bezier(0.25, 1, 0.4, 1.1) backwards;
}

@keyframes snapTileOnBoard {
  0% {
    opacity: 0;
    transform: scale(1.28) translateY(-12px);
    filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.7));
  }
  65% {
    transform: scale(0.97) translateY(1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  }
}

.newly-placed-tile {
  animation: snapTileOnBoard 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
  border-color: var(--gold-accent) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5) !important;
}

/* Floating Points Pill */
@keyframes floatScoreUp {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.8);
  }
  25% {
    opacity: 1;
    transform: translateY(0) scale(1.15);
  }
  75% {
    opacity: 1;
    transform: translateY(-18px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-32px) scale(0.9);
  }
}

.floating-score-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fbbf24;
  background: rgba(10, 18, 14, 0.85);
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 4px 14px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  pointer-events: none;
  z-index: 60;
  animation: floatScoreUp 1.2s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

/* Rules Button in Game Cards */
.btn-rules {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-light);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-rules:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--gold-accent);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}

/* Comprehensive Rules Guide Modal */
.rules-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.rules-box {
  background: #0d1712;
  border: 2px solid var(--gold-accent);
  border-radius: 22px;
  max-width: 860px;
  width: 95%;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(245, 158, 11, 0.25);
  overflow: hidden;
}

.rules-modal-header {
  padding: 18px 24px 12px;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  position: relative;
}

.rules-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.rules-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rules-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
  transform: scale(1.1);
}

.rules-brand-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 2px;
  font-weight: 900;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 3px 12px;
}

.rules-modal-header h2 {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
}

.rules-tabs-nav-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  position: relative;
}

.rules-tabs-scroll-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  width: 28px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  font-size: 0.78rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  user-select: none;
}

.rules-tabs-scroll-btn:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--gold-accent);
  color: #fff;
  transform: scale(1.06);
}

.rules-tabs {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.45) rgba(255, 255, 255, 0.04);
  -webkit-overflow-scrolling: touch;
}

.rules-tabs::-webkit-scrollbar {
  height: 5px;
}

.rules-tabs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.rules-tabs::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 3px;
}

.rules-tab-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: fit-content;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 14px;
  color: #d1d5db;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rules-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.rules-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(16, 185, 129, 0.15));
  border-color: var(--gold-accent);
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.rules-content-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rules-content-body::-webkit-scrollbar {
  width: 6px;
}

.rules-content-body::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.3);
  border-radius: 4px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #e5e7eb;
}

.rule-item strong {
  color: var(--gold-light);
  font-weight: 800;
}

.rule-icon {
  font-size: 1.35rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.rules-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.rules-copyright {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* In-game Forfeit Button */
.forfeit-btn {
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
}

.forfeit-btn:hover {
  background: rgba(220, 38, 38, 0.3) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4) !important;
}

/* Forfeit Victory/Penalty Modal Banner */
.forfeit-banner {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 150 !important;
  padding: 16px !important;
  text-align: center !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.forfeit-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.forfeit-title {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.forfeit-rp-msg {
  font-size: 1.25rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
}

/* Hero Leaderboard Button */
.hero-leaderboard-btn {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(16, 185, 129, 0.12));
  border: 1.5px solid var(--gold-accent);
  color: #fbbf24;
  padding: 8px 22px;
  border-radius: 20px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.hero-leaderboard-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32), rgba(16, 185, 129, 0.22));
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
}

/* Official 3RB Leaderboard / Ranked Modal */
.leaderboard-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.leaderboard-box {
  background: #0b1410;
  border: 2px solid var(--gold-accent);
  border-radius: 22px;
  max-width: 680px;
  width: 100%;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  display: flex;
  flex-direction: column;
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.9), 0 0 45px rgba(245, 158, 11, 0.28);
  overflow: hidden;
}

.lb-header {
  padding: 22px 24px 14px;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.lb-crest {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 2px;
  font-weight: 900;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 3px 14px;
}

.lb-header h2 {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
}

.lb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}

.lb-tab-btn {
  flex: 0 1 auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 12px;
  color: #d1d5db;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lb-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(245, 158, 11, 0.4);
}

.lb-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(16, 185, 129, 0.18));
  border-color: var(--gold-accent);
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.lb-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.lb-body::-webkit-scrollbar {
  width: 6px;
}

.lb-body::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.3);
  border-radius: 4px;
}

.lb-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.lb-row:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(-2px);
}

html[dir="ltr"] .lb-row:hover {
  transform: translateX(2px);
}

.lb-row.rank-1 {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.2), rgba(255, 255, 255, 0.03));
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.22);
}

.lb-row.rank-2 {
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.15), rgba(255, 255, 255, 0.03));
  border-color: rgba(203, 213, 225, 0.5);
}

.lb-row.rank-3 {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.15), rgba(255, 255, 255, 0.03));
  border-color: rgba(217, 119, 6, 0.5);
}

.lb-rank-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  width: 38px;
  text-align: center;
  flex-shrink: 0;
}

.lb-rank-badge.rank-1 { color: #fbbf24; }
.lb-rank-badge.rank-2 { color: #cbd5e1; }
.lb-rank-badge.rank-3 { color: #f59e0b; }
.lb-rank-badge.rank-other { color: var(--text-muted); font-size: 0.95rem; }

.lb-player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.lb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-accent);
}

.lb-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.lb-title-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-light);
}

.lb-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.lb-rp-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 2px 8px;
}

.lb-winrate {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.lb-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.lb-copyright {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Grace Period Disconnect Countdown Box */
.grace-countdown-box {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.35);
  z-index: 100;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.grace-timer-number {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  color: #fbbf24;
  font-weight: 900;
}

/* Reconnection Toast */
.reconnect-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(6, 78, 59, 0.95);
  border: 1.5px solid #10b981;
  border-radius: 14px;
  padding: 10px 20px;
  color: #34d399;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(16, 185, 129, 0.4);
  z-index: 105;
}

/* Solo Bot Notice in Difficulty Prompt */
.diff-bot-notice {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: var(--gold-light);
  line-height: 1.5;
  text-align: center;
}

/* Live Match & Spectator Cards */
.live-match-card {
  border-color: rgba(239, 68, 68, 0.45) !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(0, 0, 0, 0.4)) !important;
  overflow: hidden !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.live-pulse-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 2px 7px;
  border-radius: 8px;
  animation: livePulseDot 1.5s infinite alternate ease-in-out;
  flex-shrink: 0;
  white-space: nowrap;
}

@keyframes livePulseDot {
  0% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.3); }
  100% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.7); }
}

.spec-count-pill {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #93c5fd !important;
  background: rgba(59, 130, 246, 0.15) !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
  border-radius: 8px !important;
  padding: 2px 8px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  margin-inline-start: auto !important;
  box-sizing: border-box !important;
}

.matchup-players-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.matchup-player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.matchup-player.p1-side {
  justify-content: flex-start;
}

.matchup-player.p2-side {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.matchup-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-accent);
  flex-shrink: 0;
}

.matchup-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.matchup-score {
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  padding: 2px 6px;
  flex-shrink: 0;
}

.matchup-vs {
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 6px;
  padding: 2px 6px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.room-game-name-tag {
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  color: var(--gold-light) !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 125px !important;
  flex-shrink: 1 !important;
}

.matchup-extra-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

.online-spectate-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: 1px solid #34d399;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.online-spectate-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.65);
}

/* Copy Room ID Button in Header & Cards */
.copy-room-header-btn {
  background: rgba(245, 158, 11, 0.18);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  color: var(--gold-light);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-right: 8px;
}

.copy-room-header-btn:hover {
  background: var(--gold-accent);
  color: #06160d;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.copy-room-id-btn-mini {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold-light);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 4px;
}

.copy-room-id-btn-mini:hover {
  background: var(--gold-accent);
  color: #000;
}

/* Pagination for Live Rooms */
.rooms-pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px;
}

.rooms-page-btn {
  background: rgba(18, 28, 22, 0.85);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  color: #f3f4f6;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rooms-page-btn:hover:not(:disabled) {
  border-color: var(--gold-accent);
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-light);
  transform: translateY(-1px);
}

.rooms-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
}

.rooms-page-indicator {
  font-size: 0.88rem;
  color: var(--gold-light);
  font-weight: 800;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Central 10s Turn Countdown */
.center-turn-countdown-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: countdownPulse 0.9s infinite alternate cubic-bezier(0.34, 1.56, 0.64, 1);
}

.countdown-num-disc {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.95) 0%, rgba(185, 28, 28, 0.9) 70%, rgba(0, 0, 0, 0.8) 100%);
  border: 3px solid #fecaca;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.9), 0 0 70px rgba(239, 68, 68, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.countdown-sub-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fca5a5;
  background: rgba(0, 0, 0, 0.75);
  padding: 3px 12px;
  border-radius: 12px;
  margin-top: 6px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  letter-spacing: 0.5px;
}

@keyframes countdownPulse {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

/* Turn Timer Beacon */
.turn-timer-beacon {
  font-family: 'Outfit', monospace;
  font-weight: 900;
  font-size: 0.82rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.turn-timer-beacon.timer-warning {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fbbf24;
}

.turn-timer-beacon.timer-danger {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
  color: #fca5a5;
  animation: timerBlink 0.5s infinite alternate;
}

@keyframes timerBlink {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Discord Identity Prompt Modal */
.discord-identity-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.discord-identity-box {
  background: linear-gradient(135deg, #0d1b13, #07100b);
  border: 2px solid var(--gold-accent);
  border-radius: 18px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.3);
  text-align: center;
  scrollbar-width: thin;
}

.identity-header .identity-icon {
  font-size: 2.4rem;
  margin-bottom: 6px;
}

.identity-header h2 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 6px;
  font-weight: 900;
}

.identity-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.identity-form {
  text-align: right;
  margin-bottom: 20px;
}

.identity-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.identity-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.identity-input:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

.identity-error-msg {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 4px;
}

.identity-avatars-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.identity-avatar-choice {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.identity-avatar-choice img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.identity-avatar-choice:hover {
  transform: scale(1.1);
  border-color: rgba(245, 158, 11, 0.6);
}

.identity-avatar-choice.selected {
  border-color: var(--gold-accent);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.7);
  transform: scale(1.12);
}

.identity-actions {
  display: flex;
  justify-content: center;
}

.identity-actions .btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

.spectate-room-action-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 0.88rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}

.spectate-room-action-btn:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: scale(1.04);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

/* Leave Spectate Header Button: STRICTLY HIDDEN for all players, ONLY shown for true spectators */
#leaveSpectateBtn,
.leave-spectate-btn {
  display: none !important;
  background: rgba(59, 130, 246, 0.18) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  color: #bfdbfe !important;
}

body.is-spectating #leaveSpectateBtn,
body.is-spectating .leave-spectate-btn {
  display: inline-flex !important;
}

/* Forfeit Button: strictly hidden for spectators */
body.is-spectating #inGameForfeitBtn,
body.is-spectating .forfeit-btn {
  display: none !important;
}

/* Leave Spectate Button: strictly hidden for non-spectators/active players */
body:not(.is-spectating) #leaveSpectateBtn,
body:not(.is-spectating) .leave-spectate-btn {
  display: none !important;
}

.leave-spectate-btn:hover {
  background: rgba(59, 130, 246, 0.35) !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.45) !important;
}

/* Spectator Floating Notice Banner */
.spectator-floating-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid #3b82f6;
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #93c5fd;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(59, 130, 246, 0.3);
  z-index: 45;
  pointer-events: none;
}

/* Empty Leaderboard State Card */
.lb-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px dashed rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  margin: 14px 0;
  width: 100%;
}

.lb-empty-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.4));
  animation: floatEmptyIcon 3s infinite ease-in-out;
}

@keyframes floatEmptyIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.lb-empty-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.lb-empty-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 360px;
  line-height: 1.6;
  margin: 0;
}

/* Branch Selection Modal for Domino Spinner Branching */
.branch-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.branch-modal-content {
  background: #0d1712;
  border: 2px solid var(--gold-accent);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.3);
  margin: auto !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.branch-modal-content h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.branches-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.branch-choice-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(16, 185, 129, 0.1));
  border: 1.5px solid var(--gold-accent);
  color: #fbbf24;
  border-radius: 12px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.branch-choice-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(16, 185, 129, 0.25));
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.modal-cancel-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #9ca3af;
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ========================================================
   1. GLOBAL MATCHMAKING NOTIFICATION BELL & DROPDOWN
   ======================================================== */
.bell-nav-container {
  position: relative;
  display: inline-block;
}

.bell-nav-btn {
  position: relative;
  font-size: 1.05rem;
  padding: 6px 14px;
}

.bell-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

.bell-badge-pulse {
  animation: bellPulseAnim 1.4s infinite;
}

@keyframes bellPulseAnim {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); box-shadow: 0 0 14px #ef4444; }
  100% { transform: scale(1); }
}

.bell-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: rgba(10, 20, 15, 0.96);
  border: 1.5px solid var(--gold-accent);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(245, 158, 11, 0.25);
  backdrop-filter: blur(16px);
  z-index: 100;
  overflow: hidden;
}

.bell-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold-light);
}

.bell-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.bell-close-btn:hover {
  color: #ef4444;
}

.bell-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bell-empty-msg {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.bell-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: background 0.2s;
}

.bell-player-row:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
}

.bell-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-accent);
  object-fit: cover;
}

.bell-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bell-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bell-game {
  font-size: 0.72rem;
  color: var(--gold-light);
}

.bell-join-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.bell-join-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

/* ── Royal Settings Dropdown Menu ────────────────────────────────────────── */
.settings-nav-container {
  position: relative;
  display: inline-block;
}

.settings-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

.settings-nav-btn:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: #f59e0b !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4) !important;
}

.settings-gear-icon {
  font-size: 1rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.settings-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 250px;
  background: rgba(10, 20, 15, 0.96);
  border: 1.5px solid var(--gold-accent);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(245, 158, 11, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  overflow: hidden;
  animation: settingsMenuSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[dir="rtl"] .settings-dropdown-menu {
  left: 0;
  right: auto;
}

@keyframes settingsMenuSlide {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold-light);
}

.settings-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.settings-close-btn:hover {
  color: #ef4444;
}

.settings-dropdown-content {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-item-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: right;
}

[dir="ltr"] .settings-item-btn {
  text-align: left;
}

.settings-item-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  transform: translateX(-3px);
}

[dir="ltr"] .settings-item-btn:hover {
  transform: translateX(3px);
}

.settings-item-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.settings-item-text {
  flex: 1;
}

.settings-status-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 800;
}

.settings-status-badge.on {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.settings-status-badge.off {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.settings-lang-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  font-weight: 800;
}

/* ── Luxury Sound & Volume Control Panel ── */
.sound-nav-container {
  position: relative;
  display: inline-block;
}

.sound-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
  transition: all 0.2s ease !important;
}

.sound-nav-btn:hover {
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: #f59e0b !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4) !important;
}

.sound-nav-icon {
  font-size: 1.1rem;
}

.sound-nav-badge {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  font-weight: 900;
}

.sound-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  left: 0 !important;
  right: auto !important;
  width: 330px !important;
  min-width: 330px !important;
  max-width: calc(100vw - 20px) !important;
  background-color: #0b1510 !important;
  background-image: linear-gradient(165deg, #0f2218 0%, #08140e 100%) !important;
  border: 2px solid #f59e0b !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(245, 158, 11, 0.35) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  z-index: 9999999 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  direction: rtl !important;
  text-align: right !important;
  animation: settingsMenuSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[dir="rtl"] .sound-dropdown-menu {
  left: 0 !important;
  right: auto !important;
}

.sound-dropdown-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 18px !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.35)) !important;
  border-bottom: 1px solid rgba(245, 158, 11, 0.3) !important;
  box-sizing: border-box !important;
}

.sound-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.sound-dropdown-icon {
  font-size: 1.2rem !important;
}

.sound-dropdown-title {
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  letter-spacing: 0.3px !important;
}

.sound-close-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  flex-shrink: 0 !important;
}

.sound-close-btn:hover {
  background: #ef4444 !important;
  border-color: #f87171 !important;
  color: #fff !important;
  transform: scale(1.1) !important;
}

.sound-dropdown-body {
  padding: 16px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  box-sizing: border-box !important;
}

.sound-control-group {
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(245, 158, 11, 0.22) !important;
  border-radius: 14px !important;
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  box-sizing: border-box !important;
}

.sound-label-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.sound-label-title {
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.sound-clickable-icon {
  cursor: pointer !important;
  padding: 2px 4px !important;
  border-radius: 6px !important;
  transition: background 0.2s !important;
}

.sound-clickable-icon:hover {
  background: rgba(245, 158, 11, 0.25) !important;
}

.sound-value-pill {
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  padding: 2px 8px !important;
  border-radius: 8px !important;
}

.sound-slider-wrapper {
  width: 100% !important;
  padding: 4px 0 !important;
  box-sizing: border-box !important;
}

.sound-slider-input {
  width: 100% !important;
  height: 8px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border-radius: 8px !important;
  outline: none !important;
  cursor: pointer !important;
  display: block !important;
  box-sizing: border-box !important;
}

.sound-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #fbbf24, #d97706) !important;
  border: 2px solid #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(245, 158, 11, 0.6) !important;
  cursor: pointer !important;
}

.sound-slider-input::-moz-range-thumb {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #fbbf24, #d97706) !important;
  border: 2px solid #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(245, 158, 11, 0.6) !important;
  cursor: pointer !important;
}

.sound-mute-action-row {
  display: flex !important;
  width: 100% !important;
  margin-top: 2px !important;
}

.sound-mute-action-btn {
  width: 100% !important;
  padding: 9px 16px !important;
  background: rgba(239, 68, 68, 0.14) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.45) !important;
  border-radius: 12px !important;
  color: #fca5a5 !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
}

.sound-mute-action-btn:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: #ef4444 !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

.sound-mute-action-btn.is-muted {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  border-color: #fca5a5 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6) !important;
}

.bgm-ctrl-top-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.bgm-toggle-switch-btn {
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  border: 1px solid transparent !important;
  white-space: nowrap !important;
}

.bgm-toggle-switch-btn.on {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #fff !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4) !important;
}

.bgm-toggle-switch-btn.off {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
}

.sound-hint-note {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  line-height: 1.45 !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

/* ========================================================
   2. PLAYER MATCH HISTORY MODAL & STATS
   ======================================================== */
.history-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1000 !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.history-box {
  background: linear-gradient(180deg, #0e1e16 0%, #08120c 100%);
  border: 2px solid var(--gold-accent);
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.25);
  overflow: hidden;
}

.history-header {
  padding: 20px 24px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.history-crest {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 2px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.history-header h2 {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
}

.history-subtitle {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-top: 4px;
}

.history-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 6px;
}

.history-stat-box .stat-number {
  font-size: 1.3rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
}

.stat-gold { color: var(--gold-light); }
.stat-green { color: #10b981; }
.stat-red { color: #ef4444; }
.stat-cyan { color: #38bdf8; }

.history-stat-box .stat-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 2px;
}

.history-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-loading-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 30px;
}

.history-empty-card {
  text-align: center;
  padding: 40px 20px;
}

.history-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.history-empty-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.history-empty-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.history-match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}

.history-match-card.match-card-win {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.history-match-card.match-card-loss {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.history-result-badge {
  font-size: 0.78rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.badge-win {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #10b981;
}

.badge-loss {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.history-game-info {
  display: flex;
  flex-direction: column;
}

.history-game-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.history-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.history-opponent-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-vs-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.history-opp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-accent);
  object-fit: cover;
}

.history-opp-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

.history-score-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.history-score-text {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--gold-light);
  font-family: 'Outfit', sans-serif;
}

.history-details-pill {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.history-copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ========================================================
   3. CARD DROP, DEAL & CAPTURE ANIMATIONS
   ======================================================== */
.card-drop-anim {
  animation: cardDropBounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardDropBounce {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(1.15);
  }
  60% {
    opacity: 1;
    transform: translateY(4px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-deal-anim {
  animation: cardDealFade 0.35s ease-out both;
}

@keyframes cardDealFade {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-played-active {
  transform: translateY(-30px) scale(1.12) !important;
  box-shadow: 0 0 25px var(--gold-glow) !important;
  transition: all 0.15s ease-out !important;
}

.card-selected-play {
  transform: translateY(-18px) scale(1.08) !important;
  outline: 3px solid var(--gold-accent) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.6) !important;
  z-index: 20;
}

/* ========================================================
   4. SHAYEB GAME SPECIFIC STYLING
   ======================================================== */
.shayeb-center {
  flex-direction: column;
  gap: 16px;
}

.center-pile-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pile-card-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.deck-top-card {
  width: var(--card-width);
  height: var(--card-height);
  border-radius: 9px;
  border: 1px solid var(--gold-accent);
  box-shadow: 2px 2px 0 #0f172a, 4px 4px 0 #1e293b, 6px 6px 0 #334155, 0 10px 25px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.deck-top-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pile-count-badge {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.shayeb-guidance-pill {
  background: rgba(10, 22, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.shayeb-guidance-pill.my-turn-guidance {
  border-color: var(--gold-accent);
  color: var(--gold-light);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.shayeb-judgment-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1000 !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.shayeb-verdict-box {
  background: linear-gradient(180deg, #182218 0%, #0d140e 100%);
  border: 2px solid var(--gold-accent);
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(245, 158, 11, 0.3);
}

.shayeb-verdict-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.shayeb-verdict-penalty {
  background: rgba(239, 68, 68, 0.15);
  border: 1.5px dashed #ef4444;
  border-radius: 16px;
  padding: 16px;
  margin: 18px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.6;
}

/* ========================================================
   5. KAZZAB (CHEAT) GAME SPECIFIC STYLING
   ======================================================== */
.kazzab-center {
  flex-direction: column;
  gap: 14px;
}

.kazzab-pile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.last-claim-banner {
  background: rgba(10, 24, 18, 0.9);
  border: 1.5px solid var(--gold-accent);
  border-radius: 14px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.claim-speaker {
  font-size: 0.88rem;
  font-weight: 700;
  color: #94a3b8;
}

.claim-detail {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--gold-light);
}

.kazzab-doubt-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: 2px solid #f87171;
  border-radius: 24px;
  padding: 10px 24px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
  transition: all 0.25s ease;
}

.kazzab-doubt-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.7);
}

.kazzab-doubt-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.doubt-btn-pulse {
  animation: doubtPulseAnim 1.6s infinite;
}

@keyframes doubtPulseAnim {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(239, 68, 68, 0.5); }
  50% { transform: scale(1.06); box-shadow: 0 0 25px rgba(239, 68, 68, 0.9); }
  100% { transform: scale(1); box-shadow: 0 0 15px rgba(239, 68, 68, 0.5); }
}

.kazzab-controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 20, 14, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 18px;
  padding: 6px 14px;
}

.rank-select-input {
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid var(--gold-accent);
  color: var(--gold-light);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  outline: none;
}

.play-claim-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-family: inherit;
  font-weight: 900;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
}

.play-claim-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

.play-claim-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   FAST-CLICK & TOUCH OPTIMIZATIONS (Instant Response in Discord Activities)
   ========================================================================== */
button, .icon-btn, .btn-primary, .btn-secondary, .btn-rules, .chip-btn, .room-join-btn, .room-spec-btn, .bell-close-btn, .copy-code-btn, .btn-copy-code {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: pointer;
}

/* ==========================================================================
   LUXURY CINEMATIC LOADING SCREEN
   ========================================================================== */
.luxury-loading-screen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background-color: #030304 !important;
  background-image:
    radial-gradient(ellipse at center, rgba(15, 11, 7, 0.75) 0%, rgba(5, 4, 3, 0.96) 100%),
    url('/assets/images/lobby_luxury_casino_bg.jpg') !important;
  background-position: center center, center top !important;
  background-size: cover, cover !important;
  background-repeat: no-repeat, no-repeat !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.55s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  overflow: hidden !important;
}

.luxury-loading-screen.fade-out {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.loading-bg-glow {
  position: absolute !important;
  width: 600px !important;
  height: 600px !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(212, 168, 67, 0.12) 45%, transparent 70%) !important;
  filter: blur(60px) !important;
  pointer-events: none !important;
  animation: pulseLoadingGlow 3.5s ease-in-out infinite alternate !important;
}

@keyframes pulseLoadingGlow {
  0% { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1.25); opacity: 0.95; }
}

.loading-content {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  max-width: 520px !important;
  width: 90% !important;
  padding: 35px 30px !important;
  background: rgba(10, 8, 6, 0.7) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 28px !important;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.2) !important;
}

.loading-emblem-wrap {
  position: relative !important;
  width: 120px !important;
  height: 120px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 20px !important;
}

.loading-emblem-pulse-ring {
  position: absolute !important;
  inset: -10px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(245, 158, 11, 0.25) !important;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.3) !important;
  animation: pulseLoadingGlow 2.5s ease-in-out infinite alternate !important;
}

.loading-emblem-ring {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  border: 2px dashed rgba(245, 158, 11, 0.75) !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.45) !important;
  animation: rotateEmblemRing 10s linear infinite !important;
}

@keyframes rotateEmblemRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loading-emblem-3d-logo {
  position: relative !important;
  z-index: 2 !important;
  width: 90px !important;
  height: 90px !important;
  object-fit: contain !important;
  mix-blend-mode: screen !important;
  filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.8)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8)) !important;
  animation: floatEmblemLogo 2.8s ease-in-out infinite alternate !important;
}

@keyframes floatEmblemLogo {
  0% { transform: translateY(-4px) scale(0.97); }
  100% { transform: translateY(4px) scale(1.05); }
}

.loading-brand-tag {
  font-family: 'Cairo', 'Outfit', sans-serif !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.5px !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  padding: 4px 16px !important;
  border-radius: 9999px !important;
  margin-bottom: 12px !important;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.loading-main-title {
  font-family: 'Cairo', sans-serif !important;
  font-size: 1.85rem !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  margin: 0 0 20px 0 !important;
  background: linear-gradient(90deg, #f59e0b 0%, #ffffff 40%, #fef08a 60%, #f59e0b 100%) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  animation: shineLoadingTitle 2.5s linear infinite !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 20px rgba(245, 158, 11, 0.45)) !important;
}

@keyframes shineLoadingTitle {
  to { background-position: 200% center; }
}

.loading-bar-shell {
  position: relative !important;
  width: 100% !important;
  height: 12px !important;
  background: rgba(0, 0, 0, 0.8) !important;
  border-radius: 999px !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  overflow: hidden !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 15px rgba(245, 158, 11, 0.3) !important;
  margin-bottom: 14px !important;
}

.loading-bar-fill {
  height: 100% !important;
  width: 35% !important;
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 45%, #fef08a 80%, #ffffff 100%) !important;
  border-radius: 999px !important;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.95), 0 0 6px #ffffff !important;
  position: relative !important;
}

.loading-bar-shimmer {
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%) !important;
  background-size: 200% 100% !important;
  animation: barShimmerSweep 1.8s linear infinite !important;
  pointer-events: none !important;
}

@keyframes barShimmerSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loading-meta-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  font-family: 'Cairo', 'Outfit', sans-serif !important;
  color: rgba(255, 255, 255, 0.85) !important;
  direction: rtl !important;
}

.loading-status-msg {
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.loading-percent-label {
  font-family: 'Outfit', 'Cairo', sans-serif !important;
  color: #fde047 !important;
  font-weight: 900 !important;
  font-size: 0.92rem !important;
  text-shadow: 0 0 10px rgba(253, 224, 71, 0.7) !important;
  direction: ltr !important;
}

/* ==========================================================================
   CUSTOM ROOM CREATION MODAL
   ========================================================================== */
.create-room-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.room-setup-box {
  background: linear-gradient(150deg, rgba(16, 12, 8, 0.98) 0%, rgba(10, 7, 5, 0.99) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 22px 24px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.45) rgba(0, 0, 0, 0.25);
  direction: rtl !important;
}

.room-setup-box::-webkit-scrollbar {
  width: 6px;
}

.room-setup-box::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

.room-setup-box::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.45);
  border-radius: 4px;
}

.room-setup-box::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.75);
}

.setup-header-crest {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 2px;
  font-weight: 800;
  color: #fef08a;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(180, 83, 9, 0.3) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 14px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.room-setup-box h2 {
  font-size: 1.45rem;
  font-weight: 900;
  margin: 0 0 4px 0;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 15px rgba(245, 158, 11, 0.25);
}

.setup-section-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: #f59e0b;
  text-align: right;
  margin: 10px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.lang-en .setup-section-label {
  text-align: left;
}

.chips-selector-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.timer-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 8px;
}

.premium-setup-group {
  margin-top: 10px;
  margin-bottom: 10px;
}

.section-badge-icon {
  font-size: 1.15rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.chip-btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(245, 158, 11, 0.02) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.2);
  border-radius: 14px;
  padding: 8px 8px;
  color: #f1f5f9;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'Cairo', sans-serif;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.chip-btn:hover {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.1) 0%, rgba(180, 83, 9, 0.06) 100%);
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 14px rgba(245, 158, 11, 0.2);
}

.chip-btn.active {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.24) 0%, rgba(180, 83, 9, 0.18) 100%);
  border-color: #f59e0b;
  color: #fff;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4), inset 0 0 10px rgba(245, 158, 11, 0.12);
  transform: translateY(-1px);
}

.time-pill {
  padding: 8px 10px;
  gap: 3px;
}

.time-pill-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.time-pill-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.time-pill-main {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1.2;
}

.chip-btn.active .time-pill-main {
  color: #fef08a;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.time-pill-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1.2;
}

.chip-btn.active .time-pill-sub {
  color: #fbbf24;
}

.chip-icon {
  font-size: 1.35rem;
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease;
}

.chip-btn:hover .chip-icon {
  transform: scale(1.15);
}

.chip-title {
  font-size: 0.90rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1.2;
}

.chip-badge-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 1px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.chip-btn.active .chip-badge-sub {
  color: #fcd34d;
}

.setup-actions-row {
  display: flex;
  gap: 12px;
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #0f0c08;
  box-shadow: 0 -12px 25px rgba(10, 7, 5, 0.98);
  border-top: 1px solid rgba(245, 158, 11, 0.25);
  padding: 12px 0 2px;
  margin-top: auto;
  flex-shrink: 0;
}

.setup-actions-row button {
  flex: 1;
  padding: 12px;
  font-size: 0.95rem;
  border-radius: 12px;
  font-weight: 800;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: all 0.22s ease;
}

.setup-actions-row .btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  border: 1px solid #fbbf24;
  color: #000;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}

.setup-actions-row .btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
}

.setup-actions-row .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #e4e4e7;
}

.setup-actions-row .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fff;
}

/* ==========================================================================
   WAITING ROOM LOBBY SCREEN (Waiting for Players)
   ========================================================================== */
.waiting-lobby-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.waiting-lobby-card {
  background: linear-gradient(135deg, rgba(14, 28, 20, 0.95) 0%, rgba(6, 15, 10, 0.98) 100%);
  border: 2px solid var(--gold-accent);
  border-radius: 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(245, 158, 11, 0.3);
  padding: 28px 32px;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  text-align: center;
  color: #fff;
}

.waiting-badge-crest {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 14px;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 8px;
}

.waiting-game-title {
  font-size: 1.7rem;
  font-weight: 900;
  margin: 6px 0 14px 0;
  background: linear-gradient(135deg, #ffffff, #fef08a, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.waiting-room-code-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1.5px dashed var(--gold-accent);
  border-radius: 14px;
  padding: 8px 18px;
  margin-bottom: 16px;
}

.waiting-room-code-box .code-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.waiting-room-code-box .code-val {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold-light);
  letter-spacing: 2px;
}

.btn-copy-code {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-copy-code:hover {
  background: var(--gold-accent);
  color: #000;
}

.waiting-status-lead {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 22px;
}

.waiting-status-lead span {
  color: var(--gold-light);
  font-weight: 800;
}

.waiting-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.waiting-slot-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.waiting-slot-card.filled {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.waiting-slot-card.empty {
  border-style: dashed;
  opacity: 0.7;
}

.waiting-slot-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-accent);
}

.waiting-slot-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  font-size: 1.6rem;
  border-color: rgba(255, 255, 255, 0.2);
  animation: pulseEmptySlot 2s infinite ease-in-out;
}

@keyframes pulseEmptySlot {
  0% { transform: scale(0.95); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.6; }
}

.waiting-slot-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.waiting-slot-role {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.waiting-slot-role.host {
  background: rgba(245, 158, 11, 0.25);
  color: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.waiting-slot-role.ready {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.waiting-slot-role.empty {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.waiting-lobby-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.waiting-lobby-actions button {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
}

.start-bots-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

.cancel-waiting-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.cancel-waiting-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* =========================================================================
   5 Traditional Royal Games: Kout, Baloot, Hand, Trix, Dama
   ========================================================================= */

/* Action Modals (Bidding, Trump, Contracts) */
.baloot-action-modal,
.trix-action-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  pointer-events: auto;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  max-width: 95vw;
}

.kout-modal-card,
.baloot-modal-card,
.trix-modal-card {
  background: rgba(10, 24, 18, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid var(--gold-accent);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 28px rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  padding: 20px 28px;
  text-align: center;
  min-width: 320px;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.kout-modal-card h3,
.baloot-modal-card h3,
.trix-modal-card h3 {
  color: var(--gold-light);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.bid-sub, .contract-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.bids-btn-grid,
.suits-btn-grid,
.baloot-bid-grid,
.trix-contract-grid,
.kout-bid-grid,
.kout-trump-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.bid-btn, .suit-btn, .contract-btn, .kout-btn {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bid-btn:hover:not(:disabled), .suit-btn:hover:not(:disabled), .contract-btn:hover:not(:disabled), .kout-btn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.bid-btn:disabled, .kout-btn:disabled, .disabled-bid-btn {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn-baun, .btn-sun, .btn-complex {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 900;
  border: none;
}

.btn-pass {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* Badges */
.kout-round-badge,
.baloot-round-badge,
.trix-round-badge,
.dama-header-badge {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
}

.trump-badge, .mode-badge, .contract-badge {
  color: #34d399;
}

/* Jokers in Kout */
.kout-joker-badge {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 7px;
}

.kout-joker-badge.red-joker {
  color: #dc2626;
  border: 2px solid #dc2626;
}

.kout-joker-badge.black-joker {
  color: #1e293b;
  border: 2px solid #1e293b;
}

.joker-crown {
  font-size: 1.8rem;
}

.joker-title {
  font-size: 0.82rem;
  font-weight: 800;
}

/* Open Card in Baloot Bidding */
.baloot-open-bid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.open-card-label {
  font-size: 0.75rem;
  color: var(--gold-light);
  font-weight: 700;
}

/* Hand Center Docks */
.hand-center-dock {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
}

.hand-deck-slot, .hand-discard-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.can-draw-stock, .can-draw-discard {
  cursor: pointer;
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
  animation: pulseGlow 1.2s infinite alternate;
}

/* Trix Layout Board */
.trix-layout-board {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

.trix-suit-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 58px;
}

.trix-suit-icon {
  font-size: 1.6rem;
  color: var(--gold-light);
}

.trix-suit-cards {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trix-mini-card {
  padding: 3px 8px;
  background: #fff;
  color: #000;
  font-weight: 800;
  border-radius: 4px;
  font-size: 0.78rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Dama Board (الدامة الخليجية) */
.dama-board-container {
  padding: 12px;
  background: linear-gradient(135deg, #2b1d0c, #160f06);
  border: 3px solid #d97706;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(217, 119, 6, 0.35);
}

.dama-board-grid {
  display: grid;
  grid-template-columns: repeat(8, 48px);
  grid-template-rows: repeat(8, 48px);
  border: 2px solid #78350f;
}

.dama-square {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.dama-square.light-sq {
  background: #fef3c7;
}

.dama-square.dark-sq {
  background: #92400e;
}

.dama-square.target-step {
  background: rgba(16, 185, 129, 0.6) !important;
  cursor: pointer;
  box-shadow: inset 0 0 10px #10b981;
}

.dama-square.target-capture {
  background: rgba(239, 68, 68, 0.7) !important;
  cursor: pointer;
  box-shadow: inset 0 0 12px #ef4444;
  animation: pulseGlow 0.8s infinite alternate;
}

.dama-piece {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
  transition: all 0.2s ease;
  user-select: none;
}

.dama-piece.white-piece {
  background: radial-gradient(circle at 35% 35%, #ffffff, #d1d5db);
  border: 2px solid #9ca3af;
}

.dama-piece.black-piece {
  background: radial-gradient(circle at 35% 35%, #374151, #111827);
  border: 2px solid #000;
  color: #fff;
}

.dama-piece.has-legal-moves {
  cursor: pointer;
  border-color: #fbbf24;
  box-shadow: 0 0 12px #fbbf24;
}

.dama-piece.piece-selected {
  transform: scale(1.15);
  border-color: #10b981 !important;
  box-shadow: 0 0 20px #10b981 !important;
}

.dama-crown {
  font-size: 1.1rem;
}

/* Online Presence Badge Interactive Hover */
.presence-badge, #onlinePresenceBadge, #presenceAvatarsRow {
  cursor: pointer;
  transition: all 0.25s ease;
}

.presence-badge:hover, #onlinePresenceBadge:hover {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.5) !important;
  transform: translateY(-2px);
}

.presence-avatars-row:hover .presence-avatar-mini {
  transform: scale(1.1);
  border-color: #fbbf24 !important;
}

.presence-more-pill {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 12px;
  margin-right: -6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

/* Online Users Modal (اللاعبون المتصلون الآن) */
.online-users-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: rgba(0, 0, 0, 0.78) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.online-users-box {
  background: linear-gradient(145deg, rgba(14, 25, 18, 0.96), rgba(8, 14, 10, 0.98));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto !important;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.25);
  overflow: hidden;
  animation: popIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.online-modal-header {
  padding: 18px 24px 14px;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), transparent);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.online-brand-pill {
  align-self: flex-start;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold-accent);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 12px;
  letter-spacing: 1px;
}

.online-header-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.online-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-total-count-badge {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 3px 12px;
  border-radius: 20px;
}

.online-modal-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.online-users-list-container {
  padding: 14px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-accent) rgba(0, 0, 0, 0.5);
}

.online-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all 0.2s ease;
  gap: 12px;
}

.online-user-card:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateX(-3px);
}

.online-user-card.rank-top-1 {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(255, 255, 255, 0.04));
  border-color: #fbbf24;
}

.online-user-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.online-rank-num {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--gold-light);
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.online-avatar-shell {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.online-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(245, 158, 11, 0.5);
  display: block;
}

.online-green-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid #0d1e14;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.online-user-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.online-user-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-user-title {
  font-size: 0.74rem;
  color: var(--gold-light);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-user-stats-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.online-user-rp {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.online-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.online-status-badge.status-lobby {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.online-status-badge.status-playing {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.online-status-badge.status-waiting {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.online-spectate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: 1.5px solid #34d399;
  border-radius: 12px;
  padding: 4px 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 3px;
}

.online-spectate-btn:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #000;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.7);
}

/* Pagination Controls */
.online-pagination-bar {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background: var(--gold-accent);
  color: #000;
  border-color: #fbbf24;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
}

.page-indicator-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-light);
}

.online-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Custom Fawra (Target Score) Selection in Room Setup */
.custom-fawra-container {
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-fawra-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-fawra-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 14, 10, 0.9);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 6px 12px;
  transition: all 0.25s ease;
}

.custom-fawra-input-row:focus-within {
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.custom-fawra-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  width: 100%;
}

.custom-fawra-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
  font-weight: 500;
}

.btn-reset-fawra {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--gold-light);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-fawra:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.custom-fawra-helper {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Toast Notifications */
.toast-notifications-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999999;
  pointer-events: none;
}

.toast-item {
  background: linear-gradient(135deg, rgba(14, 25, 18, 0.97), rgba(8, 14, 10, 0.98));
  border: 1.5px solid var(--gold-accent);
  border-radius: 14px;
  padding: 12px 22px;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast-item.toast-success {
  border-color: #10b981;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.35);
}

.toast-item.toast-warning {
  border-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.35);
}

.toast-item.toast-fade-out {
  opacity: 0;
  transform: translateY(15px);
}

/* =========================================================================
   AUTHENTIC MULTI-PLAYER ROYAL TABLE SEATING, TRICK OWNERS & TURN BEACON
   ========================================================================= */

/* Seating Overlay around the Oval Table */
.table-other-seats {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 25;
}

/* Individual Seat Pod (Glassmorphic Luxury Pill) */
.table-seat-pod {
  position: absolute;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 22, 16, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 36px;
  padding: 6px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.table-seat-pod.is-turn-seat {
  border-color: #10b981;
  background: rgba(12, 32, 22, 0.95);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.65), 0 0 12px rgba(245, 158, 11, 0.4);
  transform: scale(1.04);
}

.seat-avatar-container {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.seat-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.seat-turn-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: #10b981;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: beaconPulse 1.2s infinite ease-in-out;
}

@keyframes beaconPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

.seat-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.seat-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.seat-name {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-team-badge {
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.seat-team-badge.partner {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #10b981;
  color: #6ee7b7;
}

.seat-team-badge.enemy {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.seat-stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--gold-light);
}

.seat-cards-badge {
  background: rgba(0, 0, 0, 0.45);
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.seat-score-badge {
  color: #e2e8f0;
}

/* Mini Card Fan next to Pod */
.seat-mini-hand {
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.seat-mini-card {
  width: 20px;
  height: 30px;
  margin-left: -12px;
  border-radius: 3px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  background: #1e293b;
  overflow: hidden;
}

.seat-mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Positioning for 4 Players (South, North, West, East) */
.seat-pos-4-north {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}
.seat-pos-4-north.is-turn-seat {
  transform: translateX(-50%) scale(1.05);
}

.seat-pos-4-west {
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
}
.seat-pos-4-west.is-turn-seat {
  transform: translateY(-50%) scale(1.05);
}

.seat-pos-4-east {
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
}
.seat-pos-4-east.is-turn-seat {
  transform: translateY(-50%) scale(1.05);
}

/* Positioning for 6 Players (Kout Bo 6) */
.seat-pos-6-north {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}
.seat-pos-6-north.is-turn-seat {
  transform: translateX(-50%) scale(1.05);
}

.seat-pos-6-nw {
  top: 22px;
  left: 28px;
}
.seat-pos-6-ne {
  top: 22px;
  right: 28px;
}
.seat-pos-6-sw {
  bottom: 125px;
  left: 28px;
}
.seat-pos-6-se {
  bottom: 125px;
  right: 28px;
}

/* Positioning for 5 Players (Hand 5) */
.seat-pos-5-nw {
  top: 16px;
  left: 18%;
}
.seat-pos-5-ne {
  top: 16px;
  right: 18%;
}
.seat-pos-5-w {
  top: 48%;
  left: 18px;
  transform: translateY(-50%);
}
.seat-pos-5-e {
  top: 48%;
  right: 18px;
  transform: translateY(-50%);
}

/* -------------------------------------------------------------
   Active Turn Beacon Bar
   ------------------------------------------------------------- */
.turn-announcer-beacon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 20px;
  border-radius: 20px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0 auto 8px;
  z-index: 20;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  user-select: none;
}

.turn-announcer-beacon.my-turn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.45));
  border: 1.5px solid #10b981;
  color: #a7f3d0;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.55);
  animation: myTurnBeaconGlow 1.4s infinite alternate;
}

@keyframes myTurnBeaconGlow {
  0% { transform: scale(1); box-shadow: 0 0 14px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1.04); box-shadow: 0 0 26px rgba(16, 185, 129, 0.85); }
}

.turn-announcer-beacon.other-turn {
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  color: #f1f5f9;
}

.turn-beacon-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.turn-beacon-target {
  color: var(--gold-light);
  font-weight: 900;
}

/* -------------------------------------------------------------
   Center Trick Played Cards with Player Owner Tags
   ------------------------------------------------------------- */
.trick-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.25s ease;
  margin: 0 4px;
}

.played-by-tag {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  z-index: 10;
  pointer-events: none;
}

.played-by-tag.is-me {
  background: rgba(16, 185, 129, 0.92);
  border: 1px solid #34d399;
  color: #ffffff;
}

.played-by-tag.is-partner {
  background: rgba(6, 95, 70, 0.92);
  border: 1px solid #10b981;
  color: #a7f3d0;
}

.played-by-tag.is-opp {
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f8fafc;
}

.played-by-tag .tag-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #fff;
}

/* -------------------------------------------------------------
   Trick Winner Celebration Announcement Popup
   ------------------------------------------------------------- */
.trick-winner-popup {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(20, 40, 28, 0.96), rgba(10, 24, 16, 0.98));
  border: 2px solid var(--gold-accent);
  border-radius: 24px;
  padding: 10px 24px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.8), 0 0 28px rgba(245, 158, 11, 0.6);
  z-index: 35;
  pointer-events: none;
  animation: trickPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes trickPop {
  0% { transform: translate(-50%, -40%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.trick-winner-trophy {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.8));
}

.trick-winner-content {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.trick-winner-title {
  font-family: 'Cairo', sans-serif;
  font-size: 0.82rem;
  color: var(--gold-light);
  font-weight: 700;
}

.trick-winner-name {
  font-family: 'Cairo', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

/* =============================================================
   Authentic VIP Baloot Styling (HUD, Sweeping, Badges, Bidding)
   ============================================================= */

/* VIP Scoreboard Panel (Lana vs Lahom / النشرة) */
.baloot-hud-panel {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(6, 16, 10, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 18px;
  padding: 6px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 16px rgba(245, 158, 11, 0.2);
  font-family: 'Cairo', sans-serif;
  user-select: none;
}

.baloot-team-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
}

.baloot-team-box.lana .team-title {
  color: #10b981;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.baloot-team-box.lahom .team-title {
  color: #ef4444;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.baloot-team-box .team-total-score {
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.baloot-team-box .team-abnat-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  margin-top: 2px;
}

.baloot-team-box.lana .team-abnat-pill {
  background: rgba(16, 185, 129, 0.22);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.baloot-team-box.lahom .team-abnat-pill {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.baloot-hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 8px;
  border-left: 1px solid rgba(245, 158, 11, 0.25);
  border-right: 1px solid rgba(245, 158, 11, 0.25);
}

.baloot-round-chip {
  font-size: 0.76rem;
  font-weight: 800;
  color: #fbbf24;
  white-space: nowrap;
}

.baloot-mode-chip {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.baloot-mode-chip.sun {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #f59e0b;
  color: #fef08a;
}
.baloot-mode-chip.hokom {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #10b981;
  color: #a7f3d0;
}
.baloot-mode-chip.bidding {
  background: rgba(148, 163, 184, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
}

.baloot-hud-btn-scorecard {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-size: 0.70rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.baloot-hud-btn-scorecard:hover {
  background: #f59e0b;
  color: #000;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

/* Dealer Star Token */
.dealer-star-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-size: 0.68rem;
  font-weight: 900;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 8px rgba(245, 158, 11, 0.8);
  z-index: 35;
  animation: starPulse 2s infinite ease-in-out;
}
@keyframes starPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(15deg); }
}

/* VIP Bidding Speech Bubbles */
.baloot-speech-bubble {
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.98));
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 4px 14px;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 14px rgba(251, 191, 36, 0.5);
  z-index: 50;
  pointer-events: none;
  animation: bubblePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.baloot-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px 7px 0 7px;
  border-style: solid;
  border-color: #fbbf24 transparent transparent transparent;
}
.baloot-speech-bubble.bubble-sun {
  border-color: #f59e0b;
  color: #fef08a;
}
.baloot-speech-bubble.bubble-hokom {
  border-color: #10b981;
  color: #a7f3d0;
}
.baloot-speech-bubble.bubble-ashkal {
  border-color: #3b82f6;
  color: #bfdbfe;
}
.baloot-speech-bubble.bubble-pass {
  border-color: #94a3b8;
  color: #cbd5e1;
}
.baloot-speech-bubble.bubble-double {
  border-color: #ef4444;
  color: #fca5a5;
  animation: bubblePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), doublePulse 1.2s infinite;
}

@keyframes bubblePop {
  0% { transform: translateX(-50%) scale(0.4); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}
@keyframes doublePulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 14px rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9), 0 0 24px rgba(239, 68, 68, 0.95); }
}

/* Floating Abnat Reward Badge */
.floating-abnat-badge {
  position: absolute;
  z-index: 70;
  padding: 6px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 2px solid #fff;
  color: #fff;
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.85), 0 0 20px rgba(16, 185, 129, 0.7);
  pointer-events: none;
  animation: floatUpFade 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes floatUpFade {
  0% { transform: translate(-50%, 0) scale(0.6); opacity: 0; }
  25% { transform: translate(-50%, -20px) scale(1.15); opacity: 1; }
  75% { transform: translate(-50%, -50px) scale(1); opacity: 0.95; }
  100% { transform: translate(-50%, -75px) scale(0.9); opacity: 0; }
}

/* Centered Trick Cards & VIP Cross Formation */
.baloot-ground {
  position: relative;
  width: 260px;
  height: 160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.baloot-ground .trick-card-wrap {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  bottom: auto !important;
  right: auto !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 10;
}

.baloot-ground .trick-card-wrap .card {
  width: 72px !important;
  height: 106px !important;
  min-width: 72px !important;
  min-height: 106px !important;
  border-radius: 7px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65) !important;
}

/* Cross formation positioning by player seat */
.baloot-ground .trick-card-wrap.pos-south {
  transform: translate(-50%, calc(-50% + 36px)) !important;
  z-index: 14;
}
.baloot-ground .trick-card-wrap.pos-north {
  transform: translate(-50%, calc(-50% - 42px)) !important;
  z-index: 11;
}
.baloot-ground .trick-card-wrap.pos-west {
  transform: translate(calc(-50% - 58px), -50%) !important;
  z-index: 12;
}
.baloot-ground .trick-card-wrap.pos-east {
  transform: translate(calc(-50% + 58px), -50%) !important;
  z-index: 13;
}

/* Trick Winning Card Highlight */
.baloot-ground .trick-card-wrap.winning-card-glow .card {
  border: 3px solid #fbbf24 !important;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.95), 0 8px 24px rgba(0, 0, 0, 0.85) !important;
  transform: scale(1.08);
}
.baloot-ground .trick-card-wrap .winner-crown-badge {
  position: absolute;
  top: -16px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 0 10px rgba(245, 158, 11, 0.7);
  z-index: 25;
  white-space: nowrap;
  animation: crownBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes crownBounce {
  0% { transform: translateY(-10px) scale(0.5); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Phase 1 of Sweeping: Group 4 Cards into a Neat Stack */
.baloot-ground .trick-card-wrap.sweep-gather {
  transform: translate(-50%, -50%) scale(0.96) !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,0.7);
}

/* Phase 2 of Sweeping: Smooth Flight to Winner */
.baloot-ground .trick-card-wrap.sweep-to-south {
  transform: translate(-50%, 280px) scale(0.22) rotate(14deg) !important;
  opacity: 0 !important;
  transition: transform 0.5s cubic-bezier(0.3, 0, 0.15, 1), opacity 0.4s ease !important;
}
.baloot-ground .trick-card-wrap.sweep-to-north {
  transform: translate(-50%, -280px) scale(0.22) rotate(-14deg) !important;
  opacity: 0 !important;
  transition: transform 0.5s cubic-bezier(0.3, 0, 0.15, 1), opacity 0.4s ease !important;
}
.baloot-ground .trick-card-wrap.sweep-to-west {
  transform: translate(-380px, -50%) scale(0.22) rotate(-22deg) !important;
  opacity: 0 !important;
  transition: transform 0.5s cubic-bezier(0.3, 0, 0.15, 1), opacity 0.4s ease !important;
}
.baloot-ground .trick-card-wrap.sweep-to-east {
  transform: translate(380px, -50%) scale(0.22) rotate(22deg) !important;
  opacity: 0 !important;
  transition: transform 0.5s cubic-bezier(0.3, 0, 0.15, 1), opacity 0.4s ease !important;
}

/* Doubling Action Bar */
.baloot-double-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
  z-index: 25;
}
.baloot-double-btn {
  padding: 6px 16px;
  border-radius: 14px;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  cursor: pointer;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.baloot-double-btn.btn-dbl {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: #fca5a5;
}
.baloot-double-btn.btn-three {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-color: #fde68a;
}
.baloot-double-btn.btn-four {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: #ddd6fe;
}
.baloot-double-btn.btn-qahwa {
  background: linear-gradient(135deg, #78350f, #451a03);
  border-color: #fbbf24;
}
.baloot-double-btn:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85), 0 0 16px rgba(255, 255, 255, 0.4);
}

/* Full Scorecard Modal */
.baloot-scorecard-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.baloot-scorecard-card {
  background: linear-gradient(135deg, rgba(10, 24, 16, 0.98), rgba(6, 15, 10, 0.99));
  border: 2px solid var(--gold-accent);
  border-radius: 20px;
  width: 95%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 35px rgba(245, 158, 11, 0.35);
  overflow: hidden;
  font-family: 'Cairo', sans-serif;
}
.baloot-scorecard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.3);
}
.baloot-scorecard-header h3 {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fbbf24;
  margin: 0;
}
.baloot-scorecard-header .scorecard-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.baloot-scorecard-body {
  padding: 14px 18px;
  overflow-y: auto;
}
.baloot-scorecard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.85rem;
}
.baloot-scorecard-table th {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  padding: 8px 6px;
  font-weight: 800;
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}
.baloot-scorecard-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
.baloot-scorecard-table tr:hover {
  background: rgba(255, 255, 255, 0.04);
}
.baloot-scorecard-table .cell-lana {
  color: #10b981;
  font-weight: 800;
}
.baloot-scorecard-table .cell-lahom {
  color: #ef4444;
  font-weight: 800;
}

/* Open Card & Bid styling */
.baloot-round-badge {
  display: none !important; /* replaced by baloot-hud-panel */
}

.baloot-open-bid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 8px;
  margin: 0 auto;
}
.baloot-open-bid-card .open-card-label {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 0.80rem;
  padding: 3px 12px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* VIP Baloot Bidding Dialog - Authentic VIP Style (Image 1) */
.baloot-action-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  z-index: 1000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}

.baloot-action-modal .vip-bid-dialog-card {
  pointer-events: auto !important;
}

/* Floating Abnat points badge completely hidden on trick gathering */
.floating-abnat-badge {
  display: none !important;
}

/* Baloot Hand Sort Button */
.btn-sort-baloot-hand {
  position: absolute !important;
  left: 20px !important;
  bottom: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  background: linear-gradient(135deg, rgba(20, 30, 48, 0.95), rgba(15, 23, 42, 0.98)) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.6) !important;
  border-radius: 20px !important;
  color: #fbbf24 !important;
  font-family: 'Cairo', 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), 0 0 12px rgba(245, 158, 11, 0.25) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 1060 !important;
  pointer-events: auto !important;
}
.btn-sort-baloot-hand:hover {
  transform: translateY(-2px) scale(1.05) !important;
  border-color: #fbbf24 !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(15, 23, 42, 0.98)) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85), 0 0 18px rgba(245, 158, 11, 0.5) !important;
  color: #fff !important;
}
.btn-sort-baloot-hand:active {
  transform: translateY(0) scale(0.96) !important;
}

.vip-bid-dialog-card {
  background: linear-gradient(180deg, #092975 0%, #061c52 100%);
  border: 2px solid #205bb8;
  border-radius: 18px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(32, 91, 184, 0.5);
  overflow: hidden;
  width: 440px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  user-select: none;
  font-family: 'Cairo', 'Cairo', sans-serif;
  animation: vipModalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.vip-bid-dialog-header {
  background: linear-gradient(180deg, #1b5bb5 0%, #0d3885 100%);
  border-bottom: 2px solid #3b82f6;
  padding: 11px 16px;
  text-align: center;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  position: relative;
}

.vip-bid-dialog-body {
  display: flex;
  flex-direction: row; /* Card on left, Buttons on right (Image 1) */
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 24px 20px;
  direction: ltr; /* Force Left-to-Right layout */
}

/* Left: Stacked Open Card */
.vip-bid-card-stack {
  position: relative;
  width: 142px;
  height: 206px;
  flex-shrink: 0;
}

.vip-bid-card-underlay-1 {
  position: absolute;
  inset: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: translate(-5px, 2px) rotate(-3deg);
  border: 1.5px solid #d1d5db;
  z-index: 1;
}

.vip-bid-card-underlay-2 {
  position: absolute;
  inset: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: translate(4px, 3px) rotate(2.5deg);
  border: 1.5px solid #d1d5db;
  z-index: 2;
}

.vip-bid-card-front {
  position: absolute;
  inset: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: block;
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
  z-index: 3;
}

.vip-bid-card-front .card {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  border: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.vip-bid-card-front img,
.vip-bid-card-front .card-svg-face {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  display: block !important;
  object-fit: fill !important;
  border-radius: 10px;
  pointer-events: none;
}

/* Right: Buttons Column (Image 1) */
.vip-bid-buttons-column {
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1;
  min-width: 170px;
  max-width: 205px;
}

.vip-bid-pill-btn {
  height: 48px;
  border-radius: 24px;
  font-family: 'Cairo', 'Cairo', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

/* Active Amber Pill (Image 1) */
.vip-bid-pill-btn.btn-amber {
  background: linear-gradient(180deg, #ea8a1e 0%, #cf6809 100%);
  border: 1.5px solid #b85400;
  box-shadow: 0 4px 0 #8c4200, 0 6px 12px rgba(0, 0, 0, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.45);
}

.vip-bid-pill-btn.btn-amber:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
  box-shadow: 0 6px 0 #8c4200, 0 8px 16px rgba(234, 138, 30, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.55);
}

.vip-bid-pill-btn.btn-amber:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 1px 0 #8c4200, inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Disabled Dark Brown Pill for Ashkal (Image 1) */
.vip-bid-pill-btn.btn-disabled {
  background: #685746 !important;
  border: 1.5px solid #544535 !important;
  color: #a49483 !important;
  cursor: not-allowed !important;
  opacity: 0.95 !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35) !important;
}

.vip-bid-pill-btn.btn-disabled:hover {
  transform: none !important;
  filter: none !important;
}

/* Round 2 Suit Choices */
.vip-bid-suits-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.vip-bid-suit-btn {
  padding: 8px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1b5bb5 0%, #0d3885 100%);
  border: 1.5px solid #3b82f6;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.vip-bid-suit-btn:hover {
  background: #2563eb;
  transform: scale(1.04);
}

/* VIP Baloot Round Scorecard Modal (Image 2) */
.vip-baloot-scorecard-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: vipFadeIn 0.2s ease-out;
}

.vip-scorecard-dialog {
  background: #09266e;
  border: 2px solid #205bb8;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(32, 91, 184, 0.6);
  width: 440px;
  max-width: 95vw;
  overflow: hidden;
  font-family: 'Cairo', 'Cairo', sans-serif;
  display: flex;
  flex-direction: column;
  animation: vipModalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Header: Blue bar with Trump symbol + "حكم" */
.vip-scorecard-header {
  background: #09266e;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  direction: ltr; /* Keeps suit symbol on left and "حكم" on right */
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.vip-scorecard-trump-sym {
  font-size: 1.8rem;
  line-height: 1;
}
.vip-scorecard-trump-sym.red {
  color: #dc2626;
}
.vip-scorecard-trump-sym.black {
  color: #ffffff;
}

/* Cream Table (Image 2) */
.vip-scorecard-table-wrap {
  background: #efe5cf;
  padding: 10px 16px 14px 16px;
}

.vip-scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Cairo', sans-serif;
  direction: rtl; /* RTL: Row names on right, Lahom center, Lana left */
}

.vip-scorecard-table th {
  padding: 10px 8px;
  color: #09266e !important;
  font-size: 1.45rem;
  font-weight: 900;
  text-align: center;
  border-bottom: 1.5px solid #d8caa7;
}

.vip-scorecard-table td {
  padding: 9px 6px;
  color: #09266e !important;
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  border-bottom: 1px solid #d8caa7;
}

.vip-scorecard-table td.col-label {
  text-align: right;
  font-weight: 900;
  font-size: 1.35rem;
  color: #09266e !important;
  width: 30%;
}

.vip-scorecard-table td.cell-proj {
  color: #d97706 !important;
  font-size: 1.25rem;
  font-weight: 900;
}

.proj-baloot-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  direction: ltr; /* Keeps ♦ K Q +20 in correct order */
}
.proj-baloot-tag .proj-sym.red {
  color: #dc2626;
  font-size: 1.4rem;
  font-weight: 900;
}
.proj-baloot-tag .proj-sym.black {
  color: #09266e;
  font-size: 1.4rem;
  font-weight: 900;
}
.proj-baloot-tag .proj-card {
  color: #09266e;
  font-weight: 900;
  font-size: 1.25rem;
}
.proj-baloot-tag .proj-score {
  color: #16a34a;
  font-weight: 900;
  font-size: 1.3rem;
}

.proj-named-tag {
  color: #d97706 !important;
  font-weight: 900;
  font-size: 1.25rem;
  display: inline-block;
  line-height: 1.3;
}

/* Highlight Orange Bar for "النتيجة" (Image 2) */
.vip-scorecard-table tr.row-result td {
  background: #e08309;
  color: #ffffff !important;
  font-size: 1.55rem;
  font-weight: 900;
  border: none;
  padding: 10px 6px;
}

.vip-scorecard-table tr.row-result td.col-label {
  font-size: 1.45rem;
  font-weight: 900;
}

/* Footer Section (Image 2) */
.vip-scorecard-footer {
  background: #09266e;
  padding: 16px 16px 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.vip-scorecard-outcome {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.vip-scorecard-outcome.won {
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.vip-scorecard-outcome.lost {
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.vip-scorecard-countdown {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  direction: rtl;
}

/* =========================================================================
   VIP Baloot Projects Declaration Bar (Image 3)
   ========================================================================= */
.vip-projects-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 8px;
  z-index: 60;
  direction: ltr; /* Keeps buttons in exact [400 | 100 | 50 | سرا] order matching Image 3 */
  animation: vipProjectsBarSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes vipProjectsBarSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.vip-proj-pill {
  min-width: 82px;
  height: 35px;
  padding: 0 13px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #ea8a1e 0%, #cf6809 100%);
  border: 1.5px solid #ffcc66;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1.5px 2px rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-family: 'Alexandria', 'Cairo', 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
  cursor: default;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  outline: none;
}

.vip-proj-pill .proj-sep {
  opacity: 0.85;
  font-weight: 400;
  margin: 0 2px;
}

.vip-proj-pill.zero-count,
.vip-proj-pill:disabled {
  opacity: 0.98;
  cursor: default;
}

.vip-proj-pill.active-has-proj {
  cursor: pointer;
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 45%, #d97706 100%);
  border-color: #fef08a;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.9), inset 0 2px 2px rgba(255, 255, 255, 0.9);
  animation: vipProjGlow 1.6s infinite alternate;
  transform: translateY(-2px);
}

.vip-proj-pill.active-has-proj:hover {
  transform: translateY(-4px) scale(1.06);
  filter: brightness(1.15);
}

.vip-proj-pill.active-has-proj:active {
  transform: translateY(0) scale(0.98);
}

.vip-proj-pill.declared {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-color: #a7f3d0;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
  cursor: default;
}

@keyframes vipProjGlow {
  0% {
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  }
  100% {
    box-shadow: 0 0 22px rgba(251, 191, 36, 0.95), 0 0 35px rgba(245, 158, 11, 0.7), inset 0 2px 2px #fff;
  }
}

/* Floating Project Announcement Toast */
.vip-project-announce-toast {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 100%);
  border: 2px solid #f59e0b;
  border-radius: 9999px;
  padding: 10px 28px;
  color: #fef08a;
  font-family: 'Cairo', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.6);
  z-index: 1000;
  direction: rtl;
  animation: vipToastPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes vipToastPop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.vip-project-announce-toast.fade-out {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: all 0.4s ease;
}

@keyframes vipModalPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes vipFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.baloot-splash-banner {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 120;
  pointer-events: none;
  animation: bannerPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.baloot-banner-content {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.98));
  border: 2px solid #fff;
  border-radius: 30px;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #000;
  font-family: 'Cairo', sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 158, 11, 0.8);
}
@keyframes bannerPop {
  0% { transform: translate(-50%, -30%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.illegal-card-dim {
  opacity: 1 !important;
  cursor: not-allowed !important;
  filter: brightness(0.68) saturate(0.85) !important;
  transform: translateY(4px) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}

/* =============================================================
   Hand Rummy (لعبة الهند) - Multi-Card Selection & Action Bar
   ============================================================= */
.card.card-selected {
  transform: translateY(-26px) scale(1.08) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.9), 0 0 24px #fbbf24, 0 0 10px #f59e0b !important;
  border: 2px solid #fbbf24 !important;
  z-index: 50 !important;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.card-select-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  z-index: 10;
  border: 1.5px solid #fff;
}

.hand-cards-rack {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 10px 14px !important;
  min-height: 140px !important;
  position: relative !important;
  overflow: visible !important;
  direction: ltr !important;
}

.hand-cards-rack .card {
  margin-left: -28px !important;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease !important;
  box-shadow: -4px 0 14px rgba(0, 0, 0, 0.6) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.hand-cards-rack .card:first-child {
  margin-left: 0 !important;
}

.hand-cards-rack .card:hover:not(.card-selected) {
  transform: translateY(-16px) scale(1.05) !important;
  z-index: 35 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.75) !important;
}

/* Compact Hand Action Bar docked on bottom-right (Zero empty space) */
.hand-action-bar {
  position: absolute !important;
  right: 18px !important;
  bottom: 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  background: rgba(8, 20, 14, 0.95) !important;
  border: 1.5px solid var(--gold-accent) !important;
  border-radius: 16px !important;
  padding: 8px 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 16px rgba(245, 158, 11, 0.3) !important;
  backdrop-filter: blur(12px) !important;
  z-index: 35 !important;
  width: fit-content !important;
  max-width: 330px !important;
  min-width: 220px !important;
  height: auto !important;
  margin: 0 !important;
}

.hand-action-bar-top {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}

.action-bar-status-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-count-chip {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 12px;
  padding: 3px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-chip {
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-chip.chip-valid {
  background: rgba(16, 185, 129, 0.25);
  border: 1.5px solid #10b981;
  color: #6ee7b7;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.status-chip.chip-invalid {
  background: rgba(239, 68, 68, 0.2);
  border: 1.5px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

.down-threshold-chip {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--gold-light);
  border-radius: 12px;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 800;
}

.down-threshold-chip.threshold-met {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #a7f3d0;
}

/* Staged Basket for 51+ Down */
.staged-basket-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 6px 12px;
}

.basket-title {
  font-size: 0.8rem;
  color: var(--gold-light);
  font-weight: 800;
}

.staged-meld-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.3);
  border: 1px solid #10b981;
  color: #fff;
  border-radius: 14px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.btn-remove-staged {
  background: rgba(239, 68, 68, 0.4);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.65rem;
}

.btn-remove-staged:hover {
  background: #ef4444;
}

.staged-total-badge {
  font-size: 0.82rem;
  color: #fbbf24;
  font-weight: 800;
  margin-right: auto;
}

/* Action Buttons Group */
.action-buttons-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.btn-hand-action {
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.btn-stage-meld {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  border: 1px solid #fbbf24;
}
.btn-stage-meld:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.btn-confirm-meld {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  border: 1.5px solid #34d399;
}
.btn-confirm-meld:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-discard-card {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border: 1px solid #f87171;
}
.btn-discard-card:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5);
}

.btn-hand-util {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-family: 'Cairo', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}
.btn-hand-util:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: var(--gold-accent);
  color: var(--gold-light);
  transform: translateY(-1px);
}

.btn-clear-sel {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
}
.btn-clear-sel:hover {
  background: rgba(239, 68, 68, 0.35) !important;
}

/* -------------------------------------------------------------
   Active Table Melds Tray
   ------------------------------------------------------------- */
.hand-melds-tray {
  width: 96%;
  max-width: 900px;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 6px 12px;
  margin: 6px auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hand-melds-tray-header {
  font-size: 0.78rem;
  color: var(--gold-light);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hand-melds-container {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 6px;
  min-height: 80px;
}

.empty-melds-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
  margin: auto;
}

.table-meld-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.table-meld-card.can-attach-target {
  border: 2px solid #10b981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6), 0 6px 16px rgba(0, 0, 0, 0.8) !important;
  background: rgba(6, 78, 59, 0.45) !important;
  cursor: pointer !important;
  transform: scale(1.04);
}

.meld-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--gold-light);
}

.meld-owner {
  font-weight: 800;
  color: #fff;
}

.meld-type-tag {
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-quick-attach {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  animation: pulseGlow 1s infinite alternate;
}

.meld-cards-fan {
  display: flex;
  align-items: center;
}

.meld-cards-fan .card {
  width: 42px !important;
  height: 62px !important;
  margin-left: -18px !important;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.5) !important;
}

.meld-cards-fan .card:first-child {
  margin-left: 0 !important;
}

/* ==============================================================
   Universal Interactive Card Selection & Drag-and-Drop System
   ============================================================== */

/* Selected card state (Toggle on click) */
.card.selected,
.domino-tile.selected {
  transform: translateY(-26px) scale(1.07) !important;
  outline: 3px solid var(--gold-accent, #f59e0b) !important;
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.85), 0 0 28px rgba(245, 158, 11, 0.75) !important;
  z-index: 60 !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease !important;
}

/* Source card while actively being dragged */
.card.card-is-dragging,
.domino-tile.tile-is-dragging {
  opacity: 0.25 !important;
  filter: grayscale(0.6) !important;
}

/* Isolated Fixed Drag Ghost Overlay Layer */
#cardDragGhostLayer {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 9999999 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

/* Floating Drag Clone / Ghost across all games */
.card-drag-floating-ghost,
#cardDragGhostLayer .card-drag-floating-ghost,
#cardDragGhostLayer .card,
#cardDragGhostLayer .domino-tile,
#cardDragGhostLayer .uno-card-element {
  position: fixed !important;
  pointer-events: none !important;
  z-index: 9999999 !important;
  margin: 0 !important;
  margin-left: 0 !important;
  padding: 0 !important;
  touch-action: none !important;
  transform: translate(-50%, -50%) scale(1.1) rotate(2.5deg) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.85), 0 0 32px rgba(245, 158, 11, 0.8) !important;
  transition: none !important;
  will-change: transform, left, top !important;
}

.card-drag-floating-ghost.snapping-back,
#cardDragGhostLayer .card-drag-floating-ghost.snapping-back {
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transform: translate(-50%, -50%) scale(1) rotate(0deg) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5) !important;
}

/* Cancel Drag Zone Capsule (منطقة إلغاء السحب والإرجاع لليد - بعيدة عن الكروت) */
.card-drag-cancel-zone {
  position: fixed !important;
  bottom: 215px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(20px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 5px 16px !important;
  background: rgba(15, 23, 42, 0.94) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1.5px dashed rgba(239, 68, 68, 0.65) !important;
  border-radius: 999px !important;
  color: #fca5a5 !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), 0 0 18px rgba(239, 68, 68, 0.3) !important;
  user-select: none !important;
}

.card-drag-cancel-zone.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
}

.card-drag-cancel-zone.drag-over-cancel {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.32) !important;
  transform: translateX(-50%) translateY(-4px) scale(1.06) !important;
  box-shadow: 0 14px 35px rgba(239, 68, 68, 0.5), 0 0 25px rgba(239, 68, 68, 0.7) !important;
  color: #ffffff !important;
}

.cancel-zone-icon {
  font-size: 1rem !important;
  animation: bounceCancelIcon 0.8s infinite alternate ease-in-out !important;
}

@keyframes bounceCancelIcon {
  from { transform: translateY(0); }
  to { transform: translateY(-3px); }
}

.cancel-zone-title {
  letter-spacing: -0.2px;
}

/* Play Area Drop Target State */
.table-drag-active-target {
  outline: 3px dashed rgba(16, 185, 129, 0.75) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border-radius: 18px !important;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.35) !important;
  transition: all 0.2s ease !important;
}

.table-drag-active-target.drag-over-play {
  outline-color: #34d399 !important;
  outline-width: 4px !important;
  background: rgba(16, 185, 129, 0.25) !important;
  box-shadow: 0 0 55px rgba(52, 211, 153, 0.65) !important;
  transform: scale(1.02);
}

/* =========================================================================
   Universal Card Fan & Hand Scaling Protection (Anti-Squish / Barcode Bug Fix)
   ========================================================================= */
.opponent-cards-fan {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  max-width: 85vw !important;
  overflow: visible !important;
  direction: ltr !important;
}

.opponent-cards-fan .card {
  flex-shrink: 0 !important;
  width: var(--card-width) !important;
  height: var(--card-height) !important;
  min-width: var(--card-width) !important;
  min-height: var(--card-height) !important;
  transform: scale(0.50) translateY(-14px) !important;
  box-shadow: -3px 5px 12px rgba(0, 0, 0, 0.75) !important;
  transition: transform 0.25s ease !important;
  transform-origin: top center !important;
}

.my-cards-rack {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  max-width: 90vw !important;
  padding: 0 10px !important;
  overflow: visible !important;
  direction: ltr !important;
}

.my-cards-rack .card {
  flex-shrink: 0 !important;
  width: var(--card-width) !important;
  height: var(--card-height) !important;
  min-width: var(--card-width) !important;
  min-height: var(--card-height) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
}

/* =========================================================================
   Kazzab Game Table & Center Elements
   ========================================================================= */
.kazzab-table {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: 100% !important;
  width: 100% !important;
  position: relative !important;
  box-sizing: border-box !important;
  padding: 6px 16px !important;
}

.kazzab-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  margin: auto 0 !important;
  gap: 10px !important;
  z-index: 20 !important;
}

.kazzab-pile-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(8, 20, 14, 0.72) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 20px !important;
  padding: 12px 28px !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7) !important;
}

.pile-card-stack {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.deck-top-card {
  width: 58px !important;
  height: 86px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
}

.deck-top-card img.pile-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.pile-count-badge {
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1.5px solid var(--gold-accent) !important;
  color: var(--gold-light) !important;
  font-weight: 800 !important;
  font-size: 0.9rem !important;
  padding: 4px 14px !important;
  border-radius: 16px !important;
  letter-spacing: -0.2px !important;
}

.last-claim-banner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.5)) !important;
  border: 1.5px solid var(--gold-accent) !important;
  border-radius: 12px !important;
  padding: 6px 18px !important;
  color: #fff !important;
  font-size: 0.86rem !important;
}

.last-claim-banner strong {
  color: var(--gold-light) !important;
}

.empty-claim-hint {
  color: var(--text-muted) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
}

.kazzab-challenge-row {
  margin-top: 4px !important;
}

.kazzab-doubt-btn {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 1rem !important;
  padding: 9px 24px !important;
  border-radius: 16px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
  cursor: pointer !important;
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.5) !important;
  transition: all 0.2s ease !important;
}

.kazzab-doubt-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.04) !important;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.75) !important;
}

.kazzab-doubt-btn:disabled {
  background: rgba(100, 116, 139, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.kazzab-doubt-btn.doubt-btn-pulse:not(:disabled) {
  animation: pulseDoubt 1.2s infinite alternate ease-in-out !important;
}

.kazzab-play-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  background: rgba(10, 22, 16, 0.9) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  border-radius: 20px !important;
  padding: 6px 18px !important;
  margin-bottom: 8px !important;
  z-index: 30 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

.claim-rank-picker {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.toolbar-label {
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  color: var(--gold-light) !important;
}

.rank-select-input {
  background: #0f2318 !important;
  color: #fff !important;
  border: 1.5px solid var(--gold-accent) !important;
  border-radius: 10px !important;
  padding: 4px 12px !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
}

.play-claim-btn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 800 !important;
  padding: 7px 20px !important;
  border-radius: 12px !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.play-claim-btn:disabled {
  background: rgba(100, 116, 139, 0.3) !important;
  color: rgba(255, 255, 255, 0.4) !important;
  cursor: not-allowed !important;
}

/* =========================================================================
   Kazzab Challenge Reveal Modal (Fixed Centered Popup with Constrained Cards)
   ========================================================================= */
.kazzab-reveal-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  pointer-events: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.kazzab-reveal-modal .reveal-box {
  background: linear-gradient(145deg, rgba(14, 25, 18, 0.98), rgba(8, 14, 10, 0.99)) !important;
  border: 2px solid var(--gold-accent) !important;
  border-radius: 24px !important;
  padding: 24px 32px !important;
  max-width: 480px !important;
  width: 90% !important;
  max-height: calc(100vh - 36px) !important;
  max-height: calc(100dvh - 36px) !important;
  margin: auto !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  text-align: center !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.3) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.kazzab-reveal-modal .reveal-box.lie-caught {
  border-color: #ef4444 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(239, 68, 68, 0.45) !important;
}

.kazzab-reveal-modal .reveal-box.truth-proven {
  border-color: #10b981 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(16, 185, 129, 0.45) !important;
}

.kazzab-reveal-modal .reveal-box h2 {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  margin: 0 !important;
}

.kazzab-reveal-modal .reveal-claim-text {
  font-size: 0.92rem !important;
  color: var(--gold-light) !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.kazzab-reveal-modal .revealed-cards-row {
  display: flex !important;
  gap: 10px !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  margin: 8px 0 !important;
  max-width: 100% !important;
}

.kazzab-reveal-modal .revealed-card-thumb {
  width: 72px !important;
  height: 108px !important;
  min-width: 72px !important;
  min-height: 108px !important;
  max-width: 72px !important;
  max-height: 108px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7) !important;
  border: 2px solid var(--gold-accent) !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.kazzab-reveal-modal .revealed-card-thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

.kazzab-reveal-modal .penalty-consequence {
  font-size: 0.88rem !important;
  color: #f1f5f9 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

/* =========================================================================
   Shayeb Judgment Modal (Fixed Centered Popup)
   ========================================================================= */
.shayeb-judgment-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  pointer-events: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.shayeb-judgment-modal .judgment-box {
  background: linear-gradient(145deg, rgba(14, 25, 18, 0.98), rgba(8, 14, 10, 0.99)) !important;
  border: 2px solid var(--gold-accent) !important;
  border-radius: 24px !important;
  padding: 24px 32px !important;
  max-width: 480px !important;
  width: 90% !important;
  max-height: calc(100vh - 36px) !important;
  max-height: calc(100dvh - 36px) !important;
  margin: auto !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  text-align: center !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.3) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.shayeb-crown-icon {
  font-size: 2.5rem !important;
}

.loser-announcement {
  font-size: 0.95rem !important;
  color: #fca5a5 !important;
}

.winner-congrats {
  font-size: 0.9rem !important;
  color: #6ee7b7 !important;
}

.egyptian-penalty-card {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1.5px dashed var(--gold-accent) !important;
  border-radius: 14px !important;
  padding: 10px 18px !important;
  margin: 6px 0 !important;
}

.penalty-title {
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  color: var(--gold-light) !important;
}

.penalty-text {
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  color: #fff !important;
  margin-top: 4px !important;
}

/* ==============================================================
   Jawaker Style Hand Rummy & In-Hand Drag Reordering System
   ============================================================== */

/* In-Hand Card Drag & Reorder preview target */
.card.card-drag-insert-target {
  transform: translateY(-16px) scale(1.06) !important;
  outline: 2.5px dashed #f59e0b !important;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.85) !important;
  z-index: 70 !important;
  transition: transform 0.15s ease, outline 0.15s ease !important;
}

/* Jawaker Hand - Two-Row Rack Layout (compact, stylish, never overlaps avatars) */
.hand-two-row-rack {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0 !important;
  padding: 4px 10px 8px 10px !important;
  position: relative !important;
  width: auto !important;
  max-width: 650px !important;
  margin: 0 auto !important;
  overflow: visible !important;
  z-index: 20 !important;
  direction: ltr !important;
}

.hand-cards-row {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  position: relative !important;
  width: auto !important;
  min-height: 60px !important;
  overflow: visible !important;
  direction: ltr !important;
}

.hand-row-top {
  z-index: 15 !important;
  margin-bottom: -54px !important; /* Row 2 overlaps lower half, leaving 60px visible on top row */
}

.hand-row-bottom {
  z-index: 30 !important;
}

.hand-cards-row .card {
  width: 76px !important;
  height: 114px !important;
  margin-left: -22px !important;
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.18s ease !important;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.6) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  position: relative !important;
  user-select: none !important;
  touch-action: none !important;
}

.hand-cards-row .card:first-child {
  margin-left: 0 !important;
}

.hand-cards-row .card:hover:not(.card-selected):not(.selected) {
  transform: translateY(-16px) scale(1.08) !important;
  z-index: 45 !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.8) !important;
}

.hand-cards-row .card.card-selected,
.hand-cards-row .card.selected {
  transform: translateY(-24px) scale(1.08) !important;
  outline: 3px solid #f59e0b !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(245, 158, 11, 0.7) !important;
  z-index: 55 !important;
}

/* Meld Corner Tabs - Jawaker style (علامات البير المتطابقة في زاوية الكارت - يمين علوي بدون حجب الرقم) */
.meld-corner-tab {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 18px solid var(--tab-color, #ef4444) !important;
  border-left: 18px solid transparent !important;
  border-top-right-radius: 6px !important;
  z-index: 8 !important;
  pointer-events: none !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)) !important;
  transition: border-color 0.2s ease !important;
}

.meld-corner-tab.color-0 { --tab-color: #ef4444; } /* Vibrant Red (Run 1 / Pair 1) */
.meld-corner-tab.color-1 { --tab-color: #10b981; } /* Emerald Green (Run 2 / Pair 2) */
.meld-corner-tab.color-2 { --tab-color: #0ea5e9; } /* Sky Blue (Run 3) */
.meld-corner-tab.color-3 { --tab-color: #f59e0b; } /* Amber Gold (Run 4) */
.meld-corner-tab.color-4 { --tab-color: #8b5cf6; } /* Royal Purple (Run 5) */

/* Hand Table Center & Recessed Tray (Dead-Centered on Table Felt) */
.hand-table .hand-center {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Restored & enlarged discard card in Hand center tray to clear, comfortable size */
#discardTopCardSlot .card {
  width: 68px !important;
  height: 100px !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  margin: 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

.hand-table .mini-deck,
#stockDeckSlot .mini-deck {
  width: 68px !important;
  height: 100px !important;
  border-radius: 8px !important;
}

.hand-table .jawaker-center-tray,
.jawaker-center-tray,
#jawakerCenterTray {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: rgba(8, 18, 12, 0.94) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  border-radius: 18px !important;
  padding: 8px 18px !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 18px rgba(245, 158, 11, 0.25) !important;
  z-index: 15 !important;
}

.jawaker-tray-cards-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
}

.tray-slot-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  position: relative !important;
  cursor: pointer !important;
}

.tray-draw-arrow {
  color: #34d399 !important;
  font-size: 1.2rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  animation: bounceDown 1.2s infinite ease-in-out !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) !important;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.jawaker-tooltip-bubble {
  display: none !important;
}

#handTurnBeacon {
  position: absolute !important;
  top: calc(50% + 76px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 25 !important;
  pointer-events: none !important;
}

@media (max-height: 750px) {
  #handTurnBeacon {
    top: calc(50% + 66px) !important;
    font-size: 0.84rem !important;
    padding: 4px 16px !important;
  }
}

/* Jawaker Table Melds: Horizontal / Vertical docks positioned in front of each player seat */
.hand-seat-melds-container {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 16 !important;
}

.hand-seat-melds {
  position: absolute !important;
  pointer-events: auto !important;
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
}

/* North player melds (Top - comfortably below North seat pod with zero overlap) */
.hand-seat-melds.seat-north {
  top: 58px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  flex-direction: row !important;
  justify-content: center !important;
  max-width: 650px !important;
  z-index: 18 !important;
}

.hand-table .table-seat-pod.seat-pos-4-north {
  top: 2px !important;
  max-height: 52px !important;
  height: 50px !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: 2px 12px !important;
  border-radius: 20px !important;
  gap: 8px !important;
  z-index: 38 !important;
}

.hand-table .table-seat-pod.seat-pos-4-north .seat-avatar {
  width: 36px !important;
  height: 36px !important;
}

.hand-table .table-seat-pod.seat-pos-4-north .seat-mini-hand {
  display: none !important;
}

/* West player melds (Left - comfortably clear of West seat pod) */
.hand-seat-melds.seat-west {
  top: 50% !important;
  left: 240px !important;
  transform: translateY(-50%) !important;
  flex-direction: column !important;
  justify-content: center !important;
  max-height: 380px !important;
  z-index: 18 !important;
}

/* East player melds (Right - comfortably clear of East seat pod) */
.hand-seat-melds.seat-east {
  top: 50% !important;
  right: 240px !important;
  transform: translateY(-50%) !important;
  flex-direction: column !important;
  justify-content: center !important;
  max-height: 380px !important;
  z-index: 18 !important;
}

/* South player melds (Me - positioned cleanly below turn beacon and above hand rack) */
.hand-seat-melds.seat-south {
  top: 368px !important;
  bottom: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  flex-direction: row !important;
  justify-content: center !important;
  max-width: 760px !important;
  z-index: 18 !important;
}

@media (max-height: 750px) {
  .hand-seat-melds.seat-north {
    top: 53px !important;
  }
  .hand-table .jawaker-center-tray,
  #jawakerCenterTray {
    top: 48% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
  }
  #handTurnBeacon {
    top: calc(48% + 64px) !important;
    font-size: 0.8rem !important;
    padding: 3px 12px !important;
  }
  .hand-seat-melds.seat-south {
    top: 320px !important;
  }
  .jawaker-meld-group .card {
    width: 38px !important;
    height: 54px !important;
  }
}

@media (max-width: 1200px) {
  .hand-seat-melds.seat-west {
    left: 210px !important;
  }
  .hand-seat-melds.seat-east {
    right: 210px !important;
  }
}

/* NW and NE for 5 players */
.hand-seat-melds.seat-nw {
  top: 90px !important;
  left: 20% !important;
  transform: translateX(-50%) !important;
}

.hand-seat-melds.seat-ne {
  top: 90px !important;
  right: 20% !important;
  transform: translateX(50%) !important;
}

/* Meld Group Card Container */
.jawaker-meld-group {
  display: flex !important;
  flex-direction: column !important;
  background: rgba(10, 15, 26, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 8px !important;
  padding: 3px 5px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  transition: all 0.2s ease !important;
  cursor: default !important;
  pointer-events: auto !important;
  backdrop-filter: blur(4px) !important;
}

.jawaker-meld-group:hover {
  background: rgba(16, 24, 40, 0.85) !important;
  border-color: rgba(255, 215, 0, 0.5) !important;
}

.jawaker-meld-group.can-attach-target {
  border-color: #10b981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.85) !important;
  background: rgba(16, 185, 129, 0.22) !important;
  cursor: pointer !important;
  animation: attachPulse 1.4s infinite ease-in-out !important;
}

@keyframes attachPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.meld-header-tag {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
  padding: 1px 4px !important;
  margin-bottom: 2px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  pointer-events: none !important;
}

.meld-player-label {
  color: #f59e0b !important;
  max-width: 90px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.meld-info-tag {
  color: #94a3b8 !important;
  font-size: 10px !important;
}

.meld-cards-row {
  display: flex !important;
  align-items: center !important;
  direction: ltr !important;
}

/* Compact meld cards - 42px x 60px - perfectly proportioned and zero overlap */
.jawaker-meld-group .card {
  width: 42px !important;
  height: 60px !important;
  margin-left: -18px !important;
  box-shadow: -3px 0 8px rgba(0, 0, 0, 0.7) !important;
  pointer-events: auto !important;
  position: relative !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  border-radius: 6px !important;
  cursor: pointer !important;
}

.jawaker-meld-group .card:first-child {
  margin-left: 0 !important;
}

.jawaker-meld-group .card:hover {
  transform: translateY(-6px) scale(1.08) !important;
  z-index: 50 !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.85) !important;
}

/* Joker in table melds */
.jawaker-meld-group .card.jawaker-table-joker {
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.9), -3px 0 8px rgba(0, 0, 0, 0.7) !important;
  border: 1.5px solid #f59e0b !important;
  z-index: 20 !important;
}

.jawaker-meld-group .card.can-swap-active {
  box-shadow: 0 0 20px rgba(52, 211, 153, 1), 0 0 30px rgba(16, 185, 129, 0.8) !important;
  border: 2px solid #34d399 !important;
  cursor: pointer !important;
  animation: swapJokerPulse 1.2s infinite ease-in-out !important;
}

@keyframes swapJokerPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.08); }
}

.joker-swap-badge-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.8);
  border: 1px solid #6ee7b7;
  pointer-events: none;
  z-index: 60;
  animation: bounceDown 1.2s infinite ease-in-out;
}

/* Retract card styling */
.jawaker-meld-group .card.can-retract-card {
  cursor: pointer !important;
}

.jawaker-meld-group .card.can-retract-card:hover::after {
  content: '⤶ سحب';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.7);
  pointer-events: none;
  z-index: 60;
}

/* Undo melds button & Swap Joker button in Action bar */
.btn-undo-melds {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #fff !important;
  border: 1px solid #fbbf24 !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5) !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.btn-undo-melds:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  transform: translateY(-2px) !important;
}

.btn-swap-joker {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #fff !important;
  border: 1px solid #34d399 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.6) !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.btn-swap-joker:hover {
  background: linear-gradient(135deg, #34d399, #10b981) !important;
  transform: translateY(-2px) !important;
}

/* Jawaker Score & Round indicator badge on top-left */
.jawaker-round-box {
  position: absolute !important;
  top: 14px !important;
  left: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  z-index: 22 !important;
}

.jawaker-score-cube {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 10px !important;
  padding: 4px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 48px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

.jawaker-score-cube .score-val {
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  line-height: 1.1 !important;
}

.jawaker-round-tag {
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  padding: 2px 8px !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  color: var(--gold-light, #fef3c7) !important;
  text-align: center !important;
}

/* Sizing and responsiveness for cards across all games */
.my-cards-rack {
  max-width: 100% !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* Ensure cards never encroach on avatar or names */
.table-rail-area.my-rail {
  padding-bottom: 6px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Graceful responsive scaling so cards shrink proportionally on smaller screens */
@media (max-width: 1100px) {
  .hand-two-row-rack,
  .table-rail-area.my-rail .hand-two-row-rack {
    transform: scale(0.92) !important;
    transform-origin: bottom center !important;
  }
}

@media (max-width: 960px) {
  .hand-two-row-rack,
  .table-rail-area.my-rail .hand-two-row-rack {
    transform: scale(0.85) !important;
    transform-origin: bottom center !important;
  }
  .table-rail-area.my-rail .my-cards-rack {
    transform: scale(0.9) !important;
    transform-origin: bottom center !important;
  }
}

@media (max-width: 800px) {
  .hand-two-row-rack,
  .table-rail-area.my-rail .hand-two-row-rack {
    transform: scale(0.78) !important;
    transform-origin: bottom center !important;
  }
  .table-rail-area.my-rail .my-cards-rack {
    transform: scale(0.82) !important;
    transform-origin: bottom center !important;
  }
}

/* In-Table Felt Preloader (Zero Flash, Smooth Instant Transition) */
.felt-table-preloader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 480px;
  color: #fff;
  user-select: none;
}

.felt-spinner {
  font-size: 3.2rem;
  animation: pulseFeltDice 1.4s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.6));
}

@keyframes pulseFeltDice {
  0% { transform: scale(0.9) rotate(-10deg); }
  100% { transform: scale(1.15) rotate(15deg); }
}

.felt-loading-msg {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-light, #fbbf24);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 26px;
  border-radius: 30px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  backdrop-filter: blur(8px);
}

/* =========================================================================
   Responsive Viewport Height Optimizations for all Modals & Setup Dialogs
   ========================================================================= */
@media (max-height: 750px) {
  .room-setup-box {
    padding: 16px 20px !important;
  }
  .room-setup-box h2 {
    font-size: 1.25rem !important;
    margin: 2px 0 6px 0 !important;
  }
  .setup-section-label {
    margin: 6px 0 4px 0 !important;
    font-size: 0.84rem !important;
  }
  .chips-selector-row {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .chip-btn {
    padding: 7px 8px !important;
    font-size: 0.8rem !important;
  }
  .custom-fawra-container {
    margin-top: 8px !important;
    padding: 8px 12px !important;
    gap: 6px !important;
  }
  .setup-actions-row {
    margin-top: 12px !important;
  }
  .setup-actions-row button {
    padding: 9px 12px !important;
    font-size: 0.88rem !important;
  }
  .difficulty-box {
    padding: 18px 20px !important;
    gap: 10px !important;
  }
  .diff-header h2 {
    font-size: 1.25rem !important;
  }
  .diff-actions {
    margin-top: 4px !important;
    padding-top: 10px !important;
  }
}

@media (max-height: 580px) {
  .room-setup-box {
    padding: 12px 16px !important;
  }
  .setup-header-crest {
    display: none !important;
  }
  .room-setup-box h2 {
    font-size: 1.15rem !important;
  }
  .chips-selector-row {
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr)) !important;
    gap: 5px !important;
    margin-bottom: 6px !important;
  }
  .chip-btn {
    padding: 5px 6px !important;
    font-size: 0.75rem !important;
  }
  .chip-icon {
    font-size: 1rem !important;
  }
  .custom-fawra-container {
    margin-top: 6px !important;
    padding: 6px 10px !important;
  }
  .custom-fawra-helper {
    display: none !important;
  }
}

/* ==========================================================================
   3RB UNO LUXURY BOARD & VISUAL SYSTEM (Official 4 Colors / Uno Online Style)
   ========================================================================== */

/* Main Table Board (Seamless Royal Table Felt) */
.uno-table-board {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  user-select: none !important;
  font-family: 'Outfit', 'Cinzel', 'Times New Roman', sans-serif !important;
}

/* Center Table Embossed Diamond Watermark (Screenshot 2) */
.uno-center-table-diamond {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 340px;
  height: 340px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.03);
}

/* Top Left Round & Score Badge */
.uno-header-info-tag {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
}

.uno-round-badge {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.uno-target-badge {
  font-size: 12px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 4px 10px;
  border-radius: 12px;
}

/* Opponents Area */
.uno-opponents-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.uno-opponent-station {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  transition: all 0.3s ease;
}

/* Top Station (2-Player or 4-Player top) */
.uno-opponent-station.pos-top {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}

/* Left Station (3-Player or 4-Player left) */
.uno-opponent-station.pos-left {
  top: 44%;
  left: 24px;
  transform: translateY(-50%);
}

/* Right Station (3-Player or 4-Player right) */
.uno-opponent-station.pos-right {
  top: 44%;
  right: 24px;
  transform: translateY(-50%);
}

/* Opponent Cards Row (Horizontally Overlapping Face-Down Cards) */
.uno-opp-cards-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.uno-opp-card-back {
  width: 58px;
  height: 84px;
  border-radius: 8px;
  margin-left: -32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
}

.uno-opp-card-back:first-child {
  margin-left: 0;
}

.uno-opp-overflow-badge {
  background: #ef4444;
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.uno-opp-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.uno-opp-header-row.active-turn-glow {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
}

.uno-player-meta {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(10, 16, 12, 0.72) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  padding: 4px 16px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75) !important;
}

.uno-player-name-label {
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.9);
}

.uno-star-score {
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
}

.uno-badge-said-uno {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 900;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  box-shadow: 0 0 10px #f59e0b;
}

/* -------------------------------------------------------------
   Active Turn Announcement Beacon on UNO Table Felt
   ------------------------------------------------------------- */
.uno-turn-announcer-beacon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 6px 18px !important;
  border-radius: 20px !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7) !important;
  user-select: none !important;
  white-space: nowrap !important;
  pointer-events: auto !important;
  transition: all 0.3s ease !important;
}

/* When it's My Turn (Bright Emerald Glow, Pulsing Attention) */
.uno-turn-announcer-beacon.my-turn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.38), rgba(5, 150, 105, 0.5)) !important;
  border: 1.5px solid #34d399 !important;
  color: #ecfdf5 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6), 0 4px 14px rgba(0, 0, 0, 0.7) !important;
  animation: unoMyTurnPulse 1.6s ease-in-out infinite alternate !important;
}

@keyframes unoMyTurnPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
  }
  100% {
    transform: scale(1.03);
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.8);
  }
}

.uno-turn-announcer-beacon.my-turn .uno-turn-beacon-dot {
  background: #34d399 !important;
  box-shadow: 0 0 8px #34d399 !important;
}

/* When it's Opponent's Turn (Sleek Dark Obsidian Glass with Amber Accent) */
.uno-turn-announcer-beacon.other-turn {
  background: rgba(10, 16, 13, 0.85) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8) !important;
}

.uno-turn-announcer-beacon.other-turn .uno-turn-beacon-dot {
  background: #f59e0b !important;
  box-shadow: 0 0 8px #f59e0b !important;
  animation: unoOppTurnBlink 1.2s ease-in-out infinite alternate !important;
}

@keyframes unoOppTurnBlink {
  0% { opacity: 0.5; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.2); }
}

.uno-turn-beacon-dot {
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.uno-turn-beacon-target {
  color: #fbbf24 !important;
  font-weight: 900 !important;
  margin: 0 4px !important;
}

.uno-header-turn-badge {
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 4px 12px !important;
  border-radius: 12px !important;
  letter-spacing: 0.3px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.3s ease !important;
}

.uno-header-turn-badge.my-turn {
  background: rgba(16, 185, 129, 0.3) !important;
  border: 1px solid #34d399 !important;
  color: #a7f3d0 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}

.uno-header-turn-badge.other-turn {
  background: rgba(0, 0, 0, 0.55) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #fef3c7 !important;
}

.uno-turn-pill {
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 10px !important;
  letter-spacing: 0.3px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
}

.uno-turn-pill.opp-turn-pill {
  background: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3) !important;
}

.uno-player-meta.active-turn-glow {
  background: rgba(16, 185, 129, 0.28) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.6), 0 4px 16px rgba(0, 0, 0, 0.75) !important;
}

/* Center Play Cluster - 100% Stationary, Rock-solid Center Anchor */
.uno-center-cluster {
  position: absolute !important;
  top: 48% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: flex !important;
  align-items: center !important;
  gap: 22px !important;
  z-index: 15 !important;
  pointer-events: auto !important;
}

.uno-center-cluster.table-drag-active-target,
.uno-center-cluster.drag-over-play,
.uno-center-cluster:hover {
  transform: translate(-50%, -50%) !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Draw Deck Slot */
.uno-deck-slot {
  position: relative;
  width: 105px;
  height: 155px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
}

.uno-deck-slot:hover {
  transform: translateY(-4px) scale(1.03);
}

.uno-deck-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.uno-deck-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.uno-deck-bottom { transform: translate(-3px, 3px) rotate(-2deg); }
.uno-deck-mid { transform: translate(-1.5px, 1.5px) rotate(-1deg); }
.uno-deck-top { transform: translate(0, 0); }

.uno-deck-count-badge {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 15, 29, 0.95);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  white-space: nowrap;
}

.uno-draw-hint-pill {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 8px;
  box-shadow: 0 0 14px #10b981;
  letter-spacing: 1px;
  animation: unoPulse 1.2s infinite alternate;
}

@keyframes unoPulse {
  0% { transform: translateX(-50%) scale(0.95); opacity: 0.85; }
  100% { transform: translateX(-50%) scale(1.05); opacity: 1; }
}

/* Discard Slot - Rock-solid, drop glow without displacement */
.uno-discard-slot {
  position: relative !important;
  width: 105px !important;
  height: 155px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: filter 0.22s ease !important;
}

.uno-discard-slot.table-drag-active-target,
.uno-discard-slot.drag-over-play {
  transform: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.uno-discard-slot.uno-drop-hover {
  filter: drop-shadow(0 0 16px #38bdf8) drop-shadow(0 0 32px rgba(56, 189, 248, 0.75)) !important;
}

.uno-discard-card-wrapper .uno-card-element {
  width: 105px;
  height: 155px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
  transform: rotate(-1.5deg);
}

/* Indicators Column (Active Color Diamond + UNO "1" Button) */
.uno-indicators-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-left: 6px;
}

/* Active Color Diamond (Screenshot 2) */
.uno-active-color-diamond {
  width: 38px;
  height: 38px;
  transform: rotate(45deg);
  border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.uno-active-color-diamond.color-red {
  background: linear-gradient(135deg, #f87171, #dc2626);
  box-shadow: 0 0 22px #ef4444, 0 4px 10px rgba(0,0,0,0.5);
}

.uno-active-color-diamond.color-green {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  box-shadow: 0 0 22px #22c55e, 0 4px 10px rgba(0,0,0,0.5);
}

.uno-active-color-diamond.color-blue {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 0 22px #3b82f6, 0 4px 10px rgba(0,0,0,0.5);
}

.uno-active-color-diamond.color-yellow {
  background: linear-gradient(135deg, #fde047, #ca8a04);
  box-shadow: 0 0 22px #eab308, 0 4px 10px rgba(0,0,0,0.5);
}

/* UNO "1" Diamond Button (Screenshot 2) */
.uno-btn-one-diamond {
  width: 44px;
  height: 44px;
  transform: rotate(45deg);
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  background: #000000;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.uno-btn-one-diamond:hover {
  transform: rotate(45deg) scale(1.12);
  box-shadow: 0 0 20px #fbbf24;
}

.uno-btn-one-diamond.pulse-uno {
  animation: unoOnePulse 0.9s infinite alternate;
}

@keyframes unoOnePulse {
  0% { transform: rotate(45deg) scale(1.0); box-shadow: 0 0 10px #ef4444; }
  100% { transform: rotate(45deg) scale(1.22); box-shadow: 0 0 28px #ef4444, 0 0 40px #f59e0b; }
}

.uno-one-quadrants {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.one-q-red { background: #e01a22; }
.one-q-yellow { background: #ffc90e; }
.one-q-green { background: #22b14c; }
.one-q-blue { background: #00a2e8; }

.uno-one-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-45deg);
  font-family: 'Outfit', 'Arial Rounded MT Bold', sans-serif;
  font-weight: 900;
  font-size: 26px;
  color: #000000;
  text-shadow: 0 0 4px #ffffff, 0 0 8px #ffffff;
  pointer-events: none;
}

/* Giant 3D Red Prohibition Sign 🚫 (Screenshot 3) */
.uno-prohibition-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.25);
}

.uno-prohibition-sign {
  animation: prohibitionPop 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes prohibitionPop {
  0% { transform: scale(0.1) rotate(-35deg); opacity: 0; }
  22% { transform: scale(1.22) rotate(4deg); opacity: 1; }
  32% { transform: scale(1.0) rotate(0deg); opacity: 1; }
  75% { transform: scale(1.0) rotate(0deg); opacity: 1; }
  100% { transform: scale(1.3) rotate(15deg); opacity: 0; }
}

/* Action Splash Wrap & Pills */
.uno-action-splash-wrap {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 900;
  pointer-events: none;
}

.uno-action-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  border-radius: 30px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
  letter-spacing: 1px;
}

.splash-reverse { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.splash-draw2 { background: linear-gradient(135deg, #f59e0b, #b45309); }
.splash-wild4 { background: linear-gradient(135deg, #8b5cf6, #5b21b6); }
.splash-uno { background: linear-gradient(135deg, #ea580c, #9a3412); }
.splash-caught { background: linear-gradient(135deg, #dc2626, #7f1d1d); }

/* Color Picker Modal (Screenshot 4) */
.uno-color-picker-modal {
  position: absolute;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.uno-color-dialog {
  background: repeating-linear-gradient(135deg, #0d0d0d 0, #0d0d0d 3px, #181818 3px, #181818 6px);
  border: 2px solid #666666;
  border-radius: 10px;
  padding: 24px 38px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(0,0,0,0.8);
  text-align: center;
}

.uno-color-title {
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  color: #ffffff;
  font-size: 1.35rem;
  letter-spacing: 2.5px;
  margin-bottom: 24px;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.uno-color-diamonds-row {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
}

.color-diamond-btn {
  width: 50px;
  height: 50px;
  transform: rotate(45deg);
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  cursor: pointer;
  background: transparent;
  padding: 0;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.color-diamond-btn:hover {
  transform: rotate(45deg) scale(1.22);
}

.color-diamond-btn.cd-red {
  background: linear-gradient(135deg, #f87171, #dc2626);
  box-shadow: 0 0 22px #ef4444;
}

.color-diamond-btn.cd-green {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  box-shadow: 0 0 22px #22c55e;
}

.color-diamond-btn.cd-blue {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 0 22px #3b82f6;
}

.color-diamond-btn.cd-yellow {
  background: linear-gradient(135deg, #fde047, #ca8a04);
  box-shadow: 0 0 22px #eab308;
}

/* Bottom Player Rail (Player 1) */
.uno-my-rail {
  position: absolute !important;
  bottom: 8px !important;
  left: 0 !important;
  right: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding-bottom: 0 !important;
  z-index: 25 !important;
  pointer-events: none !important;
}

.uno-bottom-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  width: 100% !important;
  margin-bottom: 6px !important;
  pointer-events: auto !important;
}

.uno-player-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 4px 18px !important;
  border-radius: 12px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

.active-turn-glow {
  text-shadow: 0 0 14px #38bdf8, 0 0 24px #38bdf8 !important;
  color: #e0f2fe !important;
}

.uno-btn-pass-turn {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #38bdf8 !important;
  border: 1.5px solid #38bdf8 !important;
  padding: 5px 18px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35) !important;
  pointer-events: auto !important;
}

.uno-btn-pass-turn:hover {
  background: #38bdf8 !important;
  color: #000 !important;
  box-shadow: 0 0 20px #38bdf8 !important;
}

.uno-hand-fan-wrap {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  overflow: visible !important;
  padding: 0 !important;
  pointer-events: auto !important;
}

.uno-hand-cards-fan {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  height: 152px !important;
  padding: 0 20px !important;
  position: relative !important;
  direction: ltr !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.uno-card-element {
  position: relative !important;
  width: 96px !important;
  height: 144px !important;
  margin-left: -32px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease !important;
  transform-origin: bottom center !important;
  pointer-events: auto !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
}

.uno-card-element:first-child {
  margin-left: 0 !important;
}

.uno-card-element img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 12px !important;
  pointer-events: none !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65) !important;
}

.uno-hand-cards-fan .uno-card-element:hover {
  transform: translateY(-28px) scale(1.15) !important;
  z-index: 100 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85) !important;
}

/* Rock-solid static discard pile: cards dropped here stay completely still with zero hover enlargement */
.uno-discard-slot,
.uno-discard-slot *,
.uno-discard-card-wrapper,
.uno-discard-card-wrapper *,
.uno-top-discard,
.uno-top-discard * {
  pointer-events: none !important;
  cursor: default !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
  transition: none !important;
  animation: none !important;
}

.uno-discard-card-wrapper .uno-card-element,
.uno-discard-card-wrapper .uno-top-discard,
.uno-top-discard,
.uno-discard-slot .uno-card-element {
  width: 105px !important;
  height: 155px !important;
  border-radius: 12px !important;
  transform: rotate(-1.5deg) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7) !important;
  filter: none !important;
}

.uno-discard-slot:hover,
.uno-discard-card-wrapper:hover,
.uno-discard-card-wrapper .uno-card-element:hover,
.uno-discard-card-wrapper .uno-top-discard:hover,
.uno-top-discard:hover,
.uno-discard-slot:hover .uno-card-element,
.uno-discard-slot:hover .uno-top-discard {
  transform: rotate(-1.5deg) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7) !important;
  filter: none !important;
  z-index: 1 !important;
}

.uno-card-playable {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.95)) !important;
}

.uno-card-dimmed {
  filter: brightness(0.62) grayscale(25%) !important;
  cursor: not-allowed !important;
}

.uno-card-element.card-drag-floating-ghost,
#cardDragGhostLayer .uno-card-element {
  position: fixed !important;
  margin-left: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  z-index: 9999999 !important;
  transition: none !important;
  touch-action: none !important;
  transform: translate(-50%, -50%) scale(1.1) rotate(2.5deg) !important;
}

.uno-card-element.card-drag-floating-ghost.snapping-back,
#cardDragGhostLayer .uno-card-element.snapping-back {
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transform: translate(-50%, -50%) scale(1) rotate(0deg) !important;
}

.uno-card-element.card-is-dragging {
  opacity: 0.28 !important;
  filter: brightness(0.7) grayscale(30%) !important;
  transform: scale(0.96) !important;
}

@media (max-height: 750px) {
  .uno-card-element {
    width: 84px !important;
    height: 126px !important;
    margin-left: -28px !important;
  }
  .uno-hand-cards-fan {
    height: 132px !important;
  }
}

/* ==========================================================================
   SELECT THE NUMBER OF PLAYERS MODAL (Screenshot 1)
   ========================================================================== */
.uno-players-select-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(135deg, #0d0d0d 0, #0d0d0d 4px, #161616 4px, #161616 8px);
  user-select: none;
}

.uno-players-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.uno-players-title {
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  color: #ffffff;
  font-size: 2.1rem;
  letter-spacing: 2.5px;
  text-align: center;
  margin-bottom: 50px;
  font-weight: 700;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95);
}

.uno-player-options-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
}

.uno-player-diamond-btn {
  width: 100px;
  height: 100px;
  transform: rotate(45deg);
  border-radius: 14px;
  border: 3.5px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  padding: 0;
}

.uno-player-diamond-btn:hover {
  transform: rotate(45deg) scale(1.18);
}

.uno-player-diamond-btn.diamond-green {
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 60%, #14532d 100%);
  box-shadow: 0 0 35px rgba(34, 197, 94, 0.85);
}

.uno-player-diamond-btn.diamond-yellow {
  background: linear-gradient(135deg, #fde047 0%, #eab308 60%, #854d0e 100%);
  box-shadow: 0 0 35px rgba(234, 179, 8, 0.85);
}

.uno-player-diamond-btn.diamond-red {
  background: linear-gradient(135deg, #f87171 0%, #dc2626 60%, #7f1d1d 100%);
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.85);
}

.uno-player-diamond-btn .diamond-inner {
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.avatars-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.avatars-cluster.cluster-2 {
  gap: 4px;
}

.avatars-cluster.cluster-3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2px;
  justify-items: center;
}

.avatars-cluster.cluster-3 .person-icon:last-child {
  grid-column: span 2;
  margin-top: -3px;
}

.avatars-cluster.cluster-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  justify-items: center;
}

.person-icon {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

.uno-modal-cancel-btn {
  margin-top: 48px;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.uno-modal-cancel-btn:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   3RB ROYAL STORE & ITEM SHOWCASE PREVIEW SYSTEM
   ========================================================================== */

/* User Hero Coins Pill */
.user-profile-coins {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(202, 138, 4, 0.32));
  border: 1px solid rgba(234, 179, 8, 0.55);
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fef08a;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.2);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile-coins:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.32), rgba(202, 138, 4, 0.5));
  border-color: #fef08a;
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.4);
}

.coins-icon {
  font-size: 0.95rem;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
  animation: coinWiggle 4s ease-in-out infinite;
}

@keyframes coinWiggle {
  0%, 90%, 100% { transform: rotate(0deg); }
  92% { transform: rotate(-14deg) scale(1.15); }
  95% { transform: rotate(14deg) scale(1.15); }
  97% { transform: rotate(-8deg); }
}

/* Shop Modal Window */
.shop-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.25s ease-out;
}

.shop-modal {
  background-color: #07150e;
  background: #07150e radial-gradient(circle at top, #14281d 0%, #08150f 55%, #030806 100%);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 20px;
  width: 96%;
  max-width: 980px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(234, 179, 8, 0.15);
  animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.shop-header {
  padding: 16px 24px;
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.12) 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom: 1px solid rgba(234, 179, 8, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  flex-shrink: 0;
}

.shop-header-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shop-brand-badge {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #f59e0b;
  text-transform: uppercase;
}

.shop-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 10px rgba(234, 179, 8, 0.4);
}

.shop-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.shop-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-balance-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.45));
  border: 1px solid #facc15;
  padding: 8px 16px;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(234, 179, 8, 0.3);
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Cairo', sans-serif;
}

.shop-balance-pill .coin-icon {
  font-size: 1.25rem;
}

.shop-balance-pill .balance-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  font-family: monospace, sans-serif;
}

.shop-balance-pill .balance-label {
  font-size: 0.78rem;
  color: #fef08a;
  font-weight: 700;
}

.shop-vip-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.4);
}

.shop-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.shop-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
  transform: rotate(90deg);
}

/* Category Tabs */
.shop-tabs-bar {
  display: flex;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow-x: auto;
  flex-shrink: 0;
}

.shop-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.shop-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.shop-tab-btn.active {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.3), rgba(202, 138, 4, 0.5));
  border-color: #facc15;
  color: #fff;
  box-shadow: 0 4px 16px rgba(234, 179, 8, 0.25);
}

/* Shop Items Grid Body */
.shop-body-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  min-height: 200px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

/* Shop Item Card */
.shop-item-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-item-card:hover {
  transform: translateY(-4px);
  border-color: rgba(234, 179, 8, 0.55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(234, 179, 8, 0.15);
}

.shop-item-card.is-equipped {
  border-color: #10b981;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.shop-item-card.is-owned {
  border-color: rgba(234, 179, 8, 0.35);
}

.item-rarity-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 2;
  text-transform: uppercase;
}

.rarity-mythic {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
}

.rarity-legendary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}

.rarity-epic {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.5);
}

.rarity-rare {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
}

.rarity-common {
  background: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

/* Card Showcase Thumbnail */
.shop-card-preview-stage {
  height: 160px;
  border-radius: 12px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.6) 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-card-preview-stage img {
  max-height: 130px;
  max-width: 90px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
}

.shop-item-card:hover .shop-card-preview-stage img {
  transform: scale(1.08) rotate(-2deg);
}

/* Domino Thumbnail Stage */
.shop-domino-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 160px;
  border-radius: 12px;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1) 0%, rgba(0, 0, 0, 0.6) 85%);
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-domino-preview-stage .domino-svg-face {
  max-height: 125px;
  max-width: 65px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6));
  transition: transform 0.3s ease;
}

.shop-item-card:hover .shop-domino-preview-stage .domino-svg-face {
  transform: translateY(-4px) scale(1.05);
}

/* Felt Thumbnail Stage */
.shop-felt-preview-stage {
  height: 160px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Fail-safe defensive size constraints against giant rogue SVGs */
.shop-felt-preview-stage svg,
.felt-sample-elements svg,
.shop-card-preview-stage svg {
  max-width: 50px !important;
  max-height: 80px !important;
  display: inline-block !important;
}

.felt-sample-elements {
  display: flex;
  align-items: center;
  gap: 10px;
  transform: scale(0.75);
}

/* Item Details */
.shop-item-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.shop-item-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.35;
}

.shop-item-title .title-en {
  display: inline-block;
  font-size: 0.85em;
  color: #94a3b8;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: embed;
}

.shop-item-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

.shop-item-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Gold Coin Badge - pure CSS universally visible icon */
.gold-coin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #facc15 45%, #ca8a04 85%, #854d0e 100%);
  border: 1.5px solid #fef08a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  font-size: 10px;
  font-weight: 900;
  color: #78350f;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.price-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 900;
  color: #facc15;
}

.price-tag.free-tag {
  color: #34d399;
}

/* Item Actions Row */
.shop-actions-row {
  display: flex;
  gap: 8px;
}

.shop-btn-preview {
  flex: 1;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.45);
  color: #67e8f9;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.shop-btn-preview:hover {
  background: rgba(6, 182, 212, 0.3);
  border-color: #22d3ee;
  color: #fff;
  box-shadow: 0 2px 12px rgba(6, 182, 212, 0.35);
  transform: translateY(-1px);
}

.shop-btn-action {
  flex: 1.3;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.shop-btn-buy {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid #fbbf24;
  color: #000;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.shop-btn-buy:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
}

.shop-btn-equip {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #34d399;
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.shop-btn-equip:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.shop-btn-equipped {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #34d399;
  cursor: default;
}

/* ==========================================================================
   EXCLUSIVE ITEM PREVIEW MODAL ("معاينة 👁️")
   ========================================================================== */
.shop-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.shop-preview-modal {
  background: radial-gradient(circle at top, #162a20 0%, #08160f 50%, #020704 100%);
  border: 2px solid rgba(234, 179, 8, 0.6);
  border-radius: 24px;
  width: 95%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 50px rgba(234, 179, 8, 0.25);
  animation: previewZoom 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes previewZoom {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.preview-modal-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(234, 179, 8, 0.25);
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.15) 0%, transparent 100%);
}

.preview-title-badge {
  font-size: 0.72rem;
  font-weight: 900;
  color: #f59e0b;
  letter-spacing: 1.5px;
}

.preview-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 2px 0 0;
}

.preview-stage-container {
  padding: 30px 20px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(234, 179, 8, 0.08) 0%, rgba(0,0,0,0.7) 80%);
  position: relative;
  perspective: 1000px;
}

/* 3D Interactive Card Showcase */
.preview-3d-card-wrap {
  width: 170px;
  height: 255px;
  position: relative;
  transition: transform 0.4s ease;
  transform-style: preserve-3d;
  filter: drop-shadow(0 20px 35px rgba(0,0,0,0.8));
  animation: cardFloatGlow 3.5s ease-in-out infinite;
}

@keyframes cardFloatGlow {
  0%, 100% {
    transform: translateY(0) rotateY(-8deg) rotateX(4deg);
    filter: drop-shadow(0 20px 35px rgba(0,0,0,0.8)) drop-shadow(0 0 15px rgba(234, 179, 8, 0.3));
  }
  50% {
    transform: translateY(-10px) rotateY(8deg) rotateX(-4deg);
    filter: drop-shadow(0 25px 45px rgba(0,0,0,0.9)) drop-shadow(0 0 25px rgba(234, 179, 8, 0.5));
  }
}

.preview-3d-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid rgba(234, 179, 8, 0.6);
  box-shadow: 0 0 30px rgba(0,0,0,0.7);
}

/* Domino 3D Stage */
.preview-domino-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.preview-domino-tile {
  width: 110px;
  height: 220px;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.8));
  transition: transform 0.3s;
}

.preview-domino-tile:hover {
  transform: translateY(-8px) scale(1.05);
}

/* Table Felt Panoramic Stage */
.preview-felt-stage {
  width: 100%;
  max-width: 580px;
  height: 240px;
  border-radius: 16px;
  background-size: 100% 100%;
  border: 3px solid rgba(234, 179, 8, 0.4);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 15px 35px rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.felt-demo-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.2);
  color: #cbd5e1;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 9999px;
}

/* Preview Modal Footer / Actions */
.preview-modal-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.preview-desc-text {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.preview-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-buy-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid #fbbf24;
  color: #000;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
  transition: all 0.2s;
}

.preview-buy-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.6);
}

.preview-equip-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #34d399;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transition: all 0.2s;
}

.preview-equip-btn:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.6);
}

.preview-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.preview-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* ==========================================================================
   Table Felt Picker Modal & High-Contrast Luxury Themes
   ========================================================================== */
.table-felt-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  direction: rtl;
}

.table-felt-dialog {
  background: linear-gradient(145deg, rgba(17, 24, 20, 0.98), rgba(9, 14, 11, 0.99));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(245, 158, 11, 0.15);
  border-radius: 20px;
  width: 100%;
  max-width: 990px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.felt-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.felt-modal-brand {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 1.1px;
  margin-bottom: 2px;
}

.felt-modal-main-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.felt-modal-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 2px 0 0;
}

.felt-modal-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.felt-revert-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.felt-revert-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-1px);
}

.felt-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.felt-close-btn:hover {
  background: rgba(239, 68, 68, 0.8);
  color: #fff;
}

.felt-options-grid {
  padding: 12px 16px 20px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
  flex: 1;
}

/* Custom scrollbar for felt picker grid */
.felt-options-grid::-webkit-scrollbar {
  width: 6px;
}
.felt-options-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.felt-options-grid::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.35);
  border-radius: 4px;
}
.felt-options-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.65);
}

.felt-option-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 205px;
}

.felt-option-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 15px rgba(245, 158, 11, 0.2);
}

.felt-option-card.active-felt {
  border-color: #10b981 !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.45) !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

.felt-preview-box {
  height: 75px;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 6px 8px;
  box-shadow: inset 0 0 25px rgba(0,0,0,0.6);
  flex-shrink: 0;
}

.felt-badge-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 14px;
}

.felt-mini-elements {
  display: flex;
  align-items: center;
  gap: 5px;
}

.felt-mini-elements .mini-chip {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.felt-mini-elements .mini-card-back {
  font-size: 14px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.felt-card-content {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.felt-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.felt-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
  flex: 1;
}

.felt-action-bar {
  display: flex;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}

.felt-btn-action {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Modal Chip Styles for Setup Modals */
.bot-felt-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-family: 'Cairo', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bot-felt-chip:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fff;
  transform: translateY(-1px);
}

.bot-felt-chip.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35)) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.felt-btn-action.current-btn {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
  cursor: default;
}

.felt-btn-action.equip-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #000;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.felt-btn-action.equip-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.6);
}

.felt-btn-action.buy-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.felt-btn-action.buy-btn:hover {
  background: #38bdf8;
  color: #000;
  transform: translateY(-2px);
}

.felt-modal-footer {
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.felt-tip-box {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* High-contrast clarity across all table felts */
.room-header-bar,
.room-badge,
.room-header-bar .icon-btn,
.game-player-card,
.player-box,
.score-badge,
.turn-timer-badge {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.85) !important;
}

.table-theme-nav-btn {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(14, 165, 233, 0.28)) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
}

.table-theme-nav-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(14, 165, 233, 0.5)) !important;
  border-color: #38bdf8 !important;
  color: #fff !important;
}

.table-felt-picker-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3)) !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
  font-weight: 700 !important;
}

.table-felt-picker-btn:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #000 !important;
  border-color: #f59e0b !important;
}

/* ==========================================================================
   In-Game View & Table Felt Dynamic Background Binding
   ========================================================================== */
.game-view,
#gameView {
  background: var(--current-table-felt-url, url('/assets/images/table_bg.jpg')) center center / 100% 100% no-repeat !important;
  position: relative !important;
}

/* ==========================================================================
   Room Setup & Bot Setup: Visual Table Felt Theme Cards
   ========================================================================== */
.room-felts-container {
  background: rgba(5, 12, 8, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0 12px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.room-felts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.room-felts-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.room-felts-badge-info {
  font-size: 0.74rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.room-felts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 520px) {
  .room-felts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.room-felt-card {
  position: relative;
  height: 72px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 6px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.room-felt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.7), 0 0 10px rgba(251, 191, 36, 0.3);
}

.room-felt-card.active {
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.7), 0 4px 12px rgba(0, 0, 0, 0.85) !important;
  transform: translateY(-1px);
}

.room-felt-card-badge {
  align-self: flex-start;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  line-height: 1;
}

.room-felt-card.active .room-felt-card-badge {
  background: #fbbf24;
  color: #000;
  border-color: #fbbf24;
}

.room-felt-card-check {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-felt-card.active .room-felt-card-check {
  opacity: 1;
  transform: scale(1);
}

.room-felt-card-name {
  background: rgba(14, 10, 6, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  padding: 2px 2px;
  font-size: 0.64rem;
  font-weight: 800;
  color: #f3f4f6;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.room-felt-card.active .room-felt-card-name {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(15, 23, 18, 0.95);
}

/* ═══════════════════════════════════════════════════════════════════
   🃏 VIP BALOOT — COMPLETE UI SYSTEM
   Authentic Saudi Baloot game interface matching VIP Baloot standards
   ═══════════════════════════════════════════════════════════════════ */

/* ── Baloot Table Container ─────────────────────────────────────── */
.royal-felt-table.baloot-table {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

/* ── VIP Lana vs Lahom HUD Panel ────────────────────────────────── */
.baloot-hud-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 16px;
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  pointer-events: none;
  z-index: 20;
}

.baloot-hud-panel .hud-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.baloot-hud-panel .hud-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.baloot-hud-panel .turn-announcer-beacon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 20px;
  background: rgba(6, 18, 12, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  white-space: nowrap;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.baloot-hud-panel .turn-announcer-beacon.my-turn {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(251, 191, 36, 0.6);
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.45);
}

.baloot-hud-panel .turn-announcer-beacon.other-turn {
  background: rgba(6, 18, 12, 0.85);
  border-color: rgba(245, 158, 11, 0.4);
  color: #e2e8f0;
}

.baloot-team-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 90px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(10, 20, 15, 0.85);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.baloot-team-box.lana {
  border-color: rgba(16,185,129,0.5);
  background: rgba(6, 32, 20, 0.88);
}

.baloot-team-box.lahom {
  border-color: rgba(239,68,68,0.5);
  background: rgba(38, 12, 12, 0.88);
}

.baloot-team-box .team-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #d1fae5;
  letter-spacing: 0.5px;
}

.baloot-team-box.lahom .team-title {
  color: #fecaca;
}

.baloot-team-box .team-total-score {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
  text-shadow: 0 0 12px rgba(251,191,36,0.6);
}

.baloot-team-box .team-abnat-pill {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.3);
  font-weight: 600;
}

/* Center HUD: Compact horizontal pill bar */
.baloot-hud-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
  background: rgba(6, 18, 12, 0.85);
  height: 38px;
  padding: 0 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.baloot-round-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.5px;
}

.baloot-mode-chip {
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.baloot-mode-chip.sun {
  background: rgba(251,191,36,0.2);
  border-color: rgba(251,191,36,0.5);
  color: #fbbf24;
}

.baloot-mode-chip.hokom {
  background: rgba(99,102,241,0.2);
  border-color: rgba(99,102,241,0.5);
  color: #a5b4fc;
}

.baloot-mode-chip.bidding {
  background: rgba(107,114,128,0.2);
  border-color: rgba(107,114,128,0.4);
  color: #d1d5db;
}

.baloot-hud-btn-scorecard {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.35);
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.baloot-hud-btn-scorecard:hover {
  background: rgba(251,191,36,0.3);
  box-shadow: 0 0 10px rgba(251,191,36,0.35);
  transform: translateY(-1px);
}

/* ── Other Seats Area ────────────────────────────────────────────── */
.table-other-seats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 35 !important;
}

/* ── Seat Pods (Opponents & Partner) ─────────────────────────────── */
.table-seat-pod {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  transition: all 0.3s ease;
  min-width: 72px;
  z-index: 36 !important;
}

.table-seat-pod.seat-pos-4-north {
  top: 6px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  gap: 2px !important;
  z-index: 40 !important;
}

.table-seat-pod.seat-pos-4-north .seat-details {
  gap: 1px !important;
}

.table-seat-pod.seat-pos-4-west {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.table-seat-pod.seat-pos-4-east {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.table-seat-pod.is-turn-seat {
  filter: drop-shadow(0 0 10px rgba(251,191,36,0.8));
}

.seat-avatar-container {
  position: relative;
}

.seat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  object-fit: cover;
  background: #1a2a20;
}

.is-turn-seat .seat-avatar {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251,191,36,0.4);
}

.seat-turn-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fbbf24;
  border: 2px solid #052914;
  animation: pulse-dot 1.2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.7; }
}

.dealer-star-badge {
  position: absolute;
  bottom: -2px;
  left: -2px;
  font-size: 0.75rem;
  line-height: 1;
  background: rgba(0,0,0,0.75);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(251,191,36,0.5);
}

.seat-speech-slot {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  pointer-events: none;
  white-space: nowrap;
}

.seat-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 100px;
}

.seat-name-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.seat-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f3f4f6;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.seat-team-badge {
  font-size: 0.58rem;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
}

.seat-team-badge.partner {
  background: rgba(16,185,129,0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16,185,129,0.4);
}

.seat-team-badge.enemy {
  background: rgba(239,68,68,0.2);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.35);
}

.seat-stats-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

.seat-cards-badge, .seat-score-badge {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
}

.seat-mini-hand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.seat-mini-card {
  width: 18px;
  height: 26px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  background: #111;
  margin-left: -9px;
  transition: transform 0.2s ease;
}

.seat-mini-card:first-child {
  margin-left: 0;
}

.seat-mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Center Ground ───────────────────────────────────────────────── */
.table-center.baloot-center {
  position: absolute !important;
  top: 47% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(380px, 60vw) !important;
  height: 160px !important;
  max-height: 160px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 15 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

/* Turn Announcer Beacon */
.turn-announcer-beacon {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 6px;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.turn-announcer-beacon.my-turn {
  background: rgba(251,191,36,0.22);
  border-color: rgba(251,191,36,0.55);
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(251,191,36,0.45);
  animation: turn-pulse 1.5s ease-in-out infinite;
}

@keyframes turn-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(251,191,36,0.45); }
  50% { box-shadow: 0 0 28px rgba(251,191,36,0.75); }
}

.turn-beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 1.2s infinite;
}

.turn-beacon-target {
  color: #fff;
}

/* Ground area where trick cards are played */
.ground-area.baloot-ground {
  position: relative;
  width: 100%;
  height: 145px;
  max-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

/* Open bid card in center during bidding */
.baloot-open-bid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: card-float 2.5s ease-in-out infinite;
}

.baloot-open-bid-card .card {
  width: 78px !important;
  height: 116px !important;
  min-width: 78px !important;
  min-height: 116px !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), 0 0 14px rgba(251, 191, 36, 0.35) !important;
}

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.open-card-label {
  font-size: 0.66rem;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Trick card positions (cross formation) */
.trick-card-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.trick-card-wrap.pos-south {
  transform: translate(-50%, calc(-50% + 36px));
}

.trick-card-wrap.pos-north {
  transform: translate(-50%, calc(-50% - 42px));
}

.trick-card-wrap.pos-west {
  transform: translate(calc(-50% - 58px), -50%);
}

.trick-card-wrap.pos-east {
  transform: translate(calc(-50% + 58px), -50%);
}

.trick-card-wrap.winning-card-glow .card-front {
  box-shadow: 0 0 0 3px #fbbf24, 0 0 20px rgba(251,191,36,0.7) !important;
}

.winner-crown-badge {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(251,191,36,0.9);
  color: #000;
  white-space: nowrap;
  z-index: 5;
}

/* Trick sweep animations & winner celebrate */
.trick-card-wrap.sweep-gather {
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes winnerPodCelebrate {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(251, 191, 36, 0)); }
  45% { transform: scale(1.15); filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.95)) brightness(1.2); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(251, 191, 36, 0)); }
}

.winner-trick-celebrate {
  animation: winnerPodCelebrate 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Card drop animation */
.card-drop-anim {
  animation: card-drop-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes card-drop-in {
  from { transform: translateY(-30px) scale(0.85); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Floating abnat badge */
.floating-abnat-badge {
  position: absolute;
  z-index: 50;
  font-size: 0.85rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 0 12px rgba(251,191,36,0.6);
  pointer-events: none;
  animation: float-badge-up 1.5s ease-out forwards;
}

@keyframes float-badge-up {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  20% { transform: translateY(-10px) scale(1.1); opacity: 1; }
  80% { transform: translateY(-45px) scale(1); opacity: 0.8; }
  100% { transform: translateY(-70px) scale(0.85); opacity: 0; }
}

/* ── My Rail (Bottom Player Area) ──────────────────────────────── */
.royal-felt-table.baloot-table .table-rail-area.my-rail {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  padding: 4px 10px 8px !important;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, transparent 100%) !important;
  z-index: 1050 !important;
  pointer-events: none !important;
}

.royal-felt-table.baloot-table .table-rail-area.my-rail > * {
  pointer-events: auto !important;
}

.table-rail-area.my-rail {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px 10px 8px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, transparent 100%);
  position: relative;
  z-index: 20;
  flex-shrink: 0;
}

.table-rail-area.my-rail.my-turn-glow {
  background: linear-gradient(0deg, rgba(251,191,36,0.12) 0%, transparent 100%);
}

/* Drag hint bar */
.drag-hint-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 10px;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.25);
  font-size: 0.72rem;
  color: #fbbf24;
  font-weight: 600;
}

.btn-play-selected {
  padding: 4px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #000;
  font-weight: 800;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-play-selected:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(251,191,36,0.55);
}

/* My hand rack */
.my-cards-rack {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
  height: calc(var(--card-height) + 20px);
  padding: 0 8px;
  position: relative;
  z-index: 5;
}

/* ── Card Base Styles (Hand) ──────────────────────────────────── */
.card {
  width: var(--card-width);
  height: var(--card-height);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  flex-shrink: 0;
  cursor: default;
}

.card-front {
  background: #fff;
  border: 1.5px solid rgba(0,0,0,0.12);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.3);
}

.card-front .card-svg-face {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-back {
  border: 1.5px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.55);
  overflow: hidden;
}

.card-back-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Playable hand card hover & active effects */
.playable-hand-card {
  opacity: 1 !important;
  cursor: pointer !important;
  filter: none !important;
  transform: translateY(-10px) !important;
  box-shadow: 0 0 0 2.5px #fbbf24, 0 8px 20px rgba(245, 158, 11, 0.45) !important;
  z-index: 15 !important;
}

.playable-hand-card:hover {
  transform: translateY(-24px) scale(1.06) !important;
  box-shadow: 0 0 0 2.5px #fef08a, 0 14px 28px rgba(0,0,0,0.8), 0 0 20px rgba(251, 191, 36, 0.7) !important;
  z-index: 25 !important;
}

.illegal-card-dim {
  opacity: 1 !important;
  cursor: not-allowed !important;
  filter: brightness(0.68) saturate(0.85) !important;
  transform: translateY(4px) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}

@keyframes cardShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px) rotate(-2deg); }
  40%, 80% { transform: translateX(6px) rotate(2deg); }
}
.card-shake {
  animation: cardShake 0.38s ease-in-out !important;
}

/* Card selected state (drag controller) */
.card.selected {
  transform: translateY(-18px) !important;
  box-shadow: 0 0 0 2px #fbbf24, 0 12px 24px rgba(0,0,0,0.6) !important;
  z-index: 18 !important;
}

/* ── My Profile pod ─────────────────────────────────────────────── */
.player-floating-tag.my-tag {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-floating-tag .meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.player-floating-tag .name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f3f4f6;
}

.player-floating-tag .score-badge {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.6);
}

.player-floating-tag .avatar-wrap .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  object-fit: cover;
}

.turn-tag {
  display: inline-block;
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(251,191,36,0.2);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.4);
  font-weight: 700;
  margin-right: 4px;
}

.wait-tag {
  display: inline-block;
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(107,114,128,0.2);
  color: #9ca3af;
  border: 1px solid rgba(107,114,128,0.3);
  margin-right: 4px;
}

/* ── VIP Baloot Bidding Modal (Image 1) defined at line 7555 ── */

/* ── Speech Bubbles ─────────────────────────────────────────────── */
.baloot-speech-bubble {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
  animation: bubble-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  position: relative;
}

@keyframes bubble-pop {
  from { transform: scale(0.6) translateY(6px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.baloot-speech-bubble.bubble-sun {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #000;
  border: 1px solid #d97706;
}

.baloot-speech-bubble.bubble-hokom {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: 1px solid #818cf8;
}

.baloot-speech-bubble.bubble-pass {
  background: rgba(107,114,128,0.75);
  color: #d1d5db;
  border: 1px solid rgba(156,163,175,0.4);
}

.baloot-speech-bubble.bubble-double {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: 1px solid #f87171;
}

.baloot-speech-bubble.bubble-ashkal {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: 1px solid #a78bfa;
}

/* ── Baloot Splash Banner (Baloot! / Purchase!) ─────────────────── */
.baloot-splash-banner {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  pointer-events: none;
}

.baloot-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15,27,18,0.95), rgba(5,41,20,0.95));
  border: 2px solid rgba(251,191,36,0.6);
  box-shadow: 0 0 40px rgba(251,191,36,0.4), 0 12px 32px rgba(0,0,0,0.7);
  font-size: 1rem;
  font-weight: 900;
  color: #fbbf24;
  white-space: nowrap;
}

.animate-pop {
  animation: modal-pop-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-pulse {
  animation: card-float 2.5s ease-in-out infinite;
}

.fade-out {
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
}

/* ── VIP Doubling Bar ───────────────────────────────────────────── */
.baloot-double-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 5px;
}

.baloot-double-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  font-weight: 800;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: 'Cairo', 'Readex Pro', sans-serif;
  transition: all 0.18s ease;
}

.baloot-double-btn.btn-dbl {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 10px rgba(239,68,68,0.45);
}

.baloot-double-btn.btn-three {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 4px 10px rgba(245,158,11,0.45);
}

.baloot-double-btn.btn-four {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 10px rgba(139,92,246,0.45);
}

.baloot-double-btn.btn-qahwa {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  color: #000;
  box-shadow: 0 4px 10px rgba(74,222,128,0.45);
}

.baloot-double-btn:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.15);
}

/* ── VIP Projects Declaration Bar (Image 3) ─────────────────────── */
/* (Styles defined at line 7925 with authentic orange pill aesthetic matching Image 3) */

/* Project announce toast */
.vip-project-announce-toast {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 95;
  pointer-events: none;
}

.vip-project-announce-toast .toast-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(5,41,20,0.97), rgba(15,40,24,0.97));
  border: 2px solid rgba(74,222,128,0.55);
  box-shadow: 0 0 28px rgba(74,222,128,0.3), 0 8px 24px rgba(0,0,0,0.6);
  font-size: 0.9rem;
  font-weight: 800;
  color: #4ade80;
  white-space: nowrap;
  animation: modal-pop-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── VIP Round Scorecard Modal (Image 2) ────────────────────────── */
.vip-baloot-scorecard-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  animation: bg-fade-in 0.25s ease both;
}

@keyframes bg-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Scorecard styles defined at line 7760 ── */

/* ── Score History Scorecard Modal ──────────────────────────────── */
.baloot-scorecard-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}

.baloot-scorecard-card {
  background: linear-gradient(145deg, #0a1a10, #04120a);
  border: 2px solid rgba(251,191,36,0.4);
  border-radius: 20px;
  box-shadow: 0 28px 72px rgba(0,0,0,0.9);
  overflow: hidden;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: modal-pop-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.baloot-scorecard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(90deg, #92400e, #d97706);
  border-bottom: 1.5px solid rgba(251,191,36,0.3);
}

.baloot-scorecard-header h3 {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
}

.scorecard-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.scorecard-close-btn:hover {
  background: rgba(0,0,0,0.6);
  transform: scale(1.1);
}

.baloot-scorecard-body {
  overflow-y: auto;
  padding: 10px;
}

.baloot-scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.baloot-scorecard-table th {
  padding: 8px 6px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(255,255,255,0.65);
  border-bottom: 1.5px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}

.baloot-scorecard-table td {
  padding: 8px 6px;
  text-align: center;
  color: #f3f4f6;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.baloot-scorecard-table .cell-lana {
  color: #6ee7b7;
}

.baloot-scorecard-table .cell-lahom {
  color: #fca5a5;
}

/* ── Baloot Splash (Baloot! King+Queen) ─────────────────────────── */
.baloot-splash-banner {
  z-index: 95;
}

/* ── Card Pulser (animate-pulse used on open card) ──────────────── */
.animate-pulse {
  animation: card-float 2.5s ease-in-out infinite;
}

/* ── Responsive tweaks ──────────────────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --card-width: 72px;
    --card-height: 108px;
  }
  .baloot-team-box { min-width: 72px; padding: 5px 7px; }
  .baloot-team-box .team-total-score { font-size: 1.25rem; }
  .vip-bid-dialog-card { width: 98vw; }
  .vip-bid-pill-btn { padding: 10px 12px; font-size: 0.8rem; }
  .my-cards-rack { height: calc(var(--card-height) + 12px); }
  .card { width: 72px; height: 108px; }
  .vip-scorecard-dialog { width: 98vw; }
}

/* ── Baloot Turn Speech Bubble (Positioned smoothly to the side of the avatar) ── */
.baloot-table .seat-turn-bubble {
  position: absolute !important;
  top: 50% !important;
  right: -62px !important;
  transform: translateY(-50%) !important;
  display: none;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 8px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.98), rgba(5, 150, 105, 0.98)) !important;
  border: 1px solid #34d399 !important;
  color: #fff !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 10px rgba(16, 185, 129, 0.5) !important;
  z-index: 50 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  animation: balootTurnBubbleFloat 1.2s infinite alternate ease-in-out !important;
}

.baloot-table .is-turn-seat .seat-turn-bubble {
  display: flex !important;
}

.baloot-table .seat-turn-bubble::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -5px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-right: 5px solid #059669;
}

/* For East seat (near right edge), position on left pointing into table */
.baloot-table .seat-pos-4-east .seat-turn-bubble {
  right: auto !important;
  left: -62px !important;
}

.baloot-table .seat-pos-4-east .seat-turn-bubble::after {
  left: auto;
  right: -5px;
  border-right: none;
  border-left: 5px solid #059669;
}

/* For South player profile */
.baloot-table .my-turn-bubble {
  position: absolute !important;
  top: 50% !important;
  right: -68px !important;
  transform: translateY(-50%) !important;
}

@keyframes balootTurnBubbleFloat {
  0% { transform: translateY(-50%) translateX(0); }
  100% { transform: translateY(-50%) translateX(3px); }
}

/* ── VIP Hand Rummy Round Statistics Modal (نشرة وإحصائيات جولات الهند) ── */
.btn-hand-scorecard-toggle {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.35)) !important;
  border: 1px solid rgba(245, 158, 11, 0.6) !important;
  color: #fbbf24 !important;
  padding: 3px 9px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.2s ease !important;
  margin-inline-start: 6px !important;
}

.btn-hand-scorecard-toggle:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(217, 119, 6, 0.6)) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4) !important;
  transform: translateY(-1px) !important;
}

.vip-hand-scorecard-modal {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(4, 8, 16, 0.88) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 300 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  animation: vipFadeIn 0.2s ease-out !important;
}

.vip-hand-scorecard-dialog {
  background: linear-gradient(145deg, #0b1329, #060b18) !important;
  border: 2px solid rgba(245, 158, 11, 0.55) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.95), 0 0 35px rgba(245, 158, 11, 0.3) !important;
  width: 680px !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  font-family: 'Cairo', sans-serif !important;
  display: flex !important;
  flex-direction: column !important;
  animation: vipModalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  color: #fff !important;
}

.vip-hand-scorecard-header {
  background: linear-gradient(135deg, #131e3a, #0b1329) !important;
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.35) !important;
  padding: 16px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.header-badge-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.round-badge {
  font-size: 1.2rem !important;
  font-weight: 900 !important;
  color: #f59e0b !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.scorecard-close-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  font-size: 14px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.scorecard-close-btn:hover {
  background: #ef4444 !important;
  border-color: #f87171 !important;
}

.winner-hero-box {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
}

.winner-avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  border: 2px solid #f59e0b !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6) !important;
  object-fit: cover !important;
}

.winner-hero-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.winner-title {
  font-size: 1.05rem !important;
  color: #f1f5f9 !important;
}

.winner-title strong {
  color: #fbbf24 !important;
}

.winner-perk {
  font-size: 0.86rem !important;
  color: #34d399 !important;
  font-weight: 700 !important;
}

.winner-perk.pure-hand {
  color: #a78bfa !important;
  text-shadow: 0 0 8px rgba(167, 139, 250, 0.6) !important;
}

.vip-hand-scorecard-body {
  padding: 14px 18px !important;
  overflow-x: auto !important;
}

.vip-hand-scorecard-table {
  width: 100% !important;
  border-collapse: collapse !important;
  text-align: right !important;
  font-size: 13px !important;
}

.vip-hand-scorecard-table th {
  padding: 10px 12px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  white-space: nowrap !important;
}

.vip-hand-scorecard-table td {
  padding: 10px 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  vertical-align: middle !important;
}

.vip-hand-scorecard-table tr.winner-row {
  background: rgba(16, 185, 129, 0.14) !important;
}

.vip-hand-scorecard-table tr.my-row {
  border-right: 3px solid #f59e0b !important;
}

.player-info-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.table-mini-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  border: 1px solid #475569 !important;
  object-fit: cover !important;
}

.name-box {
  display: flex !important;
  flex-direction: column !important;
}

.p-name {
  font-weight: 800 !important;
  color: #f1f5f9 !important;
}

.badge-tag.gold {
  color: #fbbf24 !important;
  font-size: 10px !important;
  font-weight: bold !important;
}

.status-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 8px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.status-pill.win {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.status-pill.down {
  background: rgba(59, 130, 246, 0.22) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

.status-pill.not-down {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.remaining-cards-preview {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.card-count-badge {
  font-size: 11px !important;
  color: #94a3b8 !important;
  font-weight: bold !important;
}

.mini-cards-stack {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex-wrap: wrap !important;
}

.mini-card-chip {
  padding: 1px 4px !important;
  background: #ffffff !important;
  border-radius: 4px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  border: 1px solid #cbd5e1 !important;
  line-height: 1.2 !important;
}

.mini-card-chip.red {
  color: #dc2626 !important;
}

.mini-card-chip.black {
  color: #0f172a !important;
}

.more-cards {
  font-size: 10px !important;
  color: #f59e0b !important;
  font-weight: bold !important;
}

.zero-cards {
  color: #34d399 !important;
  font-weight: bold !important;
}

.total-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 90px !important;
}

.total-val {
  font-weight: 800 !important;
  color: #f1f5f9 !important;
}

.total-val small {
  color: #64748b !important;
}

.total-val.danger {
  color: #f59e0b !important;
}

.total-val.elim {
  color: #ef4444 !important;
}

.mini-progress-bar {
  width: 100% !important;
  height: 5px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-radius: 3px !important;
  overflow: hidden !important;
}

.mini-progress-fill {
  height: 100% !important;
  background: #3b82f6 !important;
  transition: width 0.3s ease !important;
}

.mini-progress-fill.fill-danger {
  background: #f59e0b !important;
}

.mini-progress-fill.fill-elim {
  background: #ef4444 !important;
}

.elim-tag {
  color: #ef4444 !important;
  font-size: 10px !important;
  font-weight: bold !important;
}

.vip-hand-scorecard-footer {
  background: linear-gradient(135deg, #0b1329, #080d1c) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 14px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.next-round-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 12px !important;
}

.countdown-txt {
  color: #94a3b8 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.btn-next-round {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 1px solid #34d399 !important;
  color: #ffffff !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.btn-next-round:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.6) !important;
}

.game-over-banner {
  width: 100% !important;
  text-align: center !important;
  font-size: 1.1rem !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
  padding: 6px 0 !important;
}

/* =========================================================================
   VIP Persistent Seat Bidding Badges & Staggered Voice Announcer
   ========================================================================= */
.seat-bid-badge-slot {
  display: inline-flex;
  align-items: center;
  margin: 0 4px;
  vertical-align: middle;
}

.seat-bid-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  letter-spacing: 0.2px;
  transition: all 0.25s ease;
  user-select: none;
  animation: bidBadgePop 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes bidBadgePop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.seat-bid-badge.bid-sun {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32), rgba(217, 119, 6, 0.52));
  border: 1.5px solid #fbbf24;
  color: #fef08a;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.75);
}

.seat-bid-badge.bid-hokom {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.32), rgba(79, 70, 229, 0.52));
  border: 1.5px solid #a5b4fc;
  color: #e0e7ff;
  text-shadow: 0 0 8px rgba(99, 102, 241, 0.75);
}

.seat-bid-badge.bid-ashkal {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.32), rgba(14, 116, 144, 0.52));
  border: 1.5px solid #67e8f9;
  color: #cffafe;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.75);
}

.seat-bid-badge.bid-pass {
  background: rgba(100, 116, 139, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #cbd5e1;
}

.seat-bid-badge.bid-double {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.32), rgba(185, 28, 28, 0.52));
  border: 1.5px solid #f87171;
  color: #fee2e2;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.75);
}

/* Pulsating Glow on Player Seat when their bid is being called */
.table-seat-pod.bid-announcing-active,
.player-floating-tag.bid-announcing-active {
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.85), 0 0 14px rgba(251, 191, 36, 0.6) !important;
  border-color: #fbbf24 !important;
  transform: scale(1.06) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* =========================================================================
   3RB PLATFORM - ULTRA LUXURY HOMEPAGE REDESIGN (EXACT REFERENCE REPLICA)
   ========================================================================= */

/* Top Navigation Bar: Clean Transparent Bar with Independent Floating Glass Pills */
.top-nav {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  direction: rtl !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 4px 16px !important;
  margin: 4px auto 8px !important;
  max-width: 1560px !important;
  width: 100% !important;
  box-shadow: none !important;
  z-index: 50 !important;
  box-sizing: border-box !important;
}

.top-nav-toggle-tab {
  display: none !important;
}

.brand-section {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.brand-logo-badge {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(115deg, #f7d070 0%, #fffbe0 25%, #d4af37 50%, #fff4b8 75%, #b8860b 100%) !important;
  background-size: 250% 100% !important;
  color: #0b0905 !important;
  font-family: 'Outfit', 'Cairo', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  border-radius: 9999px !important;
  padding: 4px 15px !important;
  letter-spacing: 1.2px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 16px rgba(247, 208, 112, 0.65), 0 0 30px rgba(212, 175, 55, 0.35) !important;
  overflow: hidden !important;
  cursor: pointer !important;
  animation: vip3rbBadgeShimmer 5s ease-in-out infinite alternate, vip3rbBadgeAura 2.8s ease-in-out infinite alternate !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease !important;
  user-select: none !important;
}

.brand-logo-badge::after {
  content: '' !important;
  position: absolute !important;
  top: -60% !important;
  left: -140% !important;
  width: 55% !important;
  height: 220% !important;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.15) 80%,
    transparent 100%
  ) !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) !important;
  transform: rotate(25deg) !important;
  pointer-events: none !important;
  opacity: 0 !important;
  z-index: 2 !important;
  animation: vip3rbSheenCycle 3.8s cubic-bezier(0.2, 0.85, 0.25, 1) infinite !important;
}

.brand-logo-badge:hover {
  transform: translateY(-2px) scale(1.08) !important;
  box-shadow: 0 0 24px rgba(255, 245, 180, 0.95), 0 0 42px rgba(245, 158, 11, 0.75) !important;
  border-color: #ffffff !important;
}

.brand-logo-badge:active {
  transform: translateY(1px) scale(0.98) !important;
}

@keyframes vip3rbBadgeShimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

@keyframes vip3rbBadgeAura {
  0% {
    box-shadow: 0 0 12px rgba(247, 208, 112, 0.5), 0 0 24px rgba(212, 175, 55, 0.25);
  }
  100% {
    box-shadow: 0 0 22px rgba(255, 245, 180, 0.85), 0 0 38px rgba(245, 158, 11, 0.55);
  }
}

@keyframes vip3rbSheenCycle {
  0%, 68% {
    left: -140%;
    opacity: 0;
  }
  73% {
    opacity: 1;
  }
  100% {
    left: 240%;
    opacity: 0;
  }
}

.brand-title {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

.presence-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.4) !important;
  border-radius: 9999px !important;
  padding: 3px 12px !important;
  color: #34d399 !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
}

.presence-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #34d399 !important;
  box-shadow: 0 0 8px #34d399 !important;
}

.presence-avatar-thumb-wrap {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  border: 1.5px solid #eab308 !important;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.5) !important;
}

.presence-top-avatar {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.nav-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* Individual Top Nav Floating Glass Pills */
.nav-actions .icon-btn {
  background: rgba(14, 11, 8, 0.72) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1.5px solid rgba(212, 168, 67, 0.35) !important;
  border-radius: 9999px !important;
  padding: 5px 14px !important;
  color: #e5e7eb !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.nav-actions .icon-btn:hover {
  border-color: #f59e0b !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4) !important;
}

/* Top Navigation Bar active gold pill (الصفحة الرئيسية) */
.icon-btn.home-nav-btn.active-gold-pill {
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1.5px solid #f59e0b !important;
  color: #fef08a !important;
  border-radius: 9999px !important;
  font-weight: 900 !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.home-gold-crown {
  font-size: 0.82rem !important;
  color: #fef08a !important;
}

.home-gold-icon {
  font-size: 0.85rem !important;
}

/* Sound and Settings Pills */
.sound-nav-btn,
.settings-nav-btn {
  background: rgba(14, 11, 8, 0.72) !important;
  border: 1.5px solid rgba(212, 168, 67, 0.45) !important;
  border-radius: 9999px !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
  padding: 5px 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.sound-nav-badge {
  background: rgba(245, 158, 11, 0.22) !important;
  border: 1px solid #f59e0b !important;
  color: #fef08a !important;
  border-radius: 9999px !important;
  padding: 1px 8px !important;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
}

.sound-nav-btn:hover,
.settings-nav-btn:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #fbbf24 !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45) !important;
}

.table-theme-nav-btn {
  background: rgba(14, 11, 8, 0.72) !important;
  border: 1.5px solid rgba(212, 168, 67, 0.35) !important;
  color: #e5e7eb !important;
}

/* Lobby View Luxury Royal Palace Background: Pure royal palace gaming lounge without any gambling props */
.lobby-view,
#lobbyView {
  position: relative !important;
  background: #030304 url('/assets/images/royal_palace_lobby_bg.jpg?v=20261023_palace_v4') center top / cover no-repeat !important;
  background-color: #030304 !important;
  background-image: url('/assets/images/royal_palace_lobby_bg.jpg?v=20261023_palace_v4') !important;
  background-position: center top !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  padding: 4px 16px 20px !important;
  width: 100% !important;
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

/* Strict View Separation: Lobby is 100% hidden when in game or display:none is set */
.lobby-view[style*="display: none"],
.lobby-view[style*="display:none"],
.lobby-view.hidden,
#lobbyView[style*="display: none"],
#lobbyView[style*="display:none"],
#lobbyView.hidden,
body.in-game #lobbyView,
#appContainer.in-game #lobbyView {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Strict View Separation: Game view is 100% hidden on lobby */
.game-view[style*="display: none"],
.game-view[style*="display:none"],
.game-view.hidden,
#gameView[style*="display: none"],
#gameView[style*="display:none"],
#gameView.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 4-Zone Luxury Hero Container: LTR flow, centered with clear margins for background chips and chess knight */
.lobby-luxury-hero {
  display: grid !important;
  grid-template-columns: 260px 140px 240px 240px !important;
  justify-content: space-between !important;
  gap: 16px !important;
  align-items: center !important;
  max-width: 1080px !important;
  width: 100% !important;
  margin: 2px auto 6px !important;
  direction: ltr !important;
}

@media (max-width: 1200px) {
  .lobby-luxury-hero {
    grid-template-columns: 1fr 1fr !important;
    width: 95% !important;
  }
}

@media (max-width: 768px) {
  .lobby-luxury-hero {
    grid-template-columns: 1fr !important;
    width: 95% !important;
  }
}

/* 1. Perks Box (Left side in reference) - Cinematic Typography & Staggered Reveal */
.hero-perks-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 4px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  direction: rtl !important;
  text-align: right !important;
  perspective: 1000px !important;
}

.perks-crown-icon {
  margin-bottom: 4px !important;
  line-height: 1 !important;
  animation: vipCrownEntrance 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both !important;
}

.perks-crown-svg {
  width: 26px !important;
  height: 26px !important;
  display: block !important;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.8)) !important;
  transition: transform 0.3s ease !important;
}

.hero-perks-card:hover .perks-crown-svg {
  transform: scale(1.15) rotate(-5deg) !important;
}

.perks-title {
  font-family: 'Cairo', sans-serif !important;
  font-size: 1.45rem !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  margin-bottom: 4px !important;
  letter-spacing: -0.2px !important;
  white-space: nowrap !important;
  background: linear-gradient(135deg, #ffffff 0%, #fffbe6 30%, #fde047 65%, #f59e0b 90%, #d97706 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  background-size: 200% auto !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 16px rgba(245, 158, 11, 0.4)) !important;
  animation: vipTextRevealFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both, vipTitleGlowLuster 6s ease-in-out 1.2s infinite alternate !important;
}

.perks-subtitle {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.82rem !important;
  color: #cbd5e1 !important;
  margin-bottom: 10px !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
  white-space: nowrap !important;
  letter-spacing: 0.2px !important;
  animation: vipTextRevealFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both !important;
}

.perks-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.perk-row {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
  white-space: nowrap !important;
  width: fit-content !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: default !important;
}

.perk-row-1 {
  animation: vipPerkSlideIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both !important;
}

.perk-row-2 {
  animation: vipPerkSlideIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.75s both !important;
}

.perk-row-3 {
  animation: vipPerkSlideIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both !important;
}

.perk-row:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  transform: translateX(-4px) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

.perk-icon-svg {
  width: 16px !important;
  height: 16px !important;
  display: inline-block !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  transition: transform 0.25s ease !important;
}

.perk-row:hover .perk-icon-svg {
  transform: scale(1.2) !important;
}

.icon-gold {
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.8)) !important;
}

.icon-cyan {
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8)) !important;
}

.icon-purple {
  filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.8)) !important;
}

@keyframes vipCrownEntrance {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.85);
    filter: drop-shadow(0 0 0 transparent);
  }
  60% {
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 0 16px rgba(247, 208, 112, 0.95));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 10px rgba(247, 208, 112, 0.7));
  }
}

@keyframes vipTextRevealFadeUp {
  0% {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes vipPerkSlideIn {
  0% {
    opacity: 0;
    transform: translateX(18px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes vipTitleGlowLuster {
  0% {
    background-position: 0% center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 14px rgba(245, 158, 11, 0.35));
  }
  100% {
    background-position: 100% center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 24px rgba(254, 240, 138, 0.65));
  }
}

/* 2. Center Brand Logo: 3D Gold Crown & Letters Floating Seamlessly in Space */
.hero-brand-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  direction: rtl !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.brand-3d-wrapper {
  position: relative !important;
  width: 155px !important;
  height: 105px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  animation: vip3rbFloat 3.6s ease-in-out infinite !important;
  cursor: pointer !important;
}

.brand-3d-wrapper::before {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 140px !important;
  height: 90px !important;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.45) 0%, rgba(212, 168, 67, 0.15) 50%, transparent 75%) !important;
  border-radius: 50% !important;
  filter: blur(14px) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  animation: vip3rbCrownAuraGlow 2.8s ease-in-out infinite alternate !important;
}

.brand-3d-img {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  border: none !important;
  box-shadow: none !important;
  mix-blend-mode: screen !important;
  filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.65)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)) !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease !important;
}

.brand-3d-wrapper:hover .brand-3d-img {
  transform: scale(1.08) translateY(-4px) !important;
  filter: drop-shadow(0 0 28px rgba(255, 235, 140, 0.95)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.9)) brightness(1.1) !important;
}

@keyframes vip3rbFloat {
  0% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.02);
  }
  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes vip3rbCrownAuraGlow {
  0% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.92);
  }
  100% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

.brand-subtext {
  display: none !important;
}

/* 3. User Profile Box (Center-Right in reference) */
.hero-profile-box {
  background: rgba(10, 8, 6, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid rgba(234, 179, 8, 0.5) !important;
  border-radius: 18px !important;
  padding: 8px 14px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 18px rgba(234, 179, 8, 0.3) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  height: 100px !important;
  box-sizing: border-box !important;
  transition: all 0.3s ease !important;
}

.hero-profile-box:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 25px rgba(245, 158, 11, 0.4) !important;
}

.profile-box-main {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  direction: ltr !important;
}

.profile-avatar-block {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  flex-shrink: 0 !important;
}

.profile-avatar-wrapper {
  position: relative !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
}

.profile-avatar-pic {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid #eab308 !important;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.6) !important;
}

.profile-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  border-radius: 9999px !important;
  padding: 1px 7px !important;
}

.green-indicator {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: #34d399 !important;
  box-shadow: 0 0 6px #34d399 !important;
}

.profile-meta-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  flex: 1 !important;
  direction: ltr !important;
  align-items: flex-start !important;
  text-align: left !important;
}

.profile-username-line {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 1.02rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  direction: ltr !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
}

.user-crown-badge {
  font-size: 0.9rem !important;
}

.profile-rp-line {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  color: #f7d070 !important;
  direction: ltr !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
}

.rp-tag-badge {
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  color: #f7d070 !important;
}

.rp-trophy-icon {
  font-size: 0.88rem !important;
}

.profile-coins-gold-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: linear-gradient(135deg, #f7d070, #c69224) !important;
  color: #0b0905 !important;
  font-weight: 900 !important;
  border-radius: 9999px !important;
  padding: 2px 10px !important;
  font-size: 0.85rem !important;
  box-shadow: 0 0 12px rgba(247, 208, 112, 0.45) !important;
  margin-top: 1px !important;
  cursor: pointer !important;
  direction: ltr !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.profile-coins-gold-pill:hover {
  transform: scale(1.04) !important;
  box-shadow: 0 0 18px rgba(247, 208, 112, 0.7) !important;
}

.coins-add-icon {
  font-size: 0.72rem !important;
  color: #0b0905 !important;
}

/* 4. Daily Reward Box (Right side in reference) */
.hero-daily-reward-box {
  background: rgba(10, 8, 6, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid rgba(234, 179, 8, 0.5) !important;
  border-radius: 18px !important;
  padding: 8px 14px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 18px rgba(234, 179, 8, 0.3) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  height: 100px !important;
  box-sizing: border-box !important;
  direction: rtl !important;
  text-align: right !important;
  transition: all 0.3s ease !important;
}

.hero-daily-reward-box:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 25px rgba(245, 158, 11, 0.4) !important;
}

.daily-reward-header-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.daily-reward-gift-ico {
  font-size: 1.1rem !important;
}

.daily-reward-head-text {
  font-size: 1.02rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
  white-space: nowrap !important;
}

.daily-reward-sub-text {
  font-size: 0.74rem !important;
  color: #d1d5db !important;
  margin: 1px 0 6px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.daily-reward-action-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: linear-gradient(135deg, #f7d070, #c69224) !important;
  color: #0b0905 !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 6px 16px !important;
  cursor: pointer !important;
  box-shadow: 0 0 16px rgba(247, 208, 112, 0.45) !important;
  transition: all 0.22s ease !important;
  width: 100% !important;
}

.daily-reward-action-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 0 25px rgba(247, 208, 112, 0.7) !important;
}

.daily-reward-action-btn.claimed {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4) !important;
}

.daily-reward-timer {
  font-size: 0.75rem !important;
  color: #fbbf24 !important;
  text-align: center !important;
  font-weight: 700 !important;
}

/* Category Filter Tabs */
.lobby-category-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  width: 100%;
  max-width: 1080px;
  direction: rtl !important;
}

.category-tab-btn {
  background: rgba(18, 14, 9, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: #d1d5db;
  border-radius: 999px;
  padding: 6px 18px;
  font-weight: 700;
  font-size: 0.84rem;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-tab-btn:hover {
  border-color: #fbbf24;
  color: #fff;
  transform: translateY(-1px);
}

.category-tab-btn.active {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.3), rgba(202, 138, 4, 0.18));
  border-color: #eab308;
  color: #fef08a;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.35);
}

/* Luxury Games Grid (4-Columns Layout, Centered with Elegant Spacing) */
.luxury-games-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  max-width: 1080px !important;
  width: 100% !important;
  margin: 6px auto 26px !important;
  direction: ltr !important;
  align-items: stretch !important;
}

.luxury-game-card.is-hidden {
  display: none !important;
}

@media (max-width: 1200px) {
  .luxury-games-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    width: 95% !important;
  }
}

@media (max-width: 650px) {
  .luxury-games-grid {
    grid-template-columns: 1fr !important;
    width: 95% !important;
  }
}

.luxury-game-card {
  background: rgba(10, 8, 6, 0.9) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid rgba(212, 168, 67, 0.5) !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.85), 0 0 18px rgba(212, 168, 67, 0.2) !important;
  direction: rtl !important;
  text-align: center !important;
}

.luxury-game-card:hover {
  transform: translateY(-5px) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.9), 0 0 25px rgba(245, 158, 11, 0.45) !important;
}

.luxury-card-cover-wrapper {
  position: relative !important;
  width: 100% !important;
  height: 96px !important;
  overflow: hidden !important;
  border-radius: 18px 18px 0 0 !important;
}

.luxury-card-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.5s ease !important;
}

.luxury-game-card:hover .luxury-card-img {
  transform: scale(1.06) !important;
}

.card-corner-badge {
  position: absolute !important;
  top: 8px !important;
  z-index: 3 !important;
}

.card-corner-badge.corner-right {
  right: 8px !important;
  background: rgba(10, 8, 5, 0.85) !important;
  border: 1.5px solid rgba(212, 168, 67, 0.7) !important;
  border-radius: 9999px !important;
  padding: 2px 10px !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  backdrop-filter: blur(6px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7) !important;
}

.card-corner-badge.corner-left {
  left: 44px !important;
  width: 28px !important;
  height: 28px !important;
  background: rgba(10, 8, 5, 0.85) !important;
  border: 1.5px solid rgba(212, 168, 67, 0.7) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.88rem !important;
  color: #fef08a !important;
  backdrop-filter: blur(6px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7) !important;
}

/* Favorite Heart Toggle Button (Matching Royal Badge & Image 2) */
.card-fav-heart-btn {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  z-index: 10 !important;
  width: 32px !important;
  height: 32px !important;
  background: radial-gradient(circle, rgba(26, 21, 16, 0.95) 0%, rgba(12, 10, 8, 0.98) 100%) !important;
  border: 1.5px solid rgba(212, 168, 67, 0.75) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7) !important;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  padding: 0 !important;
  outline: none !important;
}

.card-fav-heart-btn .fav-heart-svg {
  width: 16px !important;
  height: 16px !important;
  fill: #fef08a !important; /* Gold heart matching Image 2 */
  transition: all 0.25s ease !important;
  pointer-events: none !important;
}

.card-fav-heart-btn:hover {
  transform: scale(1.15) !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.5) !important;
}

/* When favorited: Turns RED! (لم اضغط عليه يقلب احمر) */
.card-fav-heart-btn.is-favorited {
  background: radial-gradient(circle, rgba(60, 10, 10, 0.95) 0%, rgba(20, 5, 5, 0.98) 100%) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.75), 0 2px 8px rgba(0, 0, 0, 0.8) !important;
  animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.card-fav-heart-btn.is-favorited .fav-heart-svg {
  fill: #ef4444 !important; /* Vibrant Red Heart! */
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.9)) !important;
}

.card-fav-heart-btn.is-favorited:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.9) !important;
}

@keyframes heartPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.empty-favorites-msg {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 38px 20px !important;
  background: rgba(18, 16, 12, 0.7) !important;
  border: 1.5px dashed rgba(212, 168, 67, 0.35) !important;
  border-radius: 16px !important;
  text-align: center !important;
  backdrop-filter: blur(8px) !important;
  margin: 10px 0 20px !important;
}

.empty-favs-icon {
  font-size: 2.2rem !important;
  margin-bottom: 10px !important;
  animation: heartPulse 1.8s infinite ease-in-out !important;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.4)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.8)); }
}

.empty-favs-title {
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  color: #fef08a !important;
  margin-bottom: 6px !important;
}

.empty-favs-desc {
  font-size: 0.82rem !important;
  color: #94a3b8 !important;
  max-width: 420px !important;
  line-height: 1.5 !important;
}

.luxury-card-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(10,8,6,0.3) 60%, rgba(10,8,6,0.95) 100%) !important;
}

.luxury-card-body {
  padding: 8px 12px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  flex: 1 !important;
}

.luxury-card-title {
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin-bottom: 3px !important;
  text-align: center !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
}

.luxury-card-desc {
  font-size: 0.73rem !important;
  line-height: 1.45 !important;
  color: #cbd5e1 !important;
  margin-bottom: 8px !important;
  height: 38px !important;
  max-height: 38px !important;
  text-align: center !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
  word-break: break-word !important;
}

.luxury-card-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 5px !important;
  margin-bottom: 8px !important;
  margin-top: auto !important;
}

.luxury-tag {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(212, 168, 67, 0.35) !important;
  border-radius: 6px !important;
  padding: 2px 7px !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #e5e7eb !important;
}

.luxury-play-now-btn {
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  background: linear-gradient(180deg, #f7d579 0%, #d4af37 50%, #b8860b 100%) !important;
  color: #120e07 !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  border: 1px solid rgba(255, 245, 180, 0.45) !important;
  border-radius: 9999px !important;
  padding: 6px 14px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(247, 208, 112, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  direction: ltr !important;
  transform: translateZ(0) !important;
}

/* ── Moving White Glossy Light Sheen Flare Beam ── */
.luxury-play-now-btn::after {
  content: '' !important;
  position: absolute !important;
  top: -60% !important;
  left: -130% !important;
  width: 65% !important;
  height: 220% !important;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.15) 80%,
    transparent 100%
  ) !important;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9)) !important;
  transform: rotate(25deg) !important;
  pointer-events: none !important;
  opacity: 0 !important;
  z-index: 2 !important;
}

.luxury-play-now-btn:hover::after,
.luxury-game-card:hover .luxury-play-now-btn::after {
  opacity: 1 !important;
  animation: vipPlayBtnSheen 0.85s cubic-bezier(0.2, 0.85, 0.25, 1) forwards !important;
}

@keyframes vipPlayBtnSheen {
  0% {
    left: -130%;
  }
  100% {
    left: 200%;
  }
}

.luxury-play-now-btn:hover {
  background: linear-gradient(180deg, #fff5b8 0%, #fde047 30%, #f59e0b 80%, #d97706 100%) !important;
  border-color: #ffffff !important;
  transform: translateY(-2.5px) scale(1.025) !important;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.85), 0 0 25px rgba(255, 245, 180, 0.85), inset 0 1px 2px #ffffff !important;
  filter: brightness(1.06) !important;
}

.luxury-play-now-btn:active,
.luxury-play-now-btn.btn-pressed-active {
  transform: translateY(1.5px) scale(0.975) !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.6) !important;
  filter: brightness(0.96) !important;
}

.play-btn-text {
  font-weight: 900 !important;
  letter-spacing: 0.3px !important;
  position: relative !important;
  z-index: 3 !important;
  transition: transform 0.2s ease !important;
}

.btn-arrow-circle {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: #1c150b !important;
  color: #f7d070 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  flex-shrink: 0 !important;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
  position: relative !important;
  z-index: 3 !important;
}

.luxury-play-now-btn:hover .btn-arrow-circle {
  transform: scale(1.18) translateX(-3px) !important;
  background: #0d0a06 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.85), inset 0 0 4px rgba(255, 215, 0, 0.5) !important;
}

/* Custom Designed VIP Graphic Icons System */
.vip-icon-mini {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  margin-left: 4px;
}

.vip-badge-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  margin-left: 4px;
}

.vip-tile-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.vip-section-img {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  margin-left: 6px;
}

.vip-pill-img {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.vip-diff-img {
  width: 26px;
  height: 26px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.vip-chip-img {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  margin-bottom: 2px;
}

/* Modals Overlay & Styles */
.luxury-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Game Launcher Modal */
/* Game Launcher Modal */
.game-launcher-box {
  background: linear-gradient(150deg, rgba(16, 12, 8, 0.98) 0%, rgba(10, 7, 5, 0.99) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 26px;
  width: 100%;
  max-width: 530px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  direction: rtl !important;
  text-align: right;
  position: relative;
}

.launcher-header-banner {
  position: relative;
  width: 100%;
  height: 165px;
  overflow: hidden;
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.3);
}

.launcher-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: brightness(0.9);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-launcher-box:hover .launcher-cover-img {
  transform: scale(1.06);
}

.launcher-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgba(14, 10, 6, 0.8) 60%, rgba(14, 10, 6, 0.98) 100%);
}

.launcher-title-wrap {
  position: absolute;
  bottom: 16px;
  right: 22px;
  left: 60px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.launcher-crown-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(180, 83, 9, 0.3) 100%);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fef08a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 999px;
  padding: 3px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.launcher-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 15px rgba(245, 158, 11, 0.25);
  margin: 0;
  line-height: 1.25;
}

.launcher-close-x-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(14, 10, 6, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fef08a;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.launcher-close-x-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  color: #fff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

.launcher-body-actions {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.launcher-action-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(245, 158, 11, 0.02) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.2);
  border-radius: 18px;
  cursor: pointer;
  text-align: right;
  font-family: 'Cairo', sans-serif;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.launcher-action-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at right center, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* ── Moving White Glossy Light Sheen Flare Beam ── */
.launcher-action-tile::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -130%;
  width: 60%;
  height: 220%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 20%,
    rgba(255, 255, 255, 0.92) 50%,
    rgba(255, 255, 255, 0.12) 80%,
    transparent 100%
  );
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
  transform: rotate(25deg);
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}

.launcher-action-tile:hover::before {
  opacity: 1;
}

.launcher-action-tile:hover::after {
  opacity: 1;
  animation: vipTileLightSweep 0.85s cubic-bezier(0.2, 0.85, 0.25, 1) forwards;
}

@keyframes vipTileLightSweep {
  0% {
    left: -130%;
  }
  100% {
    left: 200%;
  }
}

.launcher-action-tile:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(245, 158, 11, 0.12) 100%);
  border-color: #f59e0b;
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 28px rgba(245, 158, 11, 0.45);
}

.launcher-action-tile:active {
  transform: translateY(1.5px) scale(0.98);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.launcher-action-tile.tile-bot:hover {
  border-color: #38bdf8;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 28px rgba(56, 189, 248, 0.5);
}

.launcher-action-tile.tile-room:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 28px rgba(245, 158, 11, 0.55);
}

.launcher-action-tile.tile-rules:hover {
  border-color: #c084fc;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 28px rgba(192, 132, 252, 0.5);
}

.launcher-tile-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.2;
  margin-right: auto;
}

.badge-instant {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.badge-popular {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fef08a;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.badge-guide {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.launcher-tile-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.bot-icon-wrap {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.1) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}

.room-icon-wrap {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.12) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.rules-icon-wrap {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(147, 51, 234, 0.1) 100%);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.2);
}

.launcher-action-tile:hover .launcher-tile-icon-wrap {
  transform: scale(1.08);
}

.launcher-tile-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.launcher-tile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.launcher-tile-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.launcher-tile-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.2px;
  transition: color 0.2s ease;
}

.launcher-action-tile:hover .launcher-tile-title {
  color: #fef08a;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.launcher-tile-desc {
  font-size: 0.8rem;
  color: #a1a1aa;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.launcher-action-tile:hover .launcher-tile-desc {
  color: #e4e4e7;
}

.launcher-tile-arrow-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.launcher-tile-arrow {
  font-size: 0.85rem;
  color: #f59e0b;
  transition: transform 0.25s ease;
}

.launcher-action-tile:hover .launcher-tile-arrow-circle {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.launcher-action-tile:hover .launcher-tile-arrow {
  transform: translateX(-3px);
}

/* Daily Reward Popup Card */
.daily-reward-popup-card {
  background: rgba(18, 14, 9, 0.96);
  border: 2px solid #eab308;
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.9), 0 0 45px rgba(234, 179, 8, 0.4);
  direction: rtl !important;
}

.daily-popup-icon-glow {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: pulseGift 2s infinite ease-in-out;
}

@keyframes pulseGift {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.6)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 25px rgba(234, 179, 8, 0.9)); }
}

.daily-popup-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.daily-popup-text {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 20px;
  line-height: 1.5;
}

.daily-reward-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border-radius: 999px;
  padding: 8px 24px;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
  margin-bottom: 24px;
}

.daily-popup-btn {
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.daily-popup-btn:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.8);
}

/* ==========================================================================
   3RB VIP Custom Vector Icons & Modal Docks Styling
   ========================================================================== */
.vip-icon-mini {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.vip-badge-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin-left: 4px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.vip-tile-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.25s ease;
}

.launcher-action-tile:hover .vip-tile-img {
  transform: scale(1.12);
}

.vip-section-img {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: -3px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(212, 175, 55, 0.35));
}

.vip-pill-img {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: -3px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.vip-diff-img {
  width: 26px;
  height: 26px;
  display: inline-block;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease;
}

.diff-card-btn:hover .vip-diff-img {
  transform: scale(1.12);
}

.vip-chip-img {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -3px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.setup-actions-row,
.diff-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(16, 21, 33, 0.95), rgba(11, 15, 23, 0.99));
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  padding: 12px 0 4px 0;
  margin-top: 14px;
  z-index: 10;
  backdrop-filter: blur(8px);
}

/* ── Luxury Active Match Return Navbar Button & Banner ── */
#navReturnMatchBtn,
.nav-actions .return-match-nav-btn,
.return-match-nav-btn {
  display: none !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 14px !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.38)) !important;
  border: 1.5px solid #10b981 !important;
  border-radius: 20px !important;
  color: #a7f3d0 !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

#navReturnMatchBtn.active,
.nav-actions .return-match-nav-btn.active,
.return-match-nav-btn.active {
  display: inline-flex !important;
}

.return-match-nav-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.38), rgba(5, 150, 105, 0.55)) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.75) !important;
  transform: translateY(-1px) scale(1.02) !important;
}

.live-dot-beacon {
  width: 9px !important;
  height: 9px !important;
  background: #10b981 !important;
  border-radius: 50% !important;
  display: inline-block !important;
  box-shadow: 0 0 10px #10b981 !important;
  animation: beaconPulse 1.4s ease-in-out infinite alternate !important;
}

@keyframes beaconPulse {
  0% { transform: scale(0.85); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
  100% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 14px #34d399; }
}

.return-match-arrow {
  font-size: 0.85rem !important;
  transition: transform 0.2s ease !important;
  color: #fde68a !important;
}

.return-match-nav-btn:hover .return-match-arrow {
  transform: translateX(-3px) !important;
}

/* Floating Banner in Lobby View */
.active-match-floating-banner {
  max-width: 1080px !important;
  width: 100% !important;
  margin: 6px auto 14px !important;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.92), rgba(15, 23, 42, 0.96)) !important;
  border: 1.5px solid rgba(52, 211, 153, 0.7) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(16, 185, 129, 0.35) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  direction: rtl !important;
  animation: bannerSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes bannerSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.active-match-banner-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 20px !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.active-match-banner-live {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(16, 185, 129, 0.2) !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
}

.active-match-pulse-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background-color: #34d399 !important;
  box-shadow: 0 0 10px #34d399 !important;
  animation: beaconPulse 1.2s infinite alternate !important;
}

.active-match-live-label {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  color: #a7f3d0 !important;
}

.active-match-banner-details {
  flex: 1 !important;
  min-width: 260px !important;
}

.active-match-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 2px !important;
}

.active-match-game-badge {
  color: #fde68a !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.4) !important;
}

.active-match-tag {
  background: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #fde68a !important;
  font-size: 0.72rem !important;
  padding: 2px 8px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

.active-match-desc {
  margin: 0 !important;
  font-size: 0.82rem !important;
  color: #cbd5e1 !important;
  line-height: 1.4 !important;
}

.active-match-resume-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 22px !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 1.5px solid #34d399 !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  font-family: 'Cairo', sans-serif !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.5) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
}

.active-match-resume-btn:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  border-color: #6ee7b7 !important;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.75) !important;
  transform: translateY(-2px) scale(1.03) !important;
}

.resume-btn-arrow {
  transition: transform 0.2s ease !important;
}

.active-match-resume-btn:hover .resume-btn-arrow {
  transform: translateX(-4px) !important;
}

/* ── Safe Exit Button (In-Game Top Header) ── */
.safe-exit-btn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.35)) !important;
  border: 1px solid rgba(239, 68, 68, 0.6) !important;
  color: #fecaca !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: pulseSafeExit 2s infinite alternate;
}

.safe-exit-btn:hover {
  background: rgba(239, 68, 68, 0.45) !important;
  border-color: #ef4444 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

@keyframes pulseSafeExit {
  0% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.3); }
  100% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.7); }
}

/* ── Disconnect Alert Modal ── */
.dc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dc-modal-card {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(145deg, #1e1b2e, #0f172a);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.25);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #f8fafc;
  font-family: 'Cairo', 'Outfit', sans-serif;
}

.dc-modal-badge {
  align-self: center;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
}

.dc-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.dc-modal-title span {
  color: #fbbf24;
}

.dc-modal-desc {
  margin: 0;
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.dc-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.dc-act-btn {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  border: none;
}

.btn-dc-wait {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f1f5f9;
}
.btn-dc-wait:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #f59e0b;
}

.btn-dc-bot {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}
.btn-dc-bot:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  transform: translateY(-1px);
}

.btn-dc-exit {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}
.btn-dc-exit:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  transform: translateY(-1px);
}



