/* client/css/hex-design.css */
/* KMKZ — Hexagonal Minimalist Design System (Ground Zero) */

/* ─── CSS Custom Properties ─────────────────────────────────── */
:root {
  --gold: #fbbf24;
  --gold-dim: rgba(251, 191, 36, 0.18);
  --gold-border: rgba(251, 191, 36, 0.35);
  --bg-deep: #080e1a;
  --bg-card: rgba(12, 20, 38, 0.92);
  --bg-card2: rgba(15, 27, 50, 0.88);
  --text-main: #e8edf5;
  --text-muted: #64748b;
  --text-bright: #f0f4ff;
  --accent-blue: #38bdf8;
  --accent-green: #22d3a5;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --hex-size: 52px;
}

/* ─── Hexagon Clip-path Shape ──────────────────────────────── */
.hex-shape {
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
}



/* ─── Hex Badge — Section Label ───────────────────────────── */
.hex-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251, 191, 36, 0.1) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  color: var(--gold) !important;
  padding: 5px 14px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  font-size: 0.75rem !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  position: relative;
  backdrop-filter: blur(10px) !important;
}

.hex-title {
  font-size: 1.3rem !important;
  font-weight: 900 !important;
  color: var(--text-bright) !important;
  text-shadow: none !important;
  letter-spacing: -0.3px;
  margin: 0 !important;
}

.hex-desc {
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
  line-height: 1.5;
  margin: 0 !important;
}

/* ─── Page Content Card ────────────────────────────────────── */
.page-content-card {
  width: 100%;
  max-width: 960px;
  background: linear-gradient(180deg, rgba(14, 23, 42, 0.92) 0%, rgba(10, 16, 30, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  padding: 26px 22px 90px 22px !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
  gap: 20px;
  min-height: auto;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Equalized Page Containers & Viewport for All 5 Sections ─── */
#lobby-screen {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
  position: relative !important;
}

#lobby-screen .app-header {
  flex-shrink: 0 !important;
  position: relative !important;
  top: 0 !important;
  z-index: 100 !important;
  height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
  min-height: 70px !important;
  max-height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
}

.app-header.app-header-hidden,
#lobby-screen .app-header.app-header-hidden,
#room-lobby-screen .app-header.app-header-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.lobby-pages-viewport {
  flex: 1 1 0% !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.lobby-page {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 10px 18px 115px 18px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overflow-x: clip !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y pinch-zoom !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}


#page-play .page-content-card,
#page-social .page-content-card,
#page-ranking .page-content-card,
#page-shop .page-content-card,
#page-settings .page-content-card,
#page-profile .page-content-card {
  width: 100% !important;
  max-width: 960px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  padding-top: 24px !important;
  overflow-x: hidden !important;
  overflow-x: clip !important;
}

#page-settings,
#page-profile {
  overflow-x: hidden !important;
  overflow-x: clip !important;
  max-width: 100vw !important;
}

.profile-page {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.shop-tabs-cyber-grid {
  display: grid !important;
  grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  overflow-x: visible !important;
  box-sizing: border-box !important;
  padding: 4px 0 6px !important;
  align-items: stretch !important;
}

.shop-tabs-cyber-grid .shop-tab-cyber-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 48px !important;
  min-height: 44px !important;
  max-height: 52px !important;
  padding: 4px 10px 3px !important;
  border-radius: 9999px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  flex: 1 1 0 !important;
  cursor: pointer !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  opacity: 0.78 !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.shop-tabs-cyber-grid .shop-tab-cyber-btn:hover:not(.active) {
  opacity: 1 !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #f8fafc !important;
  transform: translateY(-1px) !important;
}

.shop-tabs-cyber-grid .shop-tab-cyber-btn .tab-cyber-icon,
.shop-tabs-cyber-grid .shop-tab-cyber-btn .tab-cyber-icon-svg {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  font-size: 1rem !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.shop-tabs-cyber-grid .shop-tab-cyber-btn .tab-cyber-icon svg,
.shop-tabs-cyber-grid .shop-tab-cyber-btn .tab-cyber-icon-svg svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

.shop-tabs-cyber-grid .shop-tab-cyber-btn .tab-cyber-label {
  display: block !important;
  font-size: clamp(0.58rem, 1.8vw, 0.74rem) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100% !important;
  max-width: 100% !important;
  letter-spacing: -0.2px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 1px !important;
}

/* Marked / Active tab: clearly visible, high contrast, full legible text */
.shop-tabs-cyber-grid .shop-tab-cyber-btn.active,
.shop-tabs-pill-row .shop-tab-cyber-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.22) 50%, rgba(15, 23, 42, 0.98) 100%) !important;
  border: 1.5px solid #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.45), 0 4px 14px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(254, 240, 138, 0.4) !important;
  transform: translateY(-2px) !important;
  opacity: 1 !important;
  z-index: 3 !important;
}

.shop-tabs-cyber-grid .shop-tab-cyber-btn.active .tab-cyber-label,
.shop-tabs-pill-row .shop-tab-cyber-btn.active .tab-cyber-label {
  display: block !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: clamp(0.68rem, 1.8vw, 0.82rem) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(251, 191, 36, 0.7) !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  width: auto !important;
  max-width: none !important;
}

.shop-tabs-cyber-grid .shop-tab-cyber-btn.active .tab-cyber-icon svg,
.shop-tabs-cyber-grid .shop-tab-cyber-btn.active .tab-cyber-icon-svg svg {
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.9)) !important;
  transform: scale(1.08) !important;
}

/* Responsive: mobile & tablet fluid scroll with full text readability */
@media (max-width: 860px) {
  .shop-tabs-cyber-grid,
  .shop-tabs-pill-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    gap: 8px !important;
    padding: 6px 4px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    scroll-snap-type: x proximity !important;
    touch-action: pan-x pan-y !important;
  }

  .shop-tabs-cyber-grid::-webkit-scrollbar,
  .shop-tabs-pill-row::-webkit-scrollbar {
    display: none !important;
  }

  .shop-tabs-cyber-grid .shop-tab-cyber-btn,
  .shop-tabs-pill-row .shop-tab-cyber-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 76px !important;
    max-width: none !important;
    padding: 6px 14px 5px !important;
    height: 48px !important;
    border-radius: 9999px !important;
    scroll-snap-align: center !important;
  }

  .shop-tabs-cyber-grid .shop-tab-cyber-btn .tab-cyber-label,
  .shop-tabs-pill-row .shop-tab-cyber-btn .tab-cyber-label {
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
    font-size: 0.75rem !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .shop-tabs-cyber-grid .shop-tab-cyber-btn.active,
  .shop-tabs-pill-row .shop-tab-cyber-btn.active {
    min-width: 90px !important;
    padding: 6px 18px 5px !important;
  }

  .shop-tabs-cyber-grid .shop-tab-cyber-btn.active .tab-cyber-label,
  .shop-tabs-pill-row .shop-tab-cyber-btn.active .tab-cyber-label {
    font-size: 0.82rem !important;
    font-weight: 900 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
}

.social-filter-pills {
  display: flex !important;
  overflow: hidden !important;
  scrollbar-width: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.social-filter-pills::-webkit-scrollbar {
  display: none !important;
}

/* ─── Ranking Switcher Tabs — Full Width 1 Row 2 Columns ─── */
.ranking-tabs-wrapper {
  width: 100% !important;
  margin-bottom: 12px !important;
  box-sizing: border-box !important;
}

.ranking-tabs-pills {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.ranking-tabs-pills .ranking-tab-btn {
  width: 100% !important;
  padding: 12px 14px !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.ranking-tabs-pills .ranking-tab-btn .kmkz-coin-hex {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  vertical-align: middle !important;
}

/* ─── Hex Action Card (Jugar page) ─────────────────────────── */
.hex-action-zone {
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.92) 0%, rgba(10, 17, 34, 0.88) 50%, rgba(6, 12, 24, 0.95) 100%);
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 20px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 28px -8px rgba(245, 158, 11, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hex-action-zone::before {
  content: '';
  position: absolute;
  top: -35px;
  right: -35px;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.16) 0%, rgba(245, 158, 11, 0.04) 55%, transparent 70%);
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  opacity: 0.85;
  pointer-events: none;
}

.hex-action-zone::after {
  content: '';
  position: absolute;
  bottom: -25px;
  left: -25px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── Partida Rápida (Matchmaking Hero CTA) ───────────────── */
.quick-match-container {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.btn-quick-match {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.18) 45%, rgba(6, 78, 59, 0.22) 100%);
  border: 1.5px solid rgba(74, 222, 128, 0.55);
  border-radius: 16px;
  padding: 15px 18px;
  cursor: pointer;
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.btn-quick-match::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: skewX(-25deg);
  transition: left 0.75s ease;
  pointer-events: none;
  z-index: 2;
}

.btn-quick-match-glow {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 180%;
  background: radial-gradient(ellipse at 35% 50%, rgba(16, 185, 129, 0.35) 0%, rgba(52, 211, 153, 0.18) 45%, transparent 70%);
  pointer-events: none;
  opacity: 0.7;
  filter: blur(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  animation: pulseQuickMatchGlow 5s infinite ease-in-out alternate;
  z-index: 1;
}

@keyframes pulseQuickMatchGlow {
  0% {
    transform: translate(-3%, -2%) scale(0.96);
    opacity: 0.55;
  }

  50% {
    transform: translate(3%, 2%) scale(1.04);
    opacity: 0.85;
  }

  100% {
    transform: translate(-1%, 3%) scale(1);
    opacity: 0.65;
  }
}

.btn-quick-match:hover::before {
  left: 140%;
}

.btn-quick-match:hover .btn-quick-match-glow {
  opacity: 0.95;
  transform: scale(1.08);
}

.btn-quick-match:hover {
  transform: translateY(-2px);
  border-color: #4ade80;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.36) 0%, rgba(5, 150, 105, 0.25) 45%, rgba(6, 78, 59, 0.28) 100%);
}

.btn-quick-match:active {
  transform: translateY(0);
}

.btn-quick-match-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quick-match-badge-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease;
}

.btn-quick-match:hover .quick-match-badge-icon {
  transform: scale(1.08) rotate(6deg);
}

.quick-bolt {
  font-size: 1.4rem;
  color: #0f172a;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.3));
}

.quick-match-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-match-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.quick-match-desc {
  font-size: 0.78rem;
  font-weight: 500;
  color: #cbd5e1;
  line-height: 1.25;
}

.quick-match-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.55);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 0.74rem;
  font-weight: 900;
  color: #34d399;
  letter-spacing: 0.6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseQuickDot 1.5s infinite ease-in-out;
}

@keyframes pulseQuickDot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0.7);
    opacity: 0.4;
  }
}

@keyframes quickMatchMobileSheen {
  0% {
    left: -100%;
    opacity: 0;
  }

  15% {
    opacity: 0.85;
  }

  45% {
    left: 140%;
    opacity: 0.85;
  }

  46%,
  100% {
    left: 140%;
    opacity: 0;
  }
}

@keyframes pulseBoltQuick {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.15) rotate(5deg);
  }
}

/* ─── Queue Status Card ────────────────────────────────────── */
.hex-action-zone #queue-status {
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(74, 222, 128, 0.55);
  border-radius: 16px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  margin-top: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 197, 94, 0.18);
}

.hex-action-zone #queue-status .spinner {
  background: conic-gradient(from 0deg, #22c55e, transparent 70%) !important;
}

.queue-logo-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 2px auto 0;
}

.queue-domino-svg {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 12px rgba(250, 233, 166, 0.35));
}

/* ─── KMKZ Vector Logo Animations (Header #8, Login #1, Matchmaking #6) ─── */
.kmkz-logo-svg {
  aspect-ratio: 1 / 1;
  overflow: visible;
}

.kmkz-logo-svg.header-logo-img {
  width: auto !important;
  aspect-ratio: 1 / 1 !important;
}

.kmkz-logo-svg.login-logo-img {
  aspect-ratio: 1 / 1 !important;
  display: block;
}

.kmkz-logo-svg.hud-brand-gem-img {
  width: 42px !important;
  height: 42px !important;
  aspect-ratio: 1 / 1 !important;
  display: block !important;
}

.kmkz-piece {
  transform-box: fill-box;
  transform-origin: center;
}

/* Preset 8: Masked Gold Shimmer (App Header) */
@keyframes kmkzGlintSweep {
  0% {
    transform: translateX(0px);
  }
  55%, 100% {
    transform: translateX(360px);
  }
}

.kmkz-anim-shimmer .kmkz-glint-band {
  animation: kmkzGlintSweep 3.2s ease-in-out infinite;
}

/* Preset 1: Diagonal 30deg Slash Split & Snap (Login Menu) */
@keyframes kmkzSlashTop {
  0%, 10% { transform: translate(0, 0); }
  35% { transform: translate(16px, -9.2px); opacity: 0.85; }
  52% { transform: translate(-2px, 1.1px); opacity: 1; }
  60%, 100% { transform: translate(0, 0); }
}

@keyframes kmkzSlashBot {
  0%, 10% { transform: translate(0, 0); }
  35% { transform: translate(-16px, 9.2px); opacity: 0.85; }
  52% { transform: translate(2px, -1.1px); opacity: 1; }
  60%, 100% { transform: translate(0, 0); }
}

@keyframes kmkzSlashBeam {
  0%, 42% { opacity: 0; transform: translateX(-85px); }
  52% { opacity: 0.95; transform: translateX(0); }
  68%, 100% { opacity: 0; transform: translateX(85px); }
}

.kmkz-anim-slash .kmkz-k1,
.kmkz-anim-slash .kmkz-m {
  animation: kmkzSlashTop 2.8s cubic-bezier(.22, 1, .36, 1) infinite;
}

.kmkz-anim-slash .kmkz-k2,
.kmkz-anim-slash .kmkz-z {
  animation: kmkzSlashBot 2.8s cubic-bezier(.22, 1, .36, 1) infinite;
}

.kmkz-anim-slash .kmkz-slash-beam {
  animation: kmkzSlashBeam 2.8s ease-out infinite;
}

/* Preset 6: Domino Wave Cadence (Buscando Partida / Matchmaking) */
@keyframes kmkzDominoBeat {
  0%, 50%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
  18% { transform: translateY(-9px) scale(1.07); filter: brightness(1.25); }
  32% { transform: translateY(2px) scale(0.98); filter: brightness(1); }
}

.kmkz-anim-domino .kmkz-k1 { animation: kmkzDominoBeat 1.8s ease-in-out infinite 0.00s; }
.kmkz-anim-domino .kmkz-m  { animation: kmkzDominoBeat 1.8s ease-in-out infinite 0.16s; }
.kmkz-anim-domino .kmkz-k2 { animation: kmkzDominoBeat 1.8s ease-in-out infinite 0.32s; }
.kmkz-anim-domino .kmkz-z  { animation: kmkzDominoBeat 1.8s ease-in-out infinite 0.48s; }

.hex-action-zone #queue-status.hidden {
  display: none !important;
}

.queue-status-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.queue-searching-msg {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.98rem;
  color: #f8fafc;
}

.queue-searching-sub {
  font-size: 0.78rem;
  color: #94a3b8;
}

.btn-cancel-queue {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  font-family: 'Outfit', sans-serif !important;
}

.btn-cancel-queue:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ─── Lobby Action Row ─────────────────────────────────────── */
.lobby-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.btn-social-rooms,
.btn-create-room {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Outfit', sans-serif;
  position: relative;
  overflow: hidden;
}

.btn-social-rooms {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14) 0%, rgba(30, 58, 138, 0.25) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-social-rooms:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24) 0%, rgba(30, 58, 138, 0.38) 100%);
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-social-rooms:active {
  transform: translateY(0);
}

.btn-create-room {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border: 1.5px solid rgba(254, 240, 138, 0.45) !important;
  color: #0f172a !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.btn-create-room:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  border-color: #fef08a !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.btn-create-room:active {
  transform: translateY(0) !important;
}

.action-tile-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.btn-social-rooms .action-tile-icon {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

.btn-social-rooms:hover .action-tile-icon {
  transform: scale(1.08);
}

.btn-create-room .action-tile-icon {
  background: rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(15, 23, 42, 0.2);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-create-room:hover .action-tile-icon {
  transform: scale(1.08) rotate(90deg);
}

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

.action-tile-title {
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-social-rooms .action-tile-title {
  color: #f0f9ff;
}

.btn-create-room .action-tile-title {
  color: #0f172a;
}

.action-tile-caption {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-social-rooms .action-tile-caption {
  color: #93c5fd;
}

.btn-create-room .action-tile-caption {
  color: rgba(15, 23, 42, 0.85);
}

.action-tile-arrow {
  font-size: 1rem;
  font-weight: 900;
  transition: transform 0.22s ease;
}

.btn-social-rooms .action-tile-arrow {
  color: #38bdf8;
}

.btn-create-room .action-tile-arrow {
  color: #0f172a;
}

.btn-social-rooms:hover .action-tile-arrow {
  transform: translateX(4px);
}

/* ─── Join Room Box ────────────────────────────────────────── */
.join-room-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: rgba(8, 14, 26, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 5px 6px 5px 14px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.join-room-box:focus-within {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 16px rgba(251, 191, 36, 0.22);
}

.join-room-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  opacity: 0.75;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.join-room-box:focus-within .join-room-icon {
  color: #fbbf24;
  opacity: 1;
}

.join-room-box input {
  flex: 1;
  padding: 8px 6px;
  background: transparent !important;
  border: none !important;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 4px;
  text-align: left;
  font-family: 'Outfit', monospace;
  outline: none !important;
  box-shadow: none !important;
}

.join-room-box input::placeholder {
  color: #64748b;
  letter-spacing: 1.5px;
  font-size: 0.82rem;
  font-weight: 700;
}

.join-room-box .btn-primary {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(217, 119, 6, 0.35) 100%) !important;
  color: #fbbf24 !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 10px !important;
  padding: 10px 18px !important;
  font-weight: 900 !important;
  font-size: 0.84rem !important;
  letter-spacing: 0.6px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  font-family: 'Outfit', sans-serif !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.join-room-box .btn-primary:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0f172a !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4) !important;
  transform: translateY(-1px) !important;
}

.btn-join-arrow {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.join-room-box .btn-primary:hover .btn-join-arrow {
  transform: translateX(3px);
}

/* ─── App-Only Quick Links (Tutorial / Rules / Legal) ───────── */
.app-only-quick-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
}

.btn-app-quick-link {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(8, 14, 26, 0.9) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #cbd5e1;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  outline: none;
  user-select: none;
  touch-action: manipulation;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 3px 10px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}

.btn-app-quick-link:active {
  transform: scale(0.96);
  opacity: 0.92;
}

.btn-app-quick-link * {
  pointer-events: none;
}

.btn-app-quick-link span:not(.app-quick-icon) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.btn-app-quick-link .app-quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-app-quick-link .app-quick-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.btn-how-to-play {
  border-color: rgba(56, 189, 248, 0.22);
}

.btn-how-to-play .app-quick-icon {
  color: #38bdf8;
}

.btn-how-to-play:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(14, 116, 144, 0.22) 100%);
  border-color: rgba(56, 189, 248, 0.55);
  color: #f0f9ff;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-how-to-play:hover .app-quick-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

.btn-how-to-play:active {
  transform: translateY(0);
  background: rgba(56, 189, 248, 0.2);
}

.btn-app-legal {
  border-color: rgba(251, 191, 36, 0.22);
}

.btn-app-legal .app-quick-icon {
  color: #fbbf24;
}

.btn-app-legal:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16) 0%, rgba(217, 119, 6, 0.22) 100%);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fef3c7;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-app-legal:hover .app-quick-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}

.btn-app-legal:active {
  transform: translateY(0);
  background: rgba(251, 191, 36, 0.2);
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn-accent {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #0f172a !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 12px 24px !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-family: 'Outfit', sans-serif !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3) !important;
}

.btn-accent:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4) !important;
}

.btn-accent:active {
  transform: translateY(0) !important;
}

.btn-primary {
  background: rgba(251, 191, 36, 0.1) !important;
  color: var(--gold) !important;
  border: 1.5px solid var(--gold-border) !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  font-family: 'Outfit', sans-serif !important;
}

.btn-primary:hover {
  background: rgba(251, 191, 36, 0.2) !important;
  border-color: var(--gold) !important;
  transform: translateY(-1px) !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-main) !important;
  border: 1.5px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  font-family: 'Outfit', sans-serif !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ─── Stat Badges in Header ────────────────────────────────── */
.user-stats-bar,
.desktop-stats-bar,
.app-header .user-stats-bar,
.app-header .desktop-stats-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  width: 100% !important;
}

@media (max-width: 768px) {

  .mobile-stats-buttons,
  .app-header .mobile-stats-buttons,
  #mobile-stats-buttons {
    display: none !important;
  }
}

.stat-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

.stat-badge.gold {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}

/* ─── Mobile Header Stats Buttons (Recompensa & Moneda) ──────── */
.mobile-stats-buttons {
  display: none;
  align-items: center;
  gap: 6px;
  position: relative;
}

.mobile-stat-btn-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-mobile-stat {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 12px !important;
  color: #fff !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-mobile-stat:active {
  transform: scale(0.92) !important;
  border-color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.15) !important;
}

/* ─── Responsive Header Coins Button ────────────────────────── */
#btn-mobile-coins.header-coins-btn-responsive {
  width: auto !important;
  min-width: 44px !important;
  max-width: 175px !important;
  height: 44px !important;
  padding: 0 10px 0 8px !important;
  gap: 6px !important;
  border-radius: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

#btn-mobile-coins .header-coins-val-label {
  display: inline-block !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #fef08a !important;
  letter-spacing: -0.2px !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 110px !important;
  line-height: 1 !important;
}

#btn-mobile-coins .header-coins-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

@media (max-width: 480px) {
  #btn-mobile-coins.header-coins-btn-responsive {
    width: auto !important;
    min-width: 40px !important;
    max-width: 160px !important;
    height: 40px !important;
    padding: 0 8px 0 6px !important;
    gap: 5px !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  #btn-mobile-coins .header-coins-val-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 0.80rem !important;
    letter-spacing: -0.3px !important;
    font-variant-numeric: tabular-nums !important;
    max-width: 96px !important;
  }
}

@media (max-width: 360px) {
  #btn-mobile-coins.header-coins-btn-responsive {
    width: auto !important;
    min-width: 36px !important;
    max-width: 145px !important;
    height: 38px !important;
    padding: 0 6px 0 4px !important;
    gap: 4px !important;
    border-radius: 11px !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  #btn-mobile-coins .header-coins-val-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 0.74rem !important;
    letter-spacing: -0.35px !important;
    font-variant-numeric: tabular-nums !important;
    max-width: 88px !important;
  }
}

.mobile-stat-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #0f172a;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseWalletDot 1.8s infinite;
}

@keyframes pulseWalletDot {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.mobile-coins-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: auto;
  min-width: 100px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  border-radius: 14px;
  padding: 6px 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(251, 191, 36, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popoverSlideDown 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.mobile-coins-popover.hidden {
  display: none !important;
}

.mobile-coins-popover-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-coins-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.m-coins-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.m-coins-val-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 12px;
  padding: 10px;
}

.m-coins-amount {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fef08a;
  letter-spacing: 0.5px;
  font-family: 'Outfit', sans-serif;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.m-coins-unit {
  font-size: 1.2rem;
}

.m-coins-actions {
  display: flex;
  gap: 8px;
}

.btn-m-shop,
.btn-m-casino {
  flex: 1;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-m-shop {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
}

.btn-m-shop:active {
  transform: scale(0.95);
  filter: brightness(1.1);
}

.btn-m-casino {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-m-casino:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.95);
}

/* ─── Bell Button ──────────────────────────────────────────── */
.btn-notifications-bell {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 12px !important;
  color: var(--gold) !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  font-size: 1.1rem !important;
  cursor: pointer !important;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.btn-notifications-bell:hover {
  background: var(--gold-dim) !important;
  border-color: var(--gold) !important;
  transform: scale(1.06) !important;
}

/* Bell subtle sway when notifications are pending */
.notifications-bell-container.has-notifications .btn-notifications-bell svg {
  animation: bell-subtle-swing 3.8s ease-in-out infinite;
  transform-origin: top center;
}

/* Radar Ping Glow on Badge */
#notifications-badge-count {
  position: absolute !important;
  top: -3px !important;
  right: -3px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  border-radius: 999px !important;
  padding: 1px 5px !important;
  min-width: 17px !important;
  height: 17px !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #080e1a !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.95), 0 0 20px rgba(239, 68, 68, 0.4) !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

#notifications-badge-count::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.7);
  z-index: -1;
  animation: badge-ping-radar 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes badge-ping-radar {
  0% {
    transform: scale(0.9);
    opacity: 0.85;
  }

  65%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes bell-subtle-swing {

  0%,
  75%,
  100% {
    transform: rotate(0deg);
  }

  80% {
    transform: rotate(14deg);
  }

  85% {
    transform: rotate(-12deg);
  }

  90% {
    transform: rotate(8deg);
  }

  95% {
    transform: rotate(-4deg);
  }
}

/* ─── KMKZ Notification Center (#kmkz-notification-center) ─── */
#kmkz-notification-center {
  position: fixed !important;
  top: 68px !important;
  right: 18px !important;
  width: 380px !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100vh - 90px) !important;
  background: linear-gradient(165deg, rgba(13, 20, 36, 0.96) 0%, rgba(8, 14, 26, 0.98) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(251, 191, 36, 0.14), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  z-index: 99999999 !important;
  padding: 16px !important;
  color: #fff !important;
  font-family: 'Outfit', sans-serif !important;
  box-sizing: border-box !important;
  flex-direction: column !important;
  gap: 12px !important;
  overflow: hidden !important;
  animation: kmkzNotifDropdown 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top right;
}

@keyframes kmkzNotifDropdown {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 600px) {
  #kmkz-notification-center {
    top: 70px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 80px) !important;
    border-radius: 18px !important;
    padding: 14px !important;
    transform-origin: top center;
  }
}

/* Header */
.kmkz-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  flex-shrink: 0;
}

.kmkz-notif-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, #fbbf24, transparent);
}

.kmkz-notif-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kmkz-notif-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.22);
  flex-shrink: 0;
}

.kmkz-notif-icon-badge svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kmkz-notif-title {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.3px;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 40%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kmkz-notif-count-pill {
  font-size: 0.7rem;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  -webkit-text-fill-color: #fbbf24;
  letter-spacing: 0.2px;
}

.kmkz-notif-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kmkz-notif-btn-clear {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fca5a5;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Outfit', sans-serif;
}

.kmkz-notif-btn-clear:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.kmkz-notif-btn-clear svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.kmkz-notif-btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.kmkz-notif-btn-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}
.kmkz-notif-btn-close:active {
  transform: scale(0.94);
}

.kmkz-notif-btn-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

/* List container */
.kmkz-notif-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(55vh, 480px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  box-sizing: border-box;
}

.kmkz-notif-list::-webkit-scrollbar {
  width: 5px;
}

.kmkz-notif-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.kmkz-notif-list::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.25);
  border-radius: 10px;
}

.kmkz-notif-list::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.45);
}

/* Empty State */
.kmkz-notif-empty {
  text-align: center;
  padding: 36px 16px 28px 16px;
  color: #94a3b8;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.kmkz-notif-empty-medallion {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(251, 191, 36, 0.14) 0%, rgba(15, 23, 42, 0.3) 70%);
  border: 1.5px dashed rgba(251, 191, 36, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(251, 191, 36, 0.75);
  margin-bottom: 6px;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.08);
  animation: kmkzPulseSlow 4s ease-in-out infinite alternate;
}

@keyframes kmkzPulseSlow {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.06);
  }

  100% {
    transform: scale(1.04);
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.18);
  }
}

.kmkz-notif-empty-medallion svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.kmkz-notif-empty-title {
  font-weight: 800;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.kmkz-notif-empty-sub {
  font-size: 0.8rem;
  color: #64748b;
  max-width: 240px;
  line-height: 1.45;
}

/* Card General */
.kmkz-notif-card {
  position: relative;
  background: linear-gradient(145deg, rgba(20, 29, 50, 0.92) 0%, rgba(12, 18, 33, 0.95) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.kmkz-notif-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.kmkz-notif-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Card Types */
.kmkz-notif-card.card-active-game {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 6px 22px rgba(251, 191, 36, 0.15);
  background: linear-gradient(145deg, rgba(35, 28, 14, 0.95) 0%, rgba(15, 23, 42, 0.96) 100%);
}

.kmkz-notif-card.card-active-game::before {
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
}

.kmkz-notif-card.card-friend-request {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.12);
  background: linear-gradient(145deg, rgba(14, 28, 45, 0.92) 0%, rgba(12, 19, 34, 0.96) 100%);
}

.kmkz-notif-card.card-friend-request::before {
  background: linear-gradient(180deg, #0284c7, #38bdf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}

.kmkz-notif-card.card-match-invite {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(145deg, rgba(23, 23, 43, 0.92) 0%, rgba(13, 17, 30, 0.96) 100%);
}

.kmkz-notif-card.card-match-invite::before {
  background: linear-gradient(180deg, #d97706, #fbbf24);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.kmkz-notif-card.card-direct-message {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.16);
  background: linear-gradient(145deg, rgba(28, 16, 42, 0.94) 0%, rgba(15, 12, 28, 0.98) 100%);
}

.kmkz-notif-card.card-direct-message::before {
  background: linear-gradient(180deg, #9333ea, #c084fc);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.8);
}

.btn-notif-primary.btn-chat {
  background: linear-gradient(135deg, #9333ea 0%, #6366f1 100%);
  border-color: rgba(192, 132, 252, 0.5);
  color: #ffffff;
}

.btn-notif-primary.btn-chat:hover {
  background: linear-gradient(135deg, #a855f7 0%, #4f46e5 100%);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
}

/* Card Top Row */
.kmkz-notif-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kmkz-notif-badge-type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.2px;
}

.card-active-game .kmkz-notif-badge-type {
  color: #fbbf24;
}

.card-friend-request .kmkz-notif-badge-type {
  color: #38bdf8;
}

.card-match-invite .kmkz-notif-badge-type {
  color: #fbbf24;
}

.kmkz-notif-type-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  flex-shrink: 0;
}

.card-active-game .kmkz-notif-type-icon {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.card-friend-request .kmkz-notif-type-icon {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.card-match-invite .kmkz-notif-type-icon {
  background: rgba(251, 191, 36, 0.16);
  color: #fbbf24;
}

.kmkz-notif-type-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.kmkz-notif-time-badge {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kmkz-notif-time-badge svg {
  width: 11px;
  height: 11px;
  opacity: 0.7;
}

.kmkz-notif-live-pill {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kmkz-notif-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: kmkzLiveDotPulse 1.4s infinite ease-in-out;
}

@keyframes kmkzLiveDotPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}

/* Card Message Body */
.kmkz-notif-body {
  font-size: 0.83rem;
  color: #e2e8f0;
  line-height: 1.45;
  word-break: break-word;
}

.kmkz-notif-body strong {
  color: #ffffff;
}

.kmkz-notif-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Card Actions */
.kmkz-notif-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-notif-primary {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  color: #080e1a !important;
  font-weight: 800;
  font-size: 0.79rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn-notif-primary.btn-game {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.btn-notif-primary.btn-game:hover {
  background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.4);
}

.btn-notif-primary.btn-friend {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff !important;
}

.btn-notif-primary.btn-friend:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, #0369a1 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
}

.btn-notif-secondary {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.79rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Outfit', sans-serif;
}

.btn-notif-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.btn-notif-secondary svg,
.btn-notif-primary svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
}

/* ─── Hexagonal Decorative Tiles (Section Headers) ─────────── */
.hex-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.hex-icon-tile {
  width: 44px;
  height: 44px;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold-border);
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: var(--gold);
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hex-icon-tile svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  display: block;
}

#page-play .hex-icon-tile {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

#page-social .hex-icon-tile {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
}

#page-ranking .hex-icon-tile {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
}

#page-shop .hex-icon-tile {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.45);
  background: rgba(192, 132, 252, 0.12);
}

#page-settings .hex-icon-tile,
#page-profile .hex-icon-tile {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.12);
}

/* ─── Compact Social Online Stat Badge ──────────────────────── */
#social-online-count,
.social-hero-stat-badge {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

@media (max-width: 600px) {

  #social-online-count,
  .social-hero-stat-badge {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
  }
}

/* ─── Player List / Social Cards ───────────────────────────── */
.social-player-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.85));
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-player-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-1px);
}

.reg-hex-avatar {
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  transition: border-color 0.2s;
}

.player-row:hover {
  border-color: var(--gold-border);
}

/* ─── Leaderboard Table ─────────────────────────────────────── */
.responsive-ranking-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 6px !important;
  box-sizing: border-box !important;
  font-family: 'Outfit', sans-serif;
}

.responsive-ranking-table thead tr {
  background: rgba(251, 191, 36, 0.06);
  border-bottom: 1px solid var(--gold-border);
}

.responsive-ranking-table th {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 12px;
}

.responsive-ranking-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.responsive-ranking-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.leaderboard-table-container {
  border: 1px solid var(--gold-border) !important;
  border-radius: 16px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: var(--bg-card) !important;
}

/* ─── Shop Tabs ─────────────────────────────────────────────── */
.shop-tabs-pills {
  display: flex;
  gap: 6px;
  padding: 2px;
}

.shop-tab-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

.shop-tab-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}

.shop-tab-btn:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

/* ─── Shop Grid & Carousel — Responsive Fix ─────────────────── */
/* Override style.css which sets display:flex on shop-carousel-container,
   breaking the inner grid layout */
.shop-carousel-container {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 4px 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.shop-items-grid-container {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Hide the prev/next carousel nav buttons since we use a grid */
.btn-shop-nav {
  display: none !important;
}

/* Fix shop-items-carousel if used instead of grid */
.shop-items-carousel {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  padding: 4px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.shop-card-item {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Category wrapper scroll fix */
.shop-category-wrapper {
  margin-bottom: 12px !important;
  max-width: 100% !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.shop-category-wrapper:has(.shop-tabs-pills) {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x !important;
}

.shop-tabs-pills {
  display: flex;
  gap: 6px;
  padding: 2px;
  /* allow horizontal scroll without wrapping */
  flex-wrap: nowrap;
  width: max-content;
}



@keyframes legendaryGlow {
  0% {
    box-shadow: 0 4px 18px rgba(251, 191, 36, 0.2);
  }

  100% {
    box-shadow: 0 6px 28px rgba(251, 191, 36, 0.45);
  }
}

/* Card States */
.shop-card-hex.state-equipped {
  border: 2px solid #fbbf24 !important;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.12), rgba(15, 23, 42, 0.98)) !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.35) !important;
}

.shop-card-hex.state-owned {
  border: 1.5px solid rgba(34, 211, 165, 0.5) !important;
}

/* Rarity Tag Pill */
.rarity-badge-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.rarity-tag-common {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.rarity-tag-rare {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.rarity-tag-epic {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.rarity-tag-legendary {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.5);
}

/* Action Buttons inside Card */
.btn-shop-action {
  width: 100%;
  padding: 9px 6px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Outfit', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
}

.btn-shop-action.btn-buy {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

.btn-shop-action.btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35);
}

.btn-shop-action.btn-equip {
  background: rgba(34, 211, 165, 0.15);
  border: 1.5px solid #22d3a5;
  color: #22d3a5;
}

.btn-shop-action.btn-equip:hover {
  background: rgba(34, 211, 165, 0.28);
  transform: translateY(-1px);
}

.btn-shop-action.btn-active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.25));
  border: 1.5px solid #fbbf24;
  color: #fbbf24;
  cursor: default;
}

/* Collapsible Color Forge Trigger & Drawer */
.color-forge-toggle-btn {
  width: 100%;
  padding: 10px 14px;
  background: rgba(251, 191, 36, 0.08);
  border: 1.5px dashed rgba(251, 191, 36, 0.4);
  border-radius: 14px;
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.color-forge-toggle-btn:hover {
  background: rgba(251, 191, 36, 0.16);
  border-color: #fbbf24;
}

/* Empty State Card */
.shop-empty-card {
  text-align: center;
  padding: 36px 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px dashed var(--border-subtle);
  border-radius: 18px;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.shop-empty-card .icon {
  font-size: 2.4rem;
  margin-bottom: 4px;
}

/* ─── Tab Bar Bottom ────────────────────────────────────────── */
.tab-bar-bottom {
  background: transparent !important;
  border: none !important;
  border-top: none !important;
  box-shadow: none !important;
}

.tab-bar-item.active-tab .tab-icon {
  transform: none !important;
}

/* ─── Login Screen (Mobile-First, Spacious & WCAG Accessible) ─ */
#login-screen {
  background: radial-gradient(ellipse at 30% 20%, rgba(251, 191, 36, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #060b16 0%, #0b1426 100%) !important;
  padding: max(12px, env(safe-area-inset-top, 12px)) max(14px, env(safe-area-inset-right, 14px)) max(12px, env(safe-area-inset-bottom, 12px)) max(14px, env(safe-area-inset-left, 14px)) !important;
  align-items: center !important;
  justify-content: center !important;
}

.login-card,
.login-card-glass {
  width: 100% !important;
  max-width: 452px !important;
  height: auto !important;
  max-height: calc(100dvh - 24px) !important;
  padding: 16px 18px 14px !important;
  gap: 11px !important;
  background: linear-gradient(165deg, rgba(16, 25, 45, 0.94) 0%, rgba(8, 13, 27, 0.98) 100%) !important;
  border: 1px solid rgba(246, 223, 151, 0.24) !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

.login-card-glass::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 116px;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.11) 0%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.login-card-glass > * {
  position: relative;
  z-index: 1;
}

/* Unified Top Utility Row */
.login-card-glass .login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 28px;
  gap: 8px;
  z-index: 3;
  pointer-events: none;
}

.login-card-glass .login-topbar > * {
  pointer-events: auto;
}

.login-card-glass .auth-lang-selector {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(7, 11, 22, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 2px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.login-card-glass .btn-auth-lang {
  color: #cbd5e1;
  border-radius: 11px;
  min-width: 30px;
  min-height: 24px;
  padding: 2px 8px;
  justify-content: center;
}

.login-card-glass .btn-auth-lang:focus-visible,
.login-card-glass #btn-close-auth-screen:focus-visible,
.login-card-glass .auth-tab-btn:focus-visible,
.login-card-glass .btn-toggle-pass:focus-visible,
.login-card-glass #chk-remember-email:focus-visible,
.login-card-glass #btn-forgot-password:focus-visible,
.login-card-glass .btn-guest-play:focus-visible,
.login-card-glass .guest-mode-legal a:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

.login-card-glass .login-header {
  gap: 3px;
  margin: -34px 0 0;
  pointer-events: none;
}

.login-card-glass .login-logo-img {
  width: 76px;
  height: 76px;
  max-height: 76px;
  max-width: 76px;
}

.login-card-glass .login-subtitle {
  color: #a5b4cb;
  font-size: 0.72rem;
  letter-spacing: 0.15px;
  line-height: 1.25;
}

.login-card-glass .auth-tabs {
  background: rgba(6, 10, 20, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 3px;
  border-radius: 12px;
}

.login-card-glass .auth-tab-btn {
  color: #cbd5e1;
  font-weight: 700;
  border-radius: 9px;
  padding: 8px 10px;
  min-height: 34px;
}

.login-card-glass .auth-tab-btn:hover:not(.active) {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.login-card-glass .auth-tab-btn.active {
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 55%, #d97706 100%) !important;
  color: #090e1a !important;
  font-weight: 800 !important;
  text-shadow: none !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ─── Casino Bet Currency Icon ──────────────────────────────── */
.bet-currency-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
}

.bet-currency-icon .kmkz-coin-hex {
  width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
}

/* ─── Auth Form ─────────────────────────────────────────────── */
.login-card-glass #auth-email-form {
  gap: 10px;
}

.login-card-glass .auth-input-group {
  gap: 4px;
}

.auth-input-group label {
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  margin-bottom: 0;
  display: block;
}

.auth-input-group input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: rgba(6, 11, 22, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.88rem;
  font-family: 'Outfit', sans-serif;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-input-group input::placeholder {
  color: #94a3b8;
  opacity: 0.85;
}

.auth-input-group input:hover {
  border-color: rgba(251, 191, 36, 0.42);
}

.auth-input-group input:focus,
.auth-input-group input:focus-visible {
  outline: none;
  background: rgba(8, 14, 28, 0.96);
  border-color: #38bdf8;
  box-shadow: 0 0 0 2.5px rgba(56, 189, 248, 0.25);
}

.login-card-glass .auth-password-wrapper input {
  padding-right: 42px;
}

.login-card-glass .btn-toggle-pass {
  width: 32px;
  height: 32px;
  right: 5px;
  padding: 0;
  border-radius: 7px;
  color: #cbd5e1;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.login-card-glass .btn-toggle-pass:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

/* Unified Meta Row: Remember + Forgot Password */
.login-card-glass .auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-height: 24px;
  margin: 0;
}

.login-card-glass .auth-remember-row label {
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 500;
}

.login-card-glass #btn-forgot-password {
  color: #7dd3fc;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 4px;
  text-align: right;
}

.login-card-glass #btn-forgot-password:hover {
  color: #bae6fd;
}

.login-card-glass .auth-error-text {
  background: rgba(153, 27, 27, 0.28);
  border: 1px solid rgba(248, 113, 113, 0.65);
  color: #fecaca;
}

.login-card-glass button#btn-email-submit.auth-submit-btn {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 16px !important;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 45%, #d97706 100%) !important;
  color: #090e1a !important;
  text-shadow: none !important;
  border: 1px solid rgba(254, 240, 138, 0.72) !important;
  border-radius: 11px !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.25px !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease !important;
}

.login-card-glass button#btn-email-submit.auth-submit-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

.login-card-glass button#btn-email-submit.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.99) !important;
}

.login-card-glass button#btn-email-submit.auth-submit-btn:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

.login-card-glass button#btn-email-submit.auth-submit-btn:disabled,
.login-card-glass button#btn-email-submit.auth-submit-btn.btn-loading {
  opacity: 0.72 !important;
  cursor: wait !important;
}

/* Alternative Access Section: Single Divider + 2-Column Action Grid */
.login-card-glass .auth-alt-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.login-card-glass .auth-oauth-separator .sep-line {
  background: rgba(148, 163, 184, 0.2);
}

.login-card-glass .auth-oauth-separator .sep-text {
  color: #a5b4cb;
}

.login-card-glass .auth-alt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.login-card-glass .btn-google-login,
.login-card-glass .btn-guest-play {
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  gap: 7px;
  font-size: clamp(0.73rem, 2.8vw, 0.80rem);
  line-height: 1.15;
  text-align: center;
}

.login-card-glass .btn-google-login {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
}

.login-card-glass .btn-google-login span,
.login-card-glass .btn-guest-play span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.15;
}

.login-card-glass .btn-google-login span {
  color: #0f172a;
  font-size: inherit;
}

.login-card-glass .btn-google-login:hover:not(:disabled) {
  background: #ffffff;
}

.login-card-glass .btn-guest-play {
  background: linear-gradient(135deg, #075985 0%, #0c4a6e 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #f8fafc;
  font-weight: 800;
  box-shadow: 0 3px 12px rgba(7, 89, 133, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.login-card-glass .btn-guest-play .guest-icon-svg {
  flex-shrink: 0;
  color: #7dd3fc;
}

.login-card-glass .btn-guest-play:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  border-color: rgba(125, 211, 252, 0.65);
  filter: none;
}

.login-card-glass .guest-mode-legal {
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  gap: 8px;
}

.login-card-glass .guest-mode-legal a {
  color: #cbd5e1;
  border-radius: 4px;
  padding: 2px 4px;
}

.login-card-glass .guest-mode-legal a:hover {
  color: #fde68a;
}

@media (min-width: 480px) {
  .login-card,
  .login-card-glass {
    padding: 20px 24px 18px !important;
    gap: 13px !important;
  }

  .login-card-glass .login-header {
    margin-top: -38px;
  }

  .login-card-glass .login-logo-img {
    width: 86px;
    height: 86px;
    max-height: 86px;
    max-width: 86px;
  }

  .login-card-glass .login-subtitle {
    font-size: 0.76rem;
  }

  .login-card-glass #auth-email-form {
    gap: 12px;
  }

  .auth-input-group input {
    height: 44px;
    padding: 0 14px;
  }

  .login-card-glass .btn-google-login,
  .login-card-glass .btn-guest-play {
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 0.81rem;
  }
}

@media (max-width: 340px) {
  .login-card-glass .auth-alt-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-height: 580px) {
  .login-card,
  .login-card-glass {
    padding: 12px 16px !important;
    gap: 8px !important;
  }

  .login-card-glass .login-header {
    margin-top: -24px;
  }

  .login-card-glass .login-logo-img {
    width: 58px;
    height: 58px;
    max-height: 58px;
    max-width: 58px;
  }

  .login-card-glass #auth-email-form {
    gap: 7px;
  }

  .auth-input-group input {
    height: 38px;
  }

  .login-card-glass button#btn-email-submit.auth-submit-btn,
  .login-card-glass .btn-google-login,
  .login-card-glass .btn-guest-play {
    height: 38px !important;
    min-height: 38px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-card-glass {
    animation: none !important;
  }
}

/* ─── Hexagonal Background Pattern ────────────────────────── */
.lobby-hex-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.028;
}

.lobby-hex-bg svg {
  width: 100%;
  height: 100%;
}

/* ─── Profile Section ──────────────────────────────────────── */
.pcard {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 18px !important;
  padding: 18px !important;
  box-shadow: none !important;
}

.pcard-title {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  color: var(--text-muted) !important;
  margin-bottom: 12px !important;
}

/* ─── Language Selector Grid (1 Row, 2 Columns) ───────────── */
.language-selector-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.lang-option-card {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* ─── Collection Tabs — Equal Size & Seamless Layout ───────── */
.collection-tabs-pills {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .collection-tabs-pills {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }
}

@media (max-width: 480px) {
  .collection-tabs-pills {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
  }
}

.collection-tabs-pills .collection-tab-btn,
.collection-tabs-pills .shop-tab-btn {
  width: 100% !important;
  height: 38px !important;
  padding: 0 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
}

@media (max-width: 600px) {

  .hex-title {
    font-size: 1.1rem !important;
  }

  .hex-badge {
    font-size: 0.7rem !important;
    padding: 3px 10px !important;
  }

  #page-play,
  #page-social,
  #page-ranking,
  #page-shop,
  #page-settings,
  #page-profile {
    padding: 10px 10px 110px 10px !important;
  }
}

/* ─── XP Bar ───────────────────────────────────────────────── */
.xp-bar-bg {
  height: 5px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

.xp-bar-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
  border-radius: 10px !important;
  transition: width 0.5s ease !important;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4) !important;
}

/* ─── Stat Tile ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.stat-tile {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-tile .val {
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  color: var(--text-bright) !important;
}

.stat-tile .lbl {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* ─── Hex Background Pattern Override for Lobby ─────────────── */
#lobby-screen {
  background: radial-gradient(ellipse at 20% 10%, rgba(251, 191, 36, 0.04) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 90%, rgba(56, 189, 248, 0.03) 0%, transparent 40%),
    linear-gradient(180deg, #080e1a 0%, #0b1220 100%) !important;
}

/* ─── Mobile Overrides ──────────────────────────────────────── */
@media (max-width: 600px) {

  .btn-notifications-bell {
    width: 34px !important;
    height: 34px !important;
  }

  .mobile-stats-buttons,
  .app-header .mobile-stats-buttons,
  #mobile-stats-buttons {
    display: none !important;
  }

  .btn-mobile-stat:not(#btn-mobile-coins) {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  #btn-mobile-coins.header-coins-btn-responsive {
    width: auto !important;
    min-width: 40px !important;
    max-width: 165px !important;
    height: 38px !important;
    padding: 0 9px 0 7px !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  #btn-mobile-coins .header-coins-val-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .hex-title {
    font-size: 1.1rem !important;
  }

  .hex-badge {
    font-size: 0.7rem !important;
    padding: 3px 10px !important;
  }

  #page-social,
  #page-ranking,
  #page-shop,
  #page-settings,
  #page-profile {
    padding: 60px 10px 110px 10px !important;
  }

  .page-content-card,
  #page-play .page-content-card,
  #page-social .page-content-card,
  #page-ranking .page-content-card,
  #page-shop .page-content-card,
  #page-settings .page-content-card,
  #page-profile .page-content-card {
    padding: 18px 12px 85px 12px !important;
    padding-top: 18px !important;
    border-radius: 16px !important;
    min-height: auto !important;
  }

  .profile-page {
    padding: 0 0 85px 0 !important;
    gap: 12px !important;
  }

  .lobby-action-row {
    flex-direction: column;
  }

  .join-room-box {
    min-width: 0;
    width: 100%;
  }

  .hex-action-zone .btn-accent,
  .hex-action-zone .btn-primary,
  .pcard .btn-accent,
  .pcard .btn-primary {
    width: 100%;
    text-align: center;
  }

  .pcard {
    border-radius: 14px !important;
    padding: 14px !important;
  }
}

/* ─── Hardware Acceleration & Mobile Thermal Optimization ─── */
#board-container {
  contain: strict;
  isolation: isolate;
}

#kmkz-board-canvas {
  contain: strict;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  image-rendering: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

@media (max-width: 768px) {

  /* Reduce heavy GPU rasterization blurs on mobile devices to prevent overheating */
  .app-header,
  .pcard,
  .page-content-card,
  .modal-box {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  /* Prevent unnecessary layout thrashing */
  #game-screen {
    contain: layout paint;
  }
}

/* ─── Room Players Card Map Backdrop Preview & Shading ──────── */
.room-players-card {
  position: relative !important;
  background: rgba(10, 15, 29, 0.35) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  overflow: visible !important;
  border: 1.5px solid rgba(251, 191, 36, 0.5) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.room-players-card:hover {
  border-color: rgba(251, 191, 36, 0.75) !important;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.7), 0 0 25px rgba(251, 191, 36, 0.25) !important;
}

.room-players-map-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
}

.map-backdrop-svg-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.1);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92 !important;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.95)) !important;
}

.map-backdrop-dark-overlay {
  display: none !important;
}

.map-backdrop-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.room-players-content-layer {
  position: relative;
  z-index: 2;
}

.room-players-content-layer h3 {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* ─── Compact & Accessible Room Config Card Layout ──────── */
.config-card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1.5px solid rgba(251, 191, 36, 0.3) !important;
  padding-bottom: 10px !important;
  margin-bottom: 14px !important;
}

.config-dropdowns-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px 12px !important;
  margin-bottom: 12px !important;
}

.config-dropdowns-grid> :only-child {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

@media (max-width: 640px) {
  .config-dropdowns-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* Room Lobby Players Count Selector (placed after #lobby-players-list) */
.config-players-count-group {
  margin-top: 12px !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.config-players-count-group:hover {
  border-color: rgba(56, 189, 248, 0.3) !important;
}

.config-players-count-group label {
  margin: 0 !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.config-players-count-group select {
  min-width: 140px !important;
  padding: 8px 12px !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  background: rgba(30, 41, 59, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  outline: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.config-players-count-group select:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35) !important;
}

.config-players-count-group select:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  background: rgba(15, 23, 42, 0.6) !important;
}

/* ==========================================================================
   ROOM LOBBY 2-COLUMN MAP SELECTOR (1 row per 2 maps, responsive, with mini preview)
   ========================================================================== */

.config-map-selection-section {
  width: 100% !important;
  margin-top: 2px !important;
  margin-bottom: 8px !important;
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
}

.config-map-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 6px !important;
  padding-bottom: 5px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.config-map-section-label {
  font-size: 0.80rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

.config-map-current-pill {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 20px !important;
  padding: 2px 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15) !important;
}

.room-maps-category-bar {
  display: flex !important;
  gap: 5px !important;
  margin: 2px 0 6px !important;
  overflow-x: auto !important;
  padding: 1px 2px 3px !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

.room-maps-category-bar::-webkit-scrollbar {
  display: none !important;
}

.map-category-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px 8px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(15, 23, 42, 0.65) !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.map-category-chip:hover {
  color: #f1f5f9 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  background: rgba(30, 41, 59, 0.85) !important;
}

.map-category-chip.active {
  color: #38bdf8 !important;
  border-color: #38bdf8 !important;
  background: rgba(14, 116, 144, 0.25) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35) !important;
}

#room-maps-grid,
.room-maps-grid-2col {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 6px 8px !important;
  max-height: 164px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.5) !important;
  box-sizing: border-box !important;
}

#room-maps-grid::-webkit-scrollbar,
.room-maps-grid-2col::-webkit-scrollbar {
  width: 5px !important;
}

#room-maps-grid::-webkit-scrollbar-track,
.room-maps-grid-2col::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5) !important;
  border-radius: 4px !important;
}

#room-maps-grid::-webkit-scrollbar-thumb,
.room-maps-grid-2col::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4) !important;
  border-radius: 4px !important;
}

#room-maps-grid::-webkit-scrollbar-thumb:hover,
.room-maps-grid-2col::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.7) !important;
}

.map-select-card {
  position: relative !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  padding: 5px 6px 4px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: 74px !important;
  max-height: 74px !important;
  overflow: hidden !important;
}

.map-select-card:hover {
  border-color: rgba(56, 189, 248, 0.55) !important;
  background: rgba(30, 41, 59, 0.95) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
}

.map-select-card:active {
  transform: translateY(0) scale(0.98) !important;
}

.map-select-card.active {
  border-color: #38bdf8 !important;
  background: linear-gradient(145deg, rgba(14, 116, 144, 0.4) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35), inset 0 0 8px rgba(56, 189, 248, 0.15) !important;
}

.map-select-card.disabled {
  cursor: default !important;
  opacity: 0.8 !important;
}

.map-select-card.disabled:hover {
  transform: none !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

.map-select-card.active.disabled:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35) !important;
}

.map-card-selected-check {
  position: absolute !important;
  top: 3px !important;
  right: 3px !important;
  width: 15px !important;
  height: 15px !important;
  border-radius: 50% !important;
  background: #38bdf8 !important;
  color: #020617 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8) !important;
  z-index: 2 !important;
}

.map-select-card.active .map-card-selected-check {
  display: flex !important;
}

.map-card-preview-wrap {
  width: 100% !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(2, 6, 23, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  margin-bottom: 3px !important;
  pointer-events: none !important;
}

.map-card-preview-wrap svg.map-mini-svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 80px !important;
  max-height: 36px !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) !important;
}

.map-card-info {
  width: 100% !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  pointer-events: none !important;
  line-height: 1.1 !important;
}

.map-card-name {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  line-height: 1.15 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.map-select-card.active .map-card-name {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

.map-card-subtitle {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  margin-top: 1px !important;
  line-height: 1 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.map-select-card.active .map-card-subtitle {
  color: #7dd3fc !important;
}

@media (max-width: 480px),
(max-height: 700px) {

  #room-maps-grid,
  .room-maps-grid-2col {
    gap: 4px 6px !important;
    max-height: 148px !important;
  }

  .map-select-card {
    height: 68px !important;
    max-height: 68px !important;
    padding: 4px 4px 3px !important;
  }

  .map-card-preview-wrap {
    height: 32px !important;
    margin-bottom: 2px !important;
  }

  .map-card-preview-wrap svg.map-mini-svg {
    max-height: 30px !important;
    max-width: 70px !important;
  }

  .map-card-name {
    font-size: 0.7rem !important;
  }

  .map-card-subtitle {
    font-size: 0.7rem !important;
  }
}


/* ==========================================================================
   ROOM LOBBY 4-GRID GAME MODE SELECTOR (4 columns, responsive, with mini preview)
   ========================================================================== */

.config-mode-selection-section {
  width: 100% !important;
  margin-top: 2px !important;
  margin-bottom: 8px !important;
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
}

.config-mode-current-pill {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 20px !important;
  padding: 2px 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.15) !important;
}

.room-modes-grid-4col {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px 8px !important;
  padding: 2px !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .room-modes-grid-4col {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
}

@media (max-width: 420px) {
  .room-modes-grid-4col {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 5px !important;
  }
}

.mode-select-card {
  position: relative !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  padding: 5px 6px 4px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: 68px !important;
  max-height: 68px !important;
  overflow: hidden !important;
}

.mode-select-card:hover {
  border-color: rgba(251, 191, 36, 0.55) !important;
  background: rgba(30, 41, 59, 0.95) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
}

.mode-select-card:active {
  transform: translateY(0) scale(0.98) !important;
}

.mode-select-card.active {
  border-color: #fbbf24 !important;
  background: linear-gradient(145deg, rgba(180, 83, 9, 0.35) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3), inset 0 0 8px rgba(251, 191, 36, 0.12) !important;
}

.mode-select-card.disabled {
  cursor: default !important;
  opacity: 0.8 !important;
}

.mode-select-card.disabled:hover {
  transform: none !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

.mode-select-card.active.disabled:hover {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3) !important;
}

.mode-card-selected-check {
  position: absolute !important;
  top: 3px !important;
  right: 3px !important;
  width: 15px !important;
  height: 15px !important;
  border-radius: 50% !important;
  background: #fbbf24 !important;
  color: #020617 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.8) !important;
  z-index: 2 !important;
}

.mode-select-card.active .mode-card-selected-check {
  display: flex !important;
}

.mode-card-badge {
  display: none !important;
}

.mode-card-preview-wrap {
  width: 100% !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(2, 6, 23, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  margin-bottom: 3px !important;
  pointer-events: none !important;
}

.mode-card-preview-wrap svg.mode-mini-svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 80px !important;
  max-height: 32px !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) !important;
}

.mode-card-info {
  width: 100% !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  pointer-events: none !important;
  line-height: 1.1 !important;
}

.mode-card-name {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  line-height: 1.15 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.mode-select-card.active .mode-card-name {
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

.mode-card-subtitle {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  margin-top: 1px !important;
  line-height: 1 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.mode-select-card.active .mode-card-subtitle {
  color: #fde68a !important;
}

.config-sliders-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.config-dropdowns-grid .config-group {
  margin-bottom: 0 !important;
}

.config-dropdowns-grid .config-group label {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.config-dropdowns-grid .config-group select {
  padding: 8px 10px !important;
  font-size: 0.88rem !important;
  border-radius: 10px !important;
}

.kmkz-turn-slider-group {
  padding: 10px 14px !important;
  margin-bottom: 0 !important;
}

/* ==========================================================================
   ROOM LOBBY DESERT / GOLD MINE SLIDING TOGGLE SWITCH (Interactive Slider)
   ========================================================================== */

.config-desert-slider-group {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

.desert-slider-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 4px !important;
}

.desert-slider-label {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  margin: 0 !important;
}

.desert-slider-status-pill {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  letter-spacing: 0.2px !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.desert-slider-status-pill.state-thief {
  color: #fcd34d !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.desert-slider-status-pill.state-gold {
  color: #fef08a !important;
  background: rgba(234, 179, 8, 0.22) !important;
  border: 1px solid rgba(250, 204, 21, 0.6) !important;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.3) !important;
}

.desert-status-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: currentColor !important;
  box-shadow: 0 0 6px currentColor !important;
}

.desert-switch-container {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  background: rgba(15, 23, 42, 0.88) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  height: 38px !important;
  padding: 3px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.desert-switch-container:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.desert-switch-container.disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
}

.desert-switch-glider {
  position: absolute !important;
  top: 3px !important;
  bottom: 3px !important;
  left: 3px !important;
  width: calc(50% - 3px) !important;
  border-radius: 8px !important;
  pointer-events: none !important;
  z-index: 1 !important;
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.desert-switch-container.state-thief .desert-switch-glider {
  transform: translateX(0) !important;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.6) 0%, rgba(180, 83, 9, 0.85) 100%) !important;
  border: 1.2px solid #f59e0b !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.desert-switch-container.state-gold .desert-switch-glider {
  transform: translateX(100%) !important;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.65) 0%, rgba(202, 138, 4, 0.9) 100%) !important;
  border: 1.2px solid #fef08a !important;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.desert-switch-btn {
  position: relative !important;
  z-index: 2 !important;
  flex: 1 !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 4px !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  outline: none !important;
  transition: color 0.2s ease, transform 0.15s ease !important;
  pointer-events: none !important;
  /* Allow range input overlay to capture slider drags */
}

.desert-switch-btn.active {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
}

.desert-switch-container.state-gold .desert-switch-btn#desert-btn-gold.active {
  color: #fef08a !important;
}

.desert-switch-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.desert-switch-label {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  letter-spacing: 0.2px !important;
}

.desert-range-slider-input {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  z-index: 3 !important;
}

.desert-switch-container.disabled .desert-range-slider-input {
  cursor: not-allowed !important;
}

/* ==========================================================================
   KMKZ MODERN ROOM LOBBY REDESIGN (WCAG 2.1 AA / AAA Accessible & Fluid Mobile)
   ========================================================================== */

#room-lobby-screen {
  background: radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.92) 0%, rgba(7, 11, 20, 0.98) 100%) !important;
  color: #f8fafc !important;
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

.room-lobby-main {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 12px 14px 28px 14px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain !important;
}

/* ==========================================================================
   KMKZ ROOM LOBBY — UNIFIED COMPACT HEADER & MERGED CONTROLS
   ========================================================================== */
#room-lobby-screen .app-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 14px !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  box-sizing: border-box !important;
}

#room-lobby-screen .header-logo-img {
  height: 32px !important;
  width: auto !important;
  max-width: 80px !important;
  object-fit: contain !important;
}

#room-lobby-screen .room-code-header-merged {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

/* Room Code Pill Badge */
.room-code-badge-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 10px !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 11px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  height: 36px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

.room-code-badge-pill:hover {
  border-color: rgba(251, 191, 36, 0.8) !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(245, 158, 11, 0.16) 100%) !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35) !important;
  transform: translateY(-1px) !important;
}

.room-code-badge-pill:active {
  transform: translateY(0) scale(0.97) !important;
}

.room-code-pill-label {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #94a3b8 !important;
}

.room-code-pill-colon {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
}

.room-code-pill-val {
  font-family: 'Outfit', monospace, sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  letter-spacing: 2px !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.45) !important;
}

/* Room Share Actions (WhatsApp & Copy) */
.room-code-header-merged .room-share-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.room-code-header-merged .btn-room-icon-action {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  border-radius: 10px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, filter 0.15s ease !important;
}

.room-code-header-merged .btn-room-copy {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(2, 132, 199, 0.4) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.25) !important;
}

.room-code-header-merged .btn-room-copy:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.4) 0%, rgba(2, 132, 199, 0.6) 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45) !important;
}

.room-code-header-merged .btn-room-copy:active {
  transform: translateY(0) scale(0.96) !important;
}

.room-code-header-merged .btn-room-whatsapp {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22) 0%, rgba(22, 163, 74, 0.38) 100%) !important;
  border: 1px solid rgba(74, 222, 128, 0.5) !important;
  color: #4ade80 !important;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.25) !important;
}

.room-code-header-merged .btn-room-whatsapp:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.38) 0%, rgba(22, 163, 74, 0.55) 100%) !important;
  border-color: #4ade80 !important;
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.45) !important;
}

.room-code-header-merged .btn-room-whatsapp:active {
  transform: translateY(0) scale(0.96) !important;
}

/* Leave Room Button in Header */
.room-code-header-merged #btn-leave-room {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(185, 28, 28, 0.35) 100%) !important;
  border: 1px solid rgba(239, 68, 68, 0.55) !important;
  color: #fca5a5 !important;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.25) !important;
  cursor: pointer !important;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease !important;
}

.room-code-header-merged #btn-leave-room:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(220, 38, 38, 0.5) 100%) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45) !important;
}

.room-code-header-merged #btn-leave-room:active {
  transform: translateY(0) scale(0.96) !important;
}

.room-code-header-merged #btn-leave-room .btn-leave-room-icon {
  display: none !important;
}

@media (max-width: 480px) {
  #room-lobby-screen .app-header {
    padding: 6px 8px !important;
    gap: 6px !important;
  }

  .room-code-header-merged {
    gap: 5px !important;
  }

  .room-code-badge-pill {
    padding: 3px 7px !important;
    height: 34px !important;
    gap: 3px !important;
  }

  .room-code-pill-val {
    font-size: 0.95rem !important;
    letter-spacing: 1.5px !important;
  }

  .room-code-header-merged .btn-room-icon-action {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    border-radius: 9px !important;
  }

  .room-code-header-merged #btn-leave-room {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 8px !important;
    font-size: 0.76rem !important;
    border-radius: 9px !important;
  }
}

@media (max-width: 370px) {
  .room-code-pill-label,
  .room-code-pill-colon {
    display: none !important;
  }

  .room-code-badge-pill {
    padding: 3px 6px !important;
  }

  .room-code-pill-val {
    font-size: 0.9rem !important;
    letter-spacing: 1px !important;
  }

  .room-code-header-merged #btn-leave-room .btn-leave-room-text {
    display: none !important;
  }

  .room-code-header-merged #btn-leave-room .btn-leave-room-icon {
    display: inline-block !important;
  }

  .room-code-header-merged #btn-leave-room {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    padding: 0 !important;
  }
}

/* Centered Room Layout */
.room-lobby-layout {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 680px !important;
  margin: 0 auto !important;
  gap: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 860px) {
  .room-lobby-layout {
    max-width: 100% !important;
    gap: 12px !important;
  }
}

/* Common Room Cards Styling: Pure High-End Glassmorphism */
.room-players-card,
.room-config-card {
  background: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 22px !important;
  padding: 18px 20px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.room-players-card:hover,
.room-config-card:hover {
  border-color: rgba(251, 191, 36, 0.25) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 20px rgba(251, 191, 36, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

/* Segmented View Switcher: Players vs Map (Icon-Only + Player Slots) */
.room-view-switcher {
  display: flex !important;
  gap: 6px !important;
  background: rgba(2, 6, 23, 0.65) !important;
  backdrop-filter: blur(14px) !important;
  padding: 5px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-bottom: 14px !important;
  position: relative !important;
  z-index: 5 !important;
}

.room-view-tab {
  flex: 1 !important;
  min-height: 42px !important;
  padding: 6px 12px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 10px !important;
  color: #94a3b8 !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  outline: none !important;
}

.room-view-tab .tab-emoji-icon {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
}

.lobby-player-slots-indicator {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-left: 6px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.player-slot-box {
  display: inline-block !important;
  width: 11px !important;
  height: 11px !important;
  border-radius: 3px !important;
  box-sizing: border-box !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.player-slot-box.filled {
  border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
  transform: scale(1.1) !important;
}

.player-slot-box.empty {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.3) !important;
  opacity: 0.45 !important;
}

.room-view-tab:hover {
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.room-view-tab.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

#tab-view-players.active {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

#tab-view-map.active {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

/* Room Panels Horizontal Displacement Transitions */
@keyframes roomPanelSlideInRight {
  0% {
    opacity: 0;
    transform: translateX(45px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes roomPanelSlideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-45px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.room-players-panel.slide-from-left,
.room-map-panel.slide-from-left {
  animation: roomPanelSlideInLeft 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.room-players-panel.slide-from-right,
.room-map-panel.slide-from-right {
  animation: roomPanelSlideInRight 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Dedicated Map Panel */
.room-map-panel {
  position: relative !important;
  width: 100% !important;
  min-height: 320px !important;
  border-radius: 18px !important;
  overflow: visible !important;
  background: transparent !important;
  border: none !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  animation: fadeIn 0.3s ease-out !important;
  touch-action: pan-y !important;
}

.room-map-full-preview {
  position: relative !important;
  width: 100% !important;
  height: 320px !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.5) 0%, rgba(7, 11, 20, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 16px !important;
}

#view-panel-map .room-config-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  border-top: none !important;
  margin-top: 0 !important;
  border-radius: 0 !important;
}

.room-map-full-preview .map-backdrop-svg-wrap {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(1.12) !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  filter: drop-shadow(0 0 24px rgba(0, 0, 0, 0.9)) !important;
}

.map-backdrop-tag {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  background: rgba(15, 23, 42, 0.92) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
  z-index: 10 !important;
}

/* ─── Room Players Card: Modern Sleek Glassmorphism & Micro-Interactions ─── */
.room-players-panel {
  position: relative !important;
  width: 100% !important;
  animation: fadeIn 0.3s ease-out !important;
  touch-action: pan-y !important;
}

#lobby-players-list,
.players-lobby-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 0 10px 0 !important;
}

/* Individual Player Card Item */
.lobby-player-item {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 14px !important;
  min-height: 52px !important;
  background: linear-gradient(135deg, rgba(18, 26, 46, 0.75) 0%, rgba(10, 16, 30, 0.88) 100%) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 3.5px solid var(--player-color, rgba(56, 189, 248, 0.7)) !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease !important;
}

.lobby-player-item:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  border-left-color: var(--player-color, #38bdf8) !important;
  background: linear-gradient(135deg, rgba(26, 38, 66, 0.85) 0%, rgba(15, 24, 45, 0.95) 100%) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px var(--player-color-glow, rgba(56, 189, 248, 0.25)) !important;
}

/* Self / Current User Highlight */
.lobby-player-item.is-me {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(15, 23, 42, 0.88) 100%) !important;
  border-color: rgba(56, 189, 248, 0.32) !important;
}

.lobby-player-item.is-me:hover {
  border-color: rgba(56, 189, 248, 0.55) !important;
}

/* Host / Room Leader Prestige Styling */
.lobby-player-item.is-room-leader,
.lobby-player-item.is-host {
  background: linear-gradient(135deg, rgba(38, 28, 14, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-left: 4.5px solid #f59e0b !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 14px rgba(245, 158, 11, 0.12) !important;
}

.lobby-player-item.is-room-leader:hover,
.lobby-player-item.is-host:hover {
  border-color: rgba(245, 158, 11, 0.6) !important;
  border-left-color: #fbbf24 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.25) !important;
}

/* Player Avatar Circle with Dynamic Border Glow */
.lobby-player-avatar-circle {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease !important;
}

.lobby-player-item:hover .lobby-player-avatar-circle {
  transform: scale(1.08) !important;
}

/* Player Identity Typography & Badges */
.lobby-player-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: 0.2px !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
}

.player-me-pill {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4) !important;
  letter-spacing: 0.5px !important;
}

.lobby-elo-pill {
  font-size: 0.72rem !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  color: #38bdf8 !important;
  padding: 2px 7px !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

.lobby-lvl-pill {
  font-size: 0.72rem !important;
  background: rgba(168, 85, 247, 0.14) !important;
  border: 1px solid rgba(168, 85, 247, 0.28) !important;
  color: #c084fc !important;
  padding: 2px 7px !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
}

.player-role-tag {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  letter-spacing: 0.3px !important;
}

.player-role-tag.leader-tag {
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
}

.player-role-tag.player-tag {
  background: rgba(148, 163, 184, 0.12) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  color: #94a3b8 !important;
}

.player-role-tag.bot-tag {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  color: #cbd5e1 !important;
}

.player-role-tag.diff-easy {
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.14) !important;
}

.player-role-tag.diff-normal {
  border-color: rgba(251, 191, 36, 0.45) !important;
  color: #fde68a !important;
  background: rgba(245, 158, 11, 0.14) !important;
}

.player-role-tag.diff-hard {
  border-color: rgba(248, 113, 113, 0.45) !important;
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.14) !important;
}

.player-role-tag.diff-impossible {
  border-color: rgba(192, 132, 252, 0.65) !important;
  color: #f3e8ff !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.26), rgba(225, 29, 72, 0.2)) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.28) !important;
}

.player-role-tag.bot-tag-clickable {
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.player-role-tag.bot-tag-clickable:hover {
  transform: scale(1.05) !important;
  filter: brightness(1.2) !important;
}

.btn-remove-bot {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
  border-radius: 8px !important;
  width: 30px !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.btn-remove-bot:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: scale(1.08) !important;
}

/* ─── Empty Player Slots (Available Seats) ─── */
.lobby-player-item.empty-slot {
  background: rgba(15, 23, 42, 0.35) !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.14) !important;
  border-left: 3.5px dashed rgba(255, 255, 255, 0.22) !important;
  opacity: 0.8 !important;
  cursor: default !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.lobby-player-item.empty-slot:hover {
  opacity: 1 !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  border-left-color: rgba(56, 189, 248, 0.6) !important;
  background: rgba(15, 23, 42, 0.55) !important;
  transform: translateY(-1px) !important;
}

.empty-slot-info {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 !important;
}

.empty-slot-avatar-circle {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.24) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(255, 255, 255, 0.38) !important;
  flex-shrink: 0 !important;
}

.empty-slot-details {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}

.empty-slot-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
}

.empty-slot-hint {
  font-size: 0.72rem !important;
  color: #64748b !important;
}

.btn-quick-add-bot-slot {
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.32) !important;
  color: #38bdf8 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-quick-add-bot-slot:hover {
  background: rgba(56, 189, 248, 0.28) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3) !important;
}

/* ─── Roster Controls & Bot Management ─── */
.lobby-match-roster-controls {
  display: flex !important;
  align-items: stretch !important;
  gap: 10px !important;
  margin: 12px 0 10px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.lobby-bot-management-card {
  background: linear-gradient(135deg, rgba(18, 26, 46, 0.75) 0%, rgba(11, 17, 32, 0.88) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
}

.bot-diff-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.bot-diff-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.bot-diff-current-badge {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
}

.bot-diff-current-badge.easy {
  background: rgba(16, 185, 129, 0.18) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  color: #6ee7b7 !important;
}

.bot-diff-current-badge.normal {
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #fde68a !important;
}

.bot-diff-current-badge.hard {
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
}

.bot-diff-selector {
  display: flex !important;
  background: rgba(2, 6, 23, 0.65) !important;
  padding: 3px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  gap: 3px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.bot-diff-pill-btn {
  flex: 1 !important;
  padding: 6px 8px !important;
  border-radius: 7px !important;
  border: none !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.bot-diff-pill-btn:hover {
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.diff-indicator-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.diff-indicator-dot.easy {
  background: #34d399 !important;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6) !important;
}

.diff-indicator-dot.normal {
  background: #fbbf24 !important;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.6) !important;
}

.diff-indicator-dot.hard {
  background: #f87171 !important;
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.6) !important;
}

.diff-indicator-dot.impossible {
  background: #c084fc !important;
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.8) !important;
}

.bot-diff-pill-btn.active[data-diff="easy"] {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #6ee7b7 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25) !important;
  font-weight: 800 !important;
}

.bot-diff-pill-btn.active[data-diff="normal"] {
  background: rgba(245, 158, 11, 0.22) !important;
  color: #fde68a !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25) !important;
  font-weight: 800 !important;
}

.bot-diff-pill-btn.active[data-diff="hard"] {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fca5a5 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25) !important;
  font-weight: 800 !important;
}

.bot-diff-pill-btn.active[data-diff="impossible"] {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(225, 29, 72, 0.22)) !important;
  color: #f3e8ff !important;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.35) !important;
  font-weight: 800 !important;
}

#btn-lobby-add-bot {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(2, 132, 199, 0.32)) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  border-radius: 9px !important;
  padding: 7px 14px !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#btn-lobby-add-bot:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.38), rgba(2, 132, 199, 0.52)) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35) !important;
  transform: translateY(-1px) !important;
}

/* ─── Online Friends Accordion & Pulse Dot ─── */
@keyframes pulseOnlineDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

.online-dot-pulse {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #4ade80 !important;
  display: inline-block !important;
  margin-right: 6px !important;
  animation: pulseOnlineDot 2s infinite !important;
}

/* ─── Match Summary Card ─── */
#lobby-match-summary-card {
  background: linear-gradient(145deg, rgba(20, 29, 50, 0.75) 0%, rgba(12, 18, 33, 0.88) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  border-radius: 14px !important;
  padding: 10px 13px !important;
  margin: 8px 0 12px 0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#lobby-match-summary-card:hover {
  border-color: rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(251, 191, 36, 0.12) !important;
}

.summary-chips-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  margin-top: 8px !important;
}

.summary-chip {
  background: rgba(2, 6, 23, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 6px 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  min-width: 0 !important;
}

.summary-chip:hover {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-1px) !important;
}

.summary-chip .chip-val {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.btn-summary-quick-edit {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
  border-radius: 7px !important;
  padding: 3px 9px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-summary-quick-edit:hover {
  background: rgba(245, 158, 11, 0.28) !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
}

/* Config Card Grid & Accessible Controls */
.config-card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1.5px solid rgba(251, 191, 36, 0.25) !important;
  padding-bottom: 8px !important;
  margin-bottom: 12px !important;
}

.config-card-header h2 {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
}

.config-dropdowns-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px 12px !important;
  margin-bottom: 10px !important;
}

@media (max-width: 580px) {
  .config-dropdowns-grid {
    grid-template-columns: 1fr !important;
  }
}

.config-group label {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  margin-bottom: 4px !important;
  display: block !important;
}

.config-group select {
  width: 100% !important;
  min-height: 42px !important;
  padding: 8px 12px !important;
  background: #0f172a !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  outline: none !important;
  cursor: pointer !important;
}

.config-group select:focus-visible {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.35) !important;
}

.config-sliders-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

.kmkz-turn-slider-group {
  background: rgba(10, 15, 29, 0.75) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
}

/* Master Start Game Button (Hold 2s to activate) */
#btn-lobby-start-game {
  position: relative !important;
  overflow: hidden !important;
  min-height: 48px !important;
  padding: 10px 18px !important;
  font-size: 1.02rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  border: 2px solid #10b981 !important;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, border-color 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  touch-action: manipulation !important;
  cursor: pointer !important;
}

#btn-lobby-start-game:not(:disabled):hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 8px 26px rgba(16, 185, 129, 0.6) !important;
  border-color: #34d399 !important;
}

#btn-lobby-start-game .btn-hold-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 60%, #6ee7b7 100%);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.95);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

#btn-lobby-start-game .btn-hold-content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  pointer-events: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#btn-lobby-start-game .btn-hold-title {
  font-weight: 900;
  letter-spacing: 0.04em;
}

#btn-lobby-start-game .btn-hold-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #a7f3d0;
  transition: transform 0.1s ease, opacity 0.1s ease, background-color 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
}

#btn-lobby-start-game.holding {
  transform: scale(0.96) !important;
  border-color: #6ee7b7 !important;
  box-shadow: 0 0 25px rgba(52, 211, 153, 0.8), inset 0 0 12px rgba(0, 0, 0, 0.3) !important;
}

#btn-lobby-start-game.holding .btn-hold-badge {
  background: #047857;
  color: #ffffff;
  border-color: #6ee7b7;
  box-shadow: 0 0 8px rgba(110, 231, 183, 0.8);
}

#btn-lobby-start-game.hold-success {
  animation: holdStartSuccessAnim 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes holdStartSuccessAnim {
  0% {
    transform: scale(0.96);
    filter: brightness(1.2);
  }

  50% {
    transform: scale(1.05);
    filter: brightness(1.8);
    box-shadow: 0 0 35px rgba(52, 211, 153, 1);
    border-color: #ffffff;
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

/* ==========================================================================
   ELEVATED GAME HUD DOCK (ACTION-BAR-BOTTOM) - Mobile Ergonomics & Safe-Area
   ========================================================================== */

@media (max-width: 768px) {
  .action-bar-bottom {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    border: none !important;
    border-top: 1.5px solid rgba(251, 191, 36, 0.45) !important;
    padding: 8px max(10px, env(safe-area-inset-left, 10px)) max(12px, env(safe-area-inset-bottom, 12px)) max(10px, env(safe-area-inset-right, 10px)) !important;
    background: linear-gradient(180deg, rgba(14, 22, 38, 0.97) 0%, rgba(9, 14, 26, 0.99) 50%, rgba(5, 8, 16, 1) 100%) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 30px rgba(251, 191, 36, 0.15) !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 769px) {
  .action-bar-bottom {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    border: none !important;
    border-top: 1.5px solid rgba(251, 191, 36, 0.45) !important;
    padding: 9px clamp(18px, 4vw, 56px) max(10px, env(safe-area-inset-bottom, 10px)) clamp(18px, 4vw, 56px) !important;
    background: linear-gradient(180deg, rgba(14, 22, 38, 0.96) 0%, rgba(9, 14, 26, 0.98) 50%, rgba(5, 8, 16, 0.99) 100%) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    box-shadow: 0 -12px 42px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 35px rgba(251, 191, 36, 0.12) !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   MOBILE RESPONSIVE FIXES: CREATE ROOM & ROOM LOBBY (Zero Horizontal Overflow)
   ========================================================================== */

@media (max-width: 768px) {

  /* Play Page: Crear Sala & Unirse Controls */
  .hex-action-zone {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 16px 12px !important;
    overflow: hidden !important;
  }

  /* Partida Rápida CTA (Hero Mobile Button #btn-play) */
  .quick-match-container {
    width: 100% !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
  }

  .btn-quick-match {
    width: 100% !important;
    min-height: 74px !important;
    padding: 10px 14px !important;
    border-radius: 16px !important;
    border: 1.5px solid rgba(74, 222, 128, 0.55) !important;
    box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.65), 0 0 16px rgba(34, 197, 94, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(16px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    touch-action: manipulation !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease !important;
  }

  .btn-quick-match::before {
    animation: quickMatchMobileSheen 4.2s infinite ease-in-out !important;
  }

  .btn-quick-match:active {
    transform: scale(0.975) translateY(1px) !important;
    border-color: #4ade80 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    filter: brightness(1.12) !important;
  }

  .btn-quick-match:focus-visible {
    outline: 2px solid #22c55e !important;
    outline-offset: 3px !important;
  }

  .btn-quick-match-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    position: relative !important;
    z-index: 2 !important;
  }

  .quick-match-badge-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #736f64 0%, #201c15 55%, #0b0805 100%) !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
  }

  .quick-bolt {
    font-size: 1.45rem !important;
    display: inline-block !important;
    animation: pulseBoltQuick 2.2s infinite ease-in-out !important;
  }

  .quick-match-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .quick-match-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.8px !important;
    color: #ffffff !important;
    text-shadow: 0 0 14px rgba(251, 191, 36, 0.45), 0 2px 4px rgba(0, 0, 0, 0.85) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .quick-match-desc {
    font-size: 0.76rem !important;
    font-weight: 500 !important;
    color: #cbd5e1 !important;
    line-height: 1.25 !important;
    opacity: 0.9 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .quick-match-tag {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 13px !important;
    border-radius: 22px !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.38) 100%) !important;
    border: 1.2px solid rgba(52, 211, 153, 0.75) !important;
    color: #ecfdf5 !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.8px !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    flex-shrink: 0 !important;
  }

  .pulse-indicator {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #34d399 !important;
    box-shadow: 0 0 8px #34d399, 0 0 16px rgba(52, 211, 153, 0.8) !important;
  }

  .lobby-action-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 10px !important;
  }

  #btn-create-room {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .join-room-box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    gap: 8px !important;
  }

  .join-room-box #input-room-code {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 10px !important;
    font-size: 0.95rem !important;
  }

  .join-room-box #btn-join-room {
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    padding: 12px 18px !important;
  }

  /* App-Only Quick Links (Responsive Mobile) */
  .app-only-quick-links {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-top: 2px !important;
  }

  .btn-app-quick-link {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
    font-size: 0.80rem !important;
    border-radius: 12px !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }

  .btn-app-quick-link .app-quick-icon {
    width: 16px !important;
    height: 16px !important;
  }

  .btn-app-quick-link .app-quick-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  @media (max-width: 400px) {
    .btn-quick-match {
      padding: 11px 13px !important;
      min-height: 58px !important;
      border-radius: 15px !important;
    }

    .btn-quick-match-content {
      gap: 10px !important;
    }

    .quick-match-badge-icon {
      width: 40px !important;
      height: 40px !important;
      min-width: 40px !important;
      border-radius: 11px !important;
    }

    .quick-bolt {
      font-size: 1.28rem !important;
    }

    .quick-match-title {
      font-size: 0.96rem !important;
      letter-spacing: 0.6px !important;
    }

    .quick-match-desc {
      font-size: 0.70rem !important;
    }

    .quick-match-tag {
      padding: 6px 10px !important;
      font-size: 0.72rem !important;
      gap: 5px !important;
    }

    .app-only-quick-links {
      gap: 6px !important;
    }

    .btn-app-quick-link {
      padding: 6px 8px !important;
      font-size: 0.76rem !important;
      letter-spacing: 0 !important;
      gap: 5px !important;
    }

    .btn-app-quick-link .app-quick-icon svg {
      width: 13px !important;
      height: 13px !important;
    }
  }

  @media (max-width: 340px) {
    .btn-quick-match {
      padding: 9px 10px !important;
      min-height: 52px !important;
      border-radius: 13px !important;
    }

    .btn-quick-match-content {
      gap: 8px !important;
    }

    .quick-match-badge-icon {
      width: 34px !important;
      height: 34px !important;
      min-width: 34px !important;
      border-radius: 9px !important;
    }

    .quick-bolt {
      font-size: 1.1rem !important;
    }

    .quick-match-title {
      font-size: 0.86rem !important;
      letter-spacing: 0.4px !important;
    }

    .quick-match-desc {
      font-size: 0.65rem !important;
      line-height: 1.18 !important;
      white-space: normal !important;
      word-break: normal !important;
      overflow-wrap: break-word !important;
      display: -webkit-box !important;
      -webkit-line-clamp: 2 !important;
      -webkit-box-orient: vertical !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
    }

    .quick-match-tag {
      padding: 5px 8px !important;
      font-size: 0.7rem !important;
    }

    .app-only-quick-links {
      flex-direction: column !important;
      gap: 6px !important;
    }

    .btn-app-quick-link {
      width: 100% !important;
      height: 40px !important;
      min-height: 40px !important;
      font-size: 0.78rem !important;
    }
  }

  /* Room Lobby Screen Inside Custom Room */
  #room-lobby-screen {
    width: 100% !important;
    max-width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .room-lobby-main {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
    padding: 10px 8px 60px 8px !important;
  }

  .room-lobby-layout {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 12px !important;
  }

  .room-players-card,
  .room-config-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    padding: 14px 10px !important;
  }

  .config-dropdowns-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 8px !important;
  }

  .config-group {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .config-group select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .lobby-bot-controls div,
  .lobby-bot-management-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .lobby-bot-management-card {
    padding: 10px 12px !important;
  }

  .bot-diff-selector {
    gap: 4px !important;
  }

  .bot-diff-pill-btn {
    padding: 7px 4px !important;
    font-size: 0.76rem !important;
  }

  .btn-lobby-bot-action {
    padding: 8px 6px !important;
    font-size: 0.78rem !important;
  }

  .lobby-bot-controls button {
    min-width: 0 !important;
    flex: 1 1 0 !important;
    box-sizing: border-box !important;
    padding: 8px 4px !important;
    font-size: 0.78rem !important;
    text-align: center !important;
  }

  .config-sliders-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .kmkz-turn-slider-group {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
  }

  .kmkz-slider-header-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .kmkz-slider-label {
    font-size: 0.76rem !important;
  }

  .kmkz-slider-val-badge {
    font-size: 0.7rem !important;
    padding: 1px 5px !important;
  }

  .room-players-panel {
    padding-bottom: 0 !important;
    position: relative !important;
  }

  .bot-actions-row {
    display: flex !important;
    justify-content: center !important;
    margin-top: 6px !important;
  }

  .btn-add-single-bot {
    width: auto !important;
    max-width: 220px !important;
    min-height: 38px !important;
    padding: 7px 16px !important;
    font-size: 0.82rem !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
    color: #7dd3fc !important;
    border-radius: 10px !important;
    margin: 0 auto !important;
  }

  .btn-add-single-bot.bot-just-added {
    background: rgba(56, 189, 248, 0.2) !important;
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
    pointer-events: none !important;
    opacity: 0.75 !important;
  }

  /* Clean, centered & fully responsive Lobby Controls (Non-Sticky) */
  .lobby-start-controls {
    position: static !important;
    bottom: auto !important;
    z-index: 1 !important;
    width: 100% !important;
    max-width: 520px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 16px auto 0 auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  #btn-leave-room-bottom {
    flex: 0 0 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 12px !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
  }

  #btn-lobby-start-game {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    box-sizing: border-box !important;
    padding: 0 12px !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 2px solid #34d399 !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45) !important;
  }

  #btn-lobby-start-game .btn-hold-content {
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    white-space: nowrap !important;
  }

  #btn-lobby-start-game .btn-hold-title {
    font-size: 0.88rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.02em !important;
  }

  #btn-lobby-start-game .btn-hold-badge {
    font-size: 0.68rem !important;
    padding: 2px 5px !important;
  }

  #btn-lobby-start-game .ui-svg-icon,
  #btn-lobby-start-game .btn-action-icon {
    width: 16px !important;
    height: 16px !important;
    margin-right: 0 !important;
  }

  #btn-lobby-start-game:disabled {
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1.5px solid rgba(148, 163, 184, 0.25) !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    opacity: 0.7 !important;
  }

  @media (max-width: 360px) {
    .lobby-start-controls {
      gap: 6px !important;
      margin-top: 12px !important;
    }

    #btn-leave-room-bottom {
      flex: 0 0 42px !important;
      width: 42px !important;
      min-width: 42px !important;
      max-width: 42px !important;
      height: 42px !important;
      min-height: 42px !important;
      max-height: 42px !important;
      border-radius: 10px !important;
    }

    #btn-leave-room-bottom svg {
      width: 18px !important;
      height: 18px !important;
    }

    #btn-lobby-start-game {
      height: 42px !important;
      min-height: 42px !important;
      max-height: 42px !important;
      border-radius: 10px !important;
      padding: 0 6px !important;
    }

    #btn-lobby-start-game .btn-hold-title {
      font-size: 0.78rem !important;
    }

    #btn-lobby-start-game .btn-hold-badge {
      font-size: 0.62rem !important;
      padding: 1px 4px !important;
    }
  }
}

/* ─── App-Only Quick Links (¿Cómo se juega? & Legal) ───────────────
   CRITICAL REQUIREMENT: These two buttons MUST be displayed ONLY
   when running inside the App (APK / PWA / TWA / Standalone mode).
   In the regular web browser tab, they remain completely hidden.
────────────────────────────────────────────────────────────────── */
/* ─── Prominent Accessible How to Play Card (Lobby) ──────────────── */
.lobby-how-to-play-card-wrap {
  width: 100%;
  margin-top: 8px;
  position: relative;
}

.btn-lobby-how-to-play {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88) 0%, rgba(15, 23, 42, 0.96) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-lobby-how-to-play:hover {
  border-color: rgba(56, 189, 248, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-lobby-how-to-play:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

.btn-lobby-how-to-play:active {
  transform: translateY(0);
}

.how-to-play-badge-glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(18px);
}

.how-to-play-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.how-to-play-icon-box {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(14, 165, 233, 0.12));
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
  flex-shrink: 0;
}

.how-to-play-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.how-to-play-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #38bdf8;
  text-transform: uppercase;
}

.how-to-play-tag .pulse-dot {
  width: 6px;
  height: 6px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseBeacon 1.8s infinite;
}

.how-to-play-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.how-to-play-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.how-to-play-action {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  font-size: 1.15rem;
  font-weight: 900;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.btn-lobby-how-to-play:hover .how-to-play-action {
  transform: translateX(4px);
}

/* ─── Lobby Auxiliary Quick Links ────────────────────────────────── */
.lobby-aux-quick-links {
  width: 100%;
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-lobby-aux-link {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #94a3b8;
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-lobby-aux-link:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.35);
  color: #f1f5f9;
  transform: translateY(-1px);
}

.btn-lobby-aux-link:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.btn-lobby-aux-link .aux-icon {
  font-size: 0.95rem;
  line-height: 1;
}

/* ─── Header Quick Help Button ───────────────────────────────────── */
.btn-header-help {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.btn-header-help:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.btn-header-help:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.header-help-glyph {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

/* ─── Legal & Privacy Modal (In-App Dialog) ──────────────────────── */
.legal-modal-container {
  max-width: 480px !important;
  width: 92% !important;
}

/* ─── Issue & Bug Reporting Modal ────────────────────────────────── */
.report-modal-container {
  max-width: 500px !important;
  width: 92% !important;
  background: radial-gradient(120% 120% at 50% 0%, #1e293b 0%, #0f172a 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 24px rgba(245, 158, 11, 0.12) !important;
}

.custom-select-report {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-select-report:focus,
#report-issue-description:focus,
#report-issue-email:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25) !important;
  outline: none;
}

.pcard-support {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pcard-support:hover {
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.12);
}

.legal-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px !important;
  max-height: 65vh;
  overflow-y: auto;
}

.legal-section-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
}

.legal-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.legal-card-header h3 {
  font-family: var(--font-cinzel, 'Cinzel', serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.legal-section-card p {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
  margin: 0;
}

.legal-external-link-row {
  margin-top: 4px;
  display: flex;
  justify-content: center;
}

.btn-legal-external {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-legal-external:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
}

.legal-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── Network Status Banner (Offline / Online Mobile Resilience) ── */
.network-status-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font-cinzel, 'Cinzel', serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  max-width: 90vw;
  white-space: nowrap;
}

.network-status-banner.hidden {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(-20px) !important;
  pointer-events: none !important;
}

.network-status-banner.is-offline {
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.55);
  color: #fca5a5;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.35);
}

.network-status-banner.is-offline .network-status-icon {
  animation: pulseWarning 1.5s infinite ease-in-out;
  color: #ef4444;
  display: inline-flex;
}

.network-status-banner.is-online {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: #6ee7b7;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.network-status-banner.is-online .network-status-icon {
  color: #10b981;
  display: inline-flex;
}

@keyframes pulseWarning {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.15);
    opacity: 0.6;
  }
}

/* ─── WhatsApp Room Share Button ─────────────────────────────────── */
.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.55) !important;
}

.btn-whatsapp:active {
  transform: translateY(1px) scale(0.97);
}

/* ==========================================================================
   ENHANCED PLAYER STATISTICS & MATCH HISTORY AESTHETICS (Cyberpunk Glass)
   ========================================================================== */

#modal-profile-stats {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

#modal-profile-stats.hidden {
  display: none !important;
}

.kmkz-stats-modal-card {
  width: 100% !important;
  max-width: 560px !important;
  max-height: min(92vh, 92dvh) !important;
  display: flex !important;
  flex-direction: column !important;
  background: radial-gradient(135% 120% at 50% 0%, #111e38 0%, #0c1527 60%, #060a14 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 24px !important;
  padding: 24px !important;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.92), 0 0 35px rgba(56, 189, 248, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.14) !important;
  position: relative !important;
  color: #fff !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.kmkz-stats-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
  flex-shrink: 0;
  gap: 12px;
}

.kmkz-stats-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.95rem, 3.2vw, 1.15rem);
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  line-height: 1.25;
}

.kmkz-stats-modal-title .ui-svg-icon {
  width: 34px !important;
  height: 34px !important;
  padding: 7px !important;
  border-radius: 10px !important;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 116, 144, 0.14) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.34) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  filter: none !important;
  flex-shrink: 0 !important;
}

.kmkz-stats-modal-title span[data-i18n] {
  white-space: normal;
  overflow-wrap: break-word;
}

.kmkz-stats-scroll-body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  padding: 2px 4px 6px 2px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.kmkz-stats-scroll-body::-webkit-scrollbar {
  width: 5px;
}

.kmkz-stats-scroll-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 4px;
}

.kmkz-stats-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 4px;
}

.kmkz-stats-scroll-body::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

#modal-match-history,
.history-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10005 !important;
  background: rgba(4, 7, 15, 0.84) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(6px, 2vw, 16px) !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

.history-unified-modal-card {
  width: 100% !important;
  max-width: min(540px, calc(100vw - 16px)) !important;
  max-height: min(90vh, 90dvh) !important;
  margin: auto !important;
  display: flex !important;
  flex-direction: column !important;
  background: radial-gradient(135% 120% at 50% 0%, #1e1b18 0%, #111422 60%, #060a14 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: clamp(16px, 3.5vw, 24px) !important;
  padding: clamp(12px, 3vw, 20px) !important;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.92), 0 0 35px rgba(251, 191, 36, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.18) !important;
  position: relative !important;
  color: #fff !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.stat-player-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88) 0%, rgba(10, 16, 32, 0.94) 100%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 18px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

.stat-player-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.85);
  border: 2px solid rgba(56, 189, 248, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  overflow: hidden;
}

.stat-player-details {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-player-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.06rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.stat-player-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-league-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 8px rgba(0, 0, 0, 0.3);
  background: rgba(203, 213, 225, 0.15);
  border: 1px solid rgba(203, 213, 225, 0.35);
  color: #cbd5e1;
}

/* KPI Ribbon (4 Individual Executive Tiles) */
.kmkz-stats-kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  text-align: center;
  box-shadow: none;
  box-sizing: border-box;
}

.kmkz-kpi-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.82) 0%, rgba(9, 14, 28, 0.94) 100%);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

.kmkz-kpi-lbl {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.kmkz-kpi-val {
  font-size: 1.32rem;
  font-weight: 900;
  margin-top: 0;
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.kmkz-kpi-val.cyan {
  color: #38bdf8;
}

.kmkz-kpi-val.emerald {
  color: #4ade80;
}

.kmkz-kpi-val.gold {
  color: #fbbf24;
}

.kmkz-kpi-val.pink {
  color: #f472b6;
}

/* Win Gauge */
.stats-win-gauge-wrap {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.72) 0%, rgba(9, 14, 28, 0.88) 100%);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}

.stats-gauge-bar {
  height: 9px;
  width: 100%;
  background: rgba(239, 68, 68, 0.4);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stats-gauge-win {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.stats-gauge-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  font-weight: 700;
}

.gauge-lbl-win {
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gauge-lbl-loss {
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gauge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.gauge-dot.win {
  background: #4ade80;
}

.gauge-dot.loss {
  background: #f87171;
}

/* Section Title */
.kmkz-stats-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.kmkz-stats-section-title span {
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.kmkz-stats-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.25), transparent);
}

/* Feat Cards Grid */
.kmkz-game-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kmkz-game-stat-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.8) 0%, rgba(9, 14, 28, 0.92) 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  grid-template-areas:
    "icon val"
    "label label" !important;
  align-items: center !important;
  gap: 10px 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  min-width: 0;
  box-sizing: border-box;
}

.kmkz-game-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.12) !important;
}

.kmkz-game-stat-card .stat-feat-icon-wrap {
  grid-area: icon;
}

.kmkz-game-stat-card .stat-card-info {
  display: contents !important;
}

.kmkz-game-stat-card .stat-card-label {
  grid-area: label;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #94a3b8;
  text-transform: uppercase;
  display: block;
  line-height: 1.3;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.kmkz-game-stat-card .stat-card-value {
  grid-area: val;
  justify-self: end;
  font-size: 1.3rem;
  font-weight: 900;
  margin-top: 0;
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-card-value.cyan {
  color: #38bdf8;
}

.stat-card-value.gold {
  color: #fbbf24;
}

.stat-card-value.orange {
  color: #fb923c;
}

.stat-card-value.purple {
  color: #c084fc;
}

.stat-card-value.ruby {
  color: #f87171;
}

.stat-card-value.emerald {
  color: #4ade80;
}

.stat-card-value.teal {
  color: #22d3ee;
}

.stat-feat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.stat-feat-icon-wrap.cyan {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.stat-feat-icon-wrap.gold {
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

.stat-feat-icon-wrap.orange {
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #fb923c;
}

.stat-feat-icon-wrap.purple {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.stat-feat-icon-wrap.ruby {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.stat-feat-icon-wrap.emerald {
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.stat-feat-icon-wrap.teal {
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #22d3ee;
}

/* ELO Footer Banner */
.kmkz-elo-banner {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.1) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(192, 132, 252, 0.28);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.kmkz-elo-banner-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #cbd5e1;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.kmkz-elo-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#stat-max-elo-tier {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

#stat-max-elo {
  font-size: 1.25rem;
  font-weight: 900;
  color: #c084fc;
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES FOR KMKZ STATS & MATCH HISTORY MODALS
   ========================================================================== */

@media (max-width: 600px) {

  #modal-profile-stats,
  #modal-match-history {
    padding: 10px !important;
  }

  .kmkz-stats-modal-card,
  .history-unified-modal-card {
    padding: 18px 16px !important;
    border-radius: 20px !important;
    max-height: min(92vh, 92dvh) !important;
    max-width: min(540px, calc(100vw - 16px)) !important;
  }

  .kmkz-stats-modal-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .kmkz-stats-modal-title {
    font-size: clamp(0.92rem, 3.6vw, 1.05rem);
  }

  .kmkz-stats-scroll-body {
    gap: 14px !important;
  }
}

@media (max-width: 480px) {
  .stat-player-hero {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px 14px;
  }

  .stat-player-avatar-wrap {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .stat-player-name {
    font-size: 0.98rem;
  }

  .stat-player-sub {
    font-size: 0.72rem;
  }

  .stat-league-pill {
    width: fit-content;
    justify-content: flex-start;
    margin-left: 56px;
    order: 3;
    font-size: 0.68rem;
    padding: 4px 10px;
  }

  .stats-win-gauge-wrap {
    padding: 11px 12px;
  }

  .stats-gauge-labels {
    font-size: 0.7rem;
    flex-wrap: wrap;
    gap: 4px;
  }

  .kmkz-game-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .kmkz-game-stat-card {
    padding: 11px 12px !important;
    gap: 8px 10px !important;
    border-radius: 14px !important;
  }

  .stat-feat-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .stat-feat-icon-wrap svg {
    width: 16px;
    height: 16px;
  }

  .kmkz-game-stat-card .stat-card-label {
    font-size: 0.67rem;
    line-height: 1.25;
  }

  .kmkz-game-stat-card .stat-card-value {
    font-size: 1.18rem;
  }
}

@media (max-width: 440px) {
  .kmkz-stats-kpi-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 0;
  }

  .kmkz-kpi-item {
    padding: 11px 10px;
  }

  .kmkz-kpi-lbl {
    font-size: 0.65rem;
  }

  .kmkz-kpi-val {
    font-size: 1.22rem;
  }

  .kmkz-elo-banner {
    padding: 11px 12px;
    border-radius: 14px;
  }

  .kmkz-elo-banner-label {
    font-size: 0.69rem;
    gap: 6px;
  }

  #stat-max-elo-tier {
    font-size: 0.68rem;
    padding: 2px 7px;
  }

  #stat-max-elo {
    font-size: 1.15rem;
  }

  .history-segmented-tabs {
    display: flex !important;
    padding: 3px !important;
    gap: 5px !important;
    margin-bottom: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .history-tab-pill {
    flex: 1 1 50% !important;
    min-width: 0 !important;
    padding: 7px 6px !important;
    font-size: clamp(0.72rem, 2.8vw, 0.82rem) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
  }

  .history-tab-pill .tab-pill-text {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

}

@media (max-width: 380px) {

  #modal-profile-stats,
  #modal-match-history {
    padding: 8px 6px !important;
  }

  .kmkz-stats-modal-card,
  .history-unified-modal-card {
    padding: 16px 12px !important;
    border-radius: 18px !important;
    max-width: calc(100vw - 12px) !important;
  }

  .kmkz-game-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .kmkz-game-stat-card {
    padding: 10px 11px !important;
    gap: 8px !important;
  }

  .stat-feat-icon-wrap {
    width: 30px;
    height: 30px;
  }

  .kmkz-game-stat-card .stat-card-label {
    font-size: 0.65rem;
  }

  .kmkz-game-stat-card .stat-card-value {
    font-size: 1.12rem;
  }
}

/* Match History Filter Segmented Control */
.match-history-filter-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  width: 100%;
  box-sizing: border-box;
}

.history-filter-pill {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 6px;
  min-height: 38px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #94a3b8;
  font-size: clamp(0.72rem, 2.6vw, 0.82rem);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.history-filter-pill:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.history-filter-pill.active {
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.2);
  font-weight: 800;
}

.history-filter-pill[data-filter="pvp"].active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.12));
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}

.history-filter-pill[data-filter="bot"].active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(139, 92, 246, 0.12));
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.2);
}

.history-filter-pill .filter-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.history-filter-pill .filter-pill-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-filter-pill .filter-pill-count {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  line-height: 1.3;
  flex-shrink: 0;
}

.history-filter-pill.active .filter-pill-count {
  background: rgba(251, 191, 36, 0.32);
  color: #fef08a;
}

.history-filter-pill[data-filter="pvp"].active .filter-pill-count {
  background: rgba(56, 189, 248, 0.32);
  color: #bae6fd;
}

.history-filter-pill[data-filter="bot"].active .filter-pill-count {
  background: rgba(168, 85, 247, 0.32);
  color: #e9d5ff;
}

/* Match Type Minimalist Badge */
.match-badge-type {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1.2;
}

.match-badge-type.badge-pvp {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.match-badge-type.badge-bot {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* Opponent Chip Bot vs Player styles */
.match-opponent-chip.opp-bot {
  border-color: rgba(168, 85, 247, 0.25);
}

.match-opponent-chip .chip-avatar.is-bot {
  color: #c084fc;
}

/* Empty filter state */
.match-history-empty-filter {
  text-align: center;
  padding: 32px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.match-history-empty-filter .m-empty-icon {
  margin-bottom: 2px;
  opacity: 0.85;
}

.match-history-empty-filter .m-empty-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
}

.match-history-empty-filter .m-empty-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
  max-width: 280px;
  line-height: 1.4;
}

/* Match History Card & Summary */
.match-history-summary-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 16px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.m-summary-lbl {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  display: block;
}

.m-summary-val {
  font-size: 1.15rem;
  font-weight: 900;
  margin-top: 1px;
}

.m-summary-val.cyan {
  color: #38bdf8;
}

.m-summary-val.emerald {
  color: #4ade80;
}

.m-summary-val.gold {
  color: #fbbf24;
}

.m-summary-rate {
  font-size: 0.76rem;
  font-weight: 800;
  opacity: 0.85;
}

.match-history-card {
  background: rgba(15, 23, 42, 0.75);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.match-history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.match-history-card.is-win {
  border-left: 4px solid #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.85) 45%);
}

.match-history-card.is-defeat {
  border-left: 4px solid #ef4444;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(15, 23, 42, 0.85) 45%);
}

.match-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  flex-wrap: wrap;
}

.match-mode-pill {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.3;
}

.match-mode-pill .mode-text-label {
  display: inline;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
  word-break: break-word;
}

.match-date-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.match-card-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.match-result-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.match-result-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.match-result-pill.win {
  background: rgba(16, 185, 129, 0.22);
  color: #4ade80;
  border: 1px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.match-result-pill.defeat {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.match-vp-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.match-elo-delta-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.match-elo-delta-pill.gain {
  color: #4ade80;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.match-elo-delta-pill.loss {
  color: #f87171;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.match-elo-delta-pill.neutral {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.match-opponents-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 7px;
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.match-opponents-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.match-opponents-chips {
  display: flex;
  align-items: center;
  gap: 5px 6px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.match-opponent-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  color: #f8fafc;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  flex-shrink: 1;
}

.match-opponent-chip .chip-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.match-opponent-chip .chip-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  font-weight: 700;
  color: #e2e8f0;
}

.opp-chip-vp {
  background: rgba(251, 191, 36, 0.22);
  color: #fbbf24;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================================================
   ROBUST RESPONSIVE QUERIES FOR MATCH HISTORY CARDS & MODAL
   ========================================================================== */
@media (max-width: 540px) {
  #modal-match-history {
    padding: 8px 6px !important;
    box-sizing: border-box !important;
  }

  #modal-match-history .history-unified-modal-card {
    padding: 12px 10px !important;
    border-radius: 18px !important;
    max-width: calc(100vw - 12px) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    max-height: min(92vh, 92dvh) !important;
  }

  #history-panel-matches,
  #history-panel-purchases {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  #match-history-list,
  #purchase-history-list {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-right: 2px !important;
  }

  .match-history-summary-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
    padding: 8px 6px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .m-summary-lbl {
    font-size: 0.7rem;
  }

  .m-summary-val {
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  }

  .match-history-card {
    padding: 10px 10px !important;
    gap: 7px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .match-card-top-row {
    gap: 4px 8px !important;
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  .match-mode-pill {
    font-size: 0.80rem !important;
    gap: 5px !important;
    min-width: 0 !important;
  }

  .match-date-pill {
    font-size: 0.70rem !important;
  }

  .match-card-main-row {
    gap: 6px 8px !important;
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  .match-result-pill {
    font-size: 0.72rem !important;
    padding: 3px 8px !important;
    gap: 4px !important;
  }

  .match-vp-badge {
    font-size: 0.70rem !important;
    padding: 2.5px 6px !important;
  }

  .match-elo-delta-pill {
    font-size: 0.74rem !important;
    padding: 3px 8px !important;
  }

  .match-opponents-chips {
    gap: 5px !important;
  }

  .match-opponent-chip {
    font-size: 0.70rem !important;
    padding: 2.5px 7px !important;
  }

  .match-opponent-chip .chip-name {
    max-width: clamp(65px, 25vw, 110px) !important;
  }
}

@media (max-width: 400px) {
  #modal-match-history {
    padding: 6px 4px !important;
  }

  #modal-match-history .history-unified-modal-card {
    padding: 10px 8px !important;
    border-radius: 16px !important;
    max-width: calc(100vw - 8px) !important;
    width: 100% !important;
  }

  .history-segmented-tabs {
    padding: 3px !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
  }

  .history-tab-pill {
    padding: 6px 4px !important;
    font-size: 0.72rem !important;
  }

  .match-history-filter-bar {
    gap: 3px !important;
    padding: 3px !important;
    border-radius: 10px !important;
    margin-bottom: 6px !important;
  }

  .history-filter-pill {
    padding: 6px 3px !important;
    gap: 4px !important;
    min-height: 35px !important;
    font-size: 0.70rem !important;
  }

  .history-filter-pill .filter-pill-count {
    padding: 1px 4px !important;
    font-size: 0.7rem !important;
  }

  .match-badge-type {
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
  }

  .match-history-summary-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px;
    padding: 6px 4px;
  }

  .m-summary-lbl {
    font-size: 0.7rem;
  }

  .m-summary-val {
    font-size: 0.92rem;
  }

  .m-summary-rate {
    font-size: 0.7rem;
  }

  .match-history-card {
    padding: 8px 7px !important;
    gap: 6px !important;
    border-radius: 12px !important;
  }

  .match-mode-pill {
    font-size: 0.76rem !important;
  }

  .match-date-pill {
    font-size: 0.7rem !important;
  }

  .match-card-main-row {
    gap: 5px 6px !important;
  }

  .match-result-group {
    gap: 4px !important;
  }

  .match-result-pill {
    font-size: 0.7rem !important;
    padding: 2.5px 6px !important;
  }

  .match-vp-badge {
    font-size: 0.7rem !important;
    padding: 2px 5px !important;
  }

  .match-elo-delta-pill {
    font-size: 0.70rem !important;
    padding: 2.5px 6px !important;
  }

  .match-opponents-title {
    font-size: 0.7rem !important;
  }

  .match-opponents-chips {
    gap: 4px !important;
  }

  .match-opponent-chip {
    font-size: 0.7rem !important;
    padding: 2px 5px !important;
    gap: 3px !important;
  }

  .match-opponent-chip .chip-name {
    max-width: clamp(55px, 22vw, 90px) !important;
  }

  .purchase-card-item {
    padding: 8px 8px !important;
    gap: 8px !important;
  }

  .purchase-item-title {
    font-size: 0.80rem !important;
  }
}

@media (max-width: 360px) {
  #modal-match-history {
    padding: 4px 2px !important;
  }

  #modal-match-history .history-unified-modal-card {
    padding: 8px 6px !important;
    border-radius: 14px !important;
    max-width: calc(100vw - 4px) !important;
  }

  .history-modal-title {
    font-size: 0.90rem !important;
  }

  .match-history-filter-bar {
    gap: 2px !important;
    padding: 2px !important;
  }

  .history-filter-pill {
    padding: 5px 2px !important;
    font-size: 0.7rem !important;
    gap: 3px !important;
  }

  .history-filter-pill .filter-pill-count {
    font-size: 0.7rem !important;
    padding: 0 3px !important;
  }

  .history-filter-pill .filter-pill-icon svg {
    width: 11px !important;
    height: 11px !important;
  }

  .match-history-summary-dashboard {
    padding: 4px 2px;
    gap: 2px;
  }

  .m-summary-lbl {
    font-size: 0.7rem !important;
  }

  .m-summary-val {
    font-size: 0.85rem !important;
  }

  .m-summary-rate {
    font-size: 0.7rem !important;
  }

  .match-history-card {
    padding: 7px 5px !important;
    gap: 5px !important;
  }

  .match-mode-pill {
    font-size: 0.72rem !important;
  }

  .match-date-pill {
    font-size: 0.7rem !important;
  }

  .match-result-pill {
    font-size: 0.7rem !important;
    padding: 2px 4px !important;
  }

  .match-vp-badge {
    font-size: 0.7rem !important;
    padding: 1.5px 4px !important;
  }

  .match-elo-delta-pill {
    font-size: 0.7rem !important;
    padding: 2px 4px !important;
  }

  .match-opponent-chip {
    font-size: 0.7rem !important;
    padding: 1.5px 4px !important;
  }

  .match-opponent-chip .chip-name {
    max-width: 70px !important;
  }
}

@media (max-height: 600px) {
  #modal-match-history {
    align-items: flex-start !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  #modal-match-history .history-unified-modal-card {
    max-height: calc(100vh - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    margin: 0 auto !important;
  }
}

.match-history-empty-card {
  text-align: center;
  padding: 36px 16px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(251, 191, 36, 0.3);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.m-empty-icon {
  color: #fbbf24;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.3));
}

.m-empty-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #f8fafc;
  margin: 0;
}

.m-empty-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  max-width: 320px;
  margin: 0;
  line-height: 1.4;
}

.btn-history-play-now {
  margin-top: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 900;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-history-play-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.45);
}

.btn-account-quick-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.btn-account-quick-action:active {
  transform: translateY(1px) scale(0.98);
}

/* ==========================================================================
   HEADER PROFILE AVATAR BUTTON & DROPDOWN POPOVER
   ========================================================================== */

.header-profile-btn-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

#btn-header-auth,
.hud-capsule-profile-btn,
#btn-notifications-bell,
.hud-capsule-bell-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

#btn-header-auth *,
.hud-capsule-profile-btn *,
#btn-notifications-bell *,
.hud-capsule-bell-btn * {
  pointer-events: none !important;
}

.btn-header-profile-avatar {
  position: relative;
  overflow: visible !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-header-profile-avatar.is-authenticated,
#btn-header-auth.is-authenticated {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
}

.btn-header-profile-avatar.is-authenticated:hover,
#btn-header-auth.is-authenticated:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: translateY(-1px) scale(1.06);
}

.header-user-avatar-slot,
#btn-header-auth .header-user-avatar-slot,
#header-user-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  font-size: 1.6rem !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.header-user-avatar-slot svg,
.header-user-avatar-slot img,
#btn-header-auth .header-user-avatar-slot svg,
#btn-header-auth .header-user-avatar-slot img,
#btn-header-auth #header-user-avatar svg,
#btn-header-auth #header-user-avatar img {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  border-radius: inherit !important;
  display: block !important;
}

.header-user-avatar-slot.is-hexagonal,
#btn-header-auth.is-hexagonal,
#btn-header-auth:has(.kmkz-profile-hex-svg),
#btn-header-auth:has(.is-hexagonal),
#header-user-avatar.is-hexagonal,
#header-user-avatar:has(.kmkz-profile-hex-svg) {
  overflow: visible !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#btn-header-auth .kmkz-profile-hex-svg,
#header-user-avatar .kmkz-profile-hex-svg,
.header-user-avatar-slot .kmkz-profile-hex-svg {
  width: 42px !important;
  height: 48px !important;
  min-width: 42px !important;
  min-height: 48px !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  display: block !important;
  margin: auto !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55)) !important;
}

.kmkz-profile-hex-svg .phx-layer-content svg,
.kmkz-profile-hex-svg .phx-layer-content img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  object-fit: contain !important;
}

#btn-header-auth .header-user-avatar-slot,
#btn-header-auth .header-user-avatar-slot *,
#btn-header-auth #header-user-avatar,
#btn-header-auth #header-user-avatar *,
#btn-header-auth #header-auth-icon,
#btn-header-auth #header-auth-icon * {
  pointer-events: none !important;
}

.header-profile-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #0f172a;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: pulseNotifBadge 2s infinite;
  z-index: 5;
}

@keyframes pulseNotifBadge {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.9);
  }
}

/* ── Popover Flotante de Perfil (Optimizado, Modular y Totalmente Responsive) ── */
.header-profile-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 350px;
  max-width: min(350px, calc(100vw - 16px));
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
  background: linear-gradient(175deg, rgba(15, 23, 42, 0.97) 0%, rgba(10, 15, 29, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 
    0 24px 60px -8px rgba(0, 0, 0, 0.88),
    0 0 28px rgba(56, 189, 248, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 20px rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 10005;
  box-sizing: border-box;
  animation: popoverFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.header-profile-popover::-webkit-scrollbar {
  width: 4px;
}

.header-profile-popover::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.header-profile-popover.hidden {
  display: none !important;
}

.header-profile-popover .popover-arrow {
  position: absolute;
  top: -6px;
  right: 17px;
  width: 11px;
  height: 11px;
  background: rgba(15, 23, 42, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  transform: rotate(45deg);
  pointer-events: none;
}

/* User Hero Card inside Popover */
.header-profile-popover .pcard.hero-card-compact {
  padding: 10px 12px !important;
  background: linear-gradient(150deg, rgba(30, 41, 69, 0.6) 0%, rgba(15, 23, 42, 0.82) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 18px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.header-profile-popover .pcard.hero-card-compact:hover {
  border-color: rgba(56, 189, 248, 0.3) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(56, 189, 248, 0.1) !important;
}

.header-profile-popover .hero-section {
  padding: 0 !important;
  gap: 12px !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.header-profile-popover .hero-avatar-wrap {
  width: 66px !important;
  height: 72px !important;
  min-width: 66px !important;
  max-width: 66px !important;
  margin: 0 !important;
  position: relative !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

.header-profile-popover .hero-avatar-wrap::before {
  content: '' !important;
  position: absolute !important;
  inset: -4px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(168, 85, 247, 0.08) 50%, transparent 75%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  display: block !important;
}

.header-profile-popover .hero-avatar {
  width: 66px !important;
  height: 72px !important;
  min-width: 66px !important;
  max-width: 66px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 1 !important;
}

.header-profile-popover .hero-avatar:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 3px !important;
  border-radius: 12px !important;
}

.header-profile-popover .hero-avatar-icon,
.header-profile-popover #hero-avatar-icon,
.header-profile-popover #btn-edit-avatar-trigger .hero-avatar-icon,
.header-profile-popover #btn-edit-avatar-trigger #hero-avatar-icon {
  font-size: 2.8rem !important;
  width: 66px !important;
  height: 72px !important;
  max-width: 66px !important;
  max-height: 72px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  border-radius: 0 !important;
}

/* Strict SVG sizing constraint to guarantee the avatar never inflates beyond container */
.header-profile-popover .hero-avatar-icon svg,
.header-profile-popover #hero-avatar-icon svg,
.header-profile-popover .hero-avatar svg,
.header-profile-popover #btn-edit-avatar-trigger svg {
  max-width: 68px !important;
  max-height: 74px !important;
  width: 100% !important;
  height: 100% !important;
  display: inline-block !important;
  overflow: visible !important;
  vertical-align: middle !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45)) !important;
}

.header-profile-popover #hero-avatar-icon svg.kmkz-avatar-svg:not(.kmkz-profile-hex-svg),
.header-profile-popover .hero-avatar-icon svg.kmkz-avatar-svg:not(.kmkz-profile-hex-svg) {
  width: 58px !important;
  height: 58px !important;
  max-width: 58px !important;
  max-height: 58px !important;
  border-radius: 50% !important;
}

.header-profile-popover .hero-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  flex: 1 !important;
  min-width: 0 !important;
  gap: 4px !important;
  overflow: hidden !important;
}

.header-profile-popover .hero-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.header-profile-popover .hero-name {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  flex: 1 !important;
  min-width: 0 !important;
  letter-spacing: 0.25px !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

.header-profile-popover .hero-meta-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.header-profile-popover .hero-title-badge {
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  padding: 2.5px 8px !important;
  border-radius: 7px !important;
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fde047 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer !important;
  line-height: 1.2 !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease !important;
}

.header-profile-popover .hero-title-badge:hover {
  background: rgba(251, 191, 36, 0.24) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.header-profile-popover .hero-title-badge:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

/* Mini Action Expand Card Button in Hero Header */
.header-profile-popover .popover-expand-card-btn,
.header-profile-popover #btn-popover-expand-card,
.hero-section #btn-popover-expand-card,
#btn-popover-expand-card {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 11px !important;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.98) 55%, rgba(10, 15, 30, 0.99) 100%) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.60) !important;
  border-top: 1.5px solid rgba(216, 180, 254, 0.90) !important;
  border-right: 1.5px solid rgba(56, 189, 248, 0.75) !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.75), 0 0 14px rgba(168, 85, 247, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(56, 189, 248, 0.20) !important;
  color: #c7d2fe !important;
  cursor: pointer !important;
  outline: none !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease !important;
}

.header-profile-popover .popover-expand-card-btn:focus-visible,
.header-profile-popover #btn-popover-expand-card:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

.header-profile-popover .popover-expand-card-btn:hover,
.header-profile-popover #btn-popover-expand-card:hover,
.hero-section #btn-popover-expand-card:hover,
#btn-popover-expand-card:hover {
  background: linear-gradient(145deg, rgba(49, 46, 129, 0.95) 0%, rgba(24, 32, 60, 0.98) 55%, rgba(15, 23, 42, 0.99) 100%) !important;
  border-color: #c084fc !important;
  border-right-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.85), 0 0 22px rgba(168, 85, 247, 0.65), 0 0 12px rgba(56, 189, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  transform: translateY(-2px) scale(1.06) !important;
}

.header-profile-popover .popover-expand-card-btn:active,
.header-profile-popover #btn-popover-expand-card:active,
.hero-section #btn-popover-expand-card:active,
#btn-popover-expand-card:active {
  transform: translateY(0) scale(0.96) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(168, 85, 247, 0.4) !important;
}

/* 3-Column Key Stats Grid (ELO, Victorias, Nivel) */
.header-profile-popover .popover-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  margin-top: 6px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box !important;
}

.header-profile-popover .popover-stats-grid .stat-cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 5px 3px !important;
  border-radius: 10px !important;
  background: rgba(10, 16, 30, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  text-decoration: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

.header-profile-popover .popover-stats-grid .stat-cell:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

.header-profile-popover .popover-stats-grid .stat-cell-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  margin-bottom: 2px !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  color: #cbd5e1 !important;
  line-height: 1 !important;
}

.header-profile-popover .popover-stats-grid .val {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  font-feature-settings: "tnum" !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Stat Cell Accents */
.header-profile-popover .stat-cell.gold {
  border-color: rgba(251, 191, 36, 0.28) !important;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.08) 0%, rgba(10, 16, 30, 0.7) 100%) !important;
}
.header-profile-popover .stat-cell.gold .stat-cell-header {
  color: #fbbf24 !important;
}
.header-profile-popover .stat-cell.gold .val {
  color: #fef08a !important;
}

.header-profile-popover .stat-cell.cyan {
  border-color: rgba(56, 189, 248, 0.28) !important;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.08) 0%, rgba(10, 16, 30, 0.7) 100%) !important;
}
.header-profile-popover .stat-cell.cyan .stat-cell-header {
  color: #38bdf8 !important;
}
.header-profile-popover .stat-cell.cyan .val {
  color: #e0f2fe !important;
}

.header-profile-popover .stat-cell.purple,
.header-profile-popover #hero-badge-level {
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.16) 0%, rgba(10, 16, 30, 0.75) 100%) !important;
  border-color: rgba(192, 132, 252, 0.35) !important;
  cursor: pointer !important;
}
.header-profile-popover .stat-cell.purple .stat-cell-header,
.header-profile-popover #hero-badge-level .stat-cell-header {
  color: #c084fc !important;
}
.header-profile-popover .stat-cell.purple .val,
.header-profile-popover #hero-badge-level .val {
  color: #f3e8ff !important;
}
.header-profile-popover #hero-badge-level:hover {
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.28) 0%, rgba(20, 15, 38, 0.9) 100%) !important;
  border-color: #d8b4fe !important;
  box-shadow: 0 3px 10px rgba(168, 85, 247, 0.25) !important;
  transform: translateY(-1px) !important;
}

.header-profile-popover .stat-cell.coins-pill {
  border-color: rgba(245, 158, 11, 0.28) !important;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08) 0%, rgba(10, 16, 30, 0.7) 100%) !important;
}
.header-profile-popover .stat-cell.coins-pill .stat-cell-header {
  color: #f59e0b !important;
}
.header-profile-popover .stat-cell.coins-pill .val {
  color: #fde68a !important;
}

/* ── 4-Column Gaming Hub Actions (2 rows) ──────────────────────────────────── */
.header-profile-popover .popover-actions-grid,
.header-profile-popover .popover-nav-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.header-profile-popover .popover-tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 3px 7px 3px !important;
  min-height: 56px !important;
  border-radius: 12px !important;
  background: linear-gradient(150deg, rgba(26, 38, 62, 0.65) 0%, rgba(12, 19, 36, 0.88) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
  cursor: pointer !important;
  position: relative !important;
  box-sizing: border-box !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  outline: none !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.header-profile-popover .popover-tile:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

.header-profile-popover .popover-tile:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.header-profile-popover .popover-tile:active {
  transform: translateY(0) scale(0.96) !important;
}

.header-profile-popover .popover-tile-top {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  width: 100% !important;
  margin-bottom: 3px !important;
}

.header-profile-popover .popover-tile-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.header-profile-popover .popover-tile:hover .popover-tile-icon {
  transform: scale(1.12) !important;
}

.header-profile-popover .popover-tile-badge,
.header-profile-popover .popover-mail-badge {
  position: absolute !important;
  top: -5px !important;
  right: 1px !important;
  min-width: 16px !important;
  height: 16px !important;
  padding: 0 3px !important;
  border-radius: 9999px !important;
  font-size: 0.64rem !important;
  font-weight: 900 !important;
  font-family: 'JetBrains Mono', monospace !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.header-profile-popover .popover-tile-label {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  letter-spacing: 0.15px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  text-align: center !important;
  line-height: 1.15 !important;
}

/* Distinct Glowing Tile Accents */
.header-profile-popover .tile-history {
  border-color: rgba(129, 140, 248, 0.25) !important;
}
.header-profile-popover .tile-history .popover-tile-icon {
  color: #818cf8 !important;
}
.header-profile-popover .tile-history:hover {
  border-color: rgba(129, 140, 248, 0.6) !important;
  background: linear-gradient(150deg, rgba(99, 102, 241, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35) !important;
}
.header-profile-popover .tile-history .popover-tile-badge {
  background: rgba(99, 102, 241, 0.35) !important;
  border: 1px solid rgba(129, 140, 248, 0.6) !important;
  color: #c7d2fe !important;
}

.header-profile-popover .tile-stats {
  border-color: rgba(251, 191, 36, 0.25) !important;
}
.header-profile-popover .tile-stats .popover-tile-icon {
  color: #fbbf24 !important;
}
.header-profile-popover .tile-stats:hover {
  border-color: rgba(251, 191, 36, 0.6) !important;
  background: linear-gradient(150deg, rgba(245, 158, 11, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35) !important;
}

.header-profile-popover .tile-mail {
  border-color: rgba(56, 189, 248, 0.25) !important;
}
.header-profile-popover .tile-mail .popover-tile-icon {
  color: #38bdf8 !important;
}
.header-profile-popover .tile-mail:hover {
  border-color: rgba(56, 189, 248, 0.6) !important;
  background: linear-gradient(150deg, rgba(14, 165, 233, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35) !important;
}
.header-profile-popover .popover-mail-badge {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  border: 1px solid rgba(56, 189, 248, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5) !important;
}

.header-profile-popover .tile-friends {
  border-color: rgba(52, 211, 153, 0.25) !important;
}
.header-profile-popover .tile-friends .popover-tile-icon {
  color: #34d399 !important;
}
.header-profile-popover .tile-friends:hover {
  border-color: rgba(52, 211, 153, 0.6) !important;
  background: linear-gradient(150deg, rgba(16, 185, 129, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35) !important;
}

.header-profile-popover .tile-shop {
  border-color: rgba(244, 63, 94, 0.25) !important;
}
.header-profile-popover .tile-shop .popover-tile-icon {
  color: #fb7185 !important;
}
.header-profile-popover .tile-shop:hover {
  border-color: rgba(244, 63, 94, 0.6) !important;
  background: linear-gradient(150deg, rgba(244, 63, 94, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.35) !important;
}

.header-profile-popover .tile-inventory {
  border-color: rgba(168, 85, 247, 0.25) !important;
}
.header-profile-popover .tile-inventory .popover-tile-icon {
  color: #c084fc !important;
}
.header-profile-popover .tile-inventory:hover {
  border-color: rgba(168, 85, 247, 0.6) !important;
  background: linear-gradient(150deg, rgba(168, 85, 247, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.35) !important;
}

.header-profile-popover .tile-target {
  border-color: rgba(249, 115, 22, 0.25) !important;
}
.header-profile-popover .tile-target .popover-tile-icon {
  color: #fb923c !important;
}
.header-profile-popover .tile-target:hover {
  border-color: rgba(249, 115, 22, 0.6) !important;
  background: linear-gradient(150deg, rgba(249, 115, 22, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.35) !important;
}

.header-profile-popover .tile-season {
  border-color: rgba(234, 179, 8, 0.25) !important;
}
.header-profile-popover .tile-season .popover-tile-icon {
  color: #facc15 !important;
}
.header-profile-popover .tile-season:hover {
  border-color: rgba(234, 179, 8, 0.6) !important;
  background: linear-gradient(150deg, rgba(234, 179, 8, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  box-shadow: 0 6px 18px rgba(234, 179, 8, 0.35) !important;
}

/* ── Admin Button (Conditional) ────────────────────────────────────────────── */
.header-profile-popover .popover-admin-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 7px 10px !important;
  min-height: 34px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(185, 28, 28, 0.22)) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.header-profile-popover .popover-admin-btn:focus-visible {
  outline: 2px solid #ef4444 !important;
  outline-offset: 2px !important;
}

.header-profile-popover .popover-admin-btn:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 14px rgba(239, 68, 68, 0.35) !important;
  transform: translateY(-1px) !important;
}

.header-profile-popover .popover-admin-btn.hidden {
  display: none !important;
}

/* ── Logout / Auth Footer Button ───────────────────────────────────────────── */
.header-profile-popover .popover-logout-btn {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  min-height: 36px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(185, 28, 28, 0.12) 100%) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  color: #fca5a5 !important;
  font-size: 0.80rem !important;
  font-weight: 800 !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  user-select: none !important;
  margin-top: 2px !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease !important;
}

.header-profile-popover .popover-logout-btn:focus-visible {
  outline: 2px solid #ef4444 !important;
  outline-offset: 2px !important;
}

.header-profile-popover .popover-logout-btn:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(185, 28, 28, 0.30) 100%) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35) !important;
  transform: translateY(-1px) !important;
}

.header-profile-popover .popover-logout-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

/* ─── Responsive Media Queries ─────────────────────────────────────────────── */

/* Tablet & Mobile Screens (<= 640px) */
@media (max-width: 640px) {
  .header-profile-popover {
    position: fixed !important;
    top: calc(56px + env(safe-area-inset-top, 0px)) !important;
    right: 10px !important;
    left: auto !important;
    width: min(340px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 70px) !important;
    padding: 10px !important;
    gap: 7px !important;
    border-radius: 18px !important;
    z-index: 10005 !important;
  }

  .header-profile-popover .popover-arrow {
    right: 18px !important;
  }

  .header-profile-popover .hero-avatar-wrap,
  .header-profile-popover .hero-avatar {
    width: 60px !important;
    height: 66px !important;
    min-width: 60px !important;
    max-width: 60px !important;
  }

  .header-profile-popover .hero-avatar-icon,
  .header-profile-popover #hero-avatar-icon,
  .header-profile-popover #btn-edit-avatar-trigger .hero-avatar-icon,
  .header-profile-popover #btn-edit-avatar-trigger #hero-avatar-icon {
    width: 60px !important;
    height: 66px !important;
    max-width: 60px !important;
    max-height: 66px !important;
    font-size: 2.5rem !important;
  }

  .header-profile-popover .hero-avatar-icon svg,
  .header-profile-popover #hero-avatar-icon svg,
  .header-profile-popover .hero-avatar svg,
  .header-profile-popover #btn-edit-avatar-trigger svg {
    max-width: 62px !important;
    max-height: 68px !important;
  }

  .header-profile-popover .popover-actions-grid,
  .header-profile-popover .popover-nav-row {
    gap: 5px !important;
  }

  .header-profile-popover .popover-tile {
    padding: 7px 2px !important;
    min-height: 52px !important;
    border-radius: 11px !important;
    min-width: 0 !important;
  }

  .header-profile-popover .popover-tile-label {
    font-size: 0.69rem !important;
  }

  .header-profile-popover #btn-popover-expand-card,
  .header-profile-popover .popover-expand-card-btn,
  .hero-section #btn-popover-expand-card {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    border-radius: 10px !important;
  }
}

/* Narrow Mobile Screens (<= 380px) */
@media (max-width: 380px) {
  .header-profile-popover {
    position: fixed !important;
    top: calc(52px + env(safe-area-inset-top, 0px)) !important;
    right: 6px !important;
    left: 6px !important;
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    padding: 8px !important;
    gap: 6px !important;
    border-radius: 16px !important;
  }

  .header-profile-popover .popover-arrow {
    right: 22px !important;
  }

  .header-profile-popover .pcard.hero-card-compact {
    padding: 8px 10px !important;
  }

  .header-profile-popover .hero-avatar-wrap,
  .header-profile-popover .hero-avatar {
    width: 56px !important;
    height: 62px !important;
    min-width: 56px !important;
    max-width: 56px !important;
  }

  .header-profile-popover .hero-avatar-icon,
  .header-profile-popover #hero-avatar-icon,
  .header-profile-popover #btn-edit-avatar-trigger .hero-avatar-icon,
  .header-profile-popover #btn-edit-avatar-trigger #hero-avatar-icon {
    width: 56px !important;
    height: 62px !important;
    max-width: 56px !important;
    max-height: 62px !important;
    font-size: 2.3rem !important;
  }

  .header-profile-popover .hero-avatar-icon svg,
  .header-profile-popover #hero-avatar-icon svg,
  .header-profile-popover .hero-avatar svg,
  .header-profile-popover #btn-edit-avatar-trigger svg {
    max-width: 58px !important;
    max-height: 64px !important;
  }

  .header-profile-popover .hero-name {
    font-size: 0.96rem !important;
  }

  .header-profile-popover .hero-title-badge {
    font-size: 0.65rem !important;
    padding: 2px 6px !important;
  }

  .header-profile-popover .popover-stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .header-profile-popover .popover-stats-grid .stat-cell {
    padding: 4px 2px !important;
  }

  .header-profile-popover .popover-stats-grid .stat-cell-header {
    font-size: 0.60rem !important;
    gap: 2px !important;
  }

  .header-profile-popover .popover-stats-grid .val {
    font-size: 0.76rem !important;
  }

  .header-profile-popover .popover-actions-grid,
  .header-profile-popover .popover-nav-row {
    gap: 4px !important;
  }

  .header-profile-popover .popover-tile {
    min-height: 48px !important;
    padding: 5px 2px !important;
    border-radius: 9px !important;
    min-width: 0 !important;
  }

  .header-profile-popover .popover-tile-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .header-profile-popover .popover-tile-label {
    font-size: 0.64rem !important;
  }

  .header-profile-popover .popover-logout-btn {
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: 0.76rem !important;
  }

  .header-profile-popover #btn-popover-expand-card,
  .header-profile-popover .popover-expand-card-btn,
  .hero-section #btn-popover-expand-card {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 9px !important;
  }
}

/* Landscape Mode on Mobile Devices (Height <= 520px) */
@media (max-height: 520px) {
  .header-profile-popover {
    position: fixed !important;
    max-height: calc(100dvh - 14px) !important;
    top: 6px !important;
    padding: 8px 10px !important;
    gap: 5px !important;
  }

  .header-profile-popover .pcard.hero-card-compact {
    padding: 6px 10px !important;
    gap: 5px !important;
  }

  .header-profile-popover .hero-avatar-wrap,
  .header-profile-popover .hero-avatar {
    width: 58px !important;
    height: 64px !important;
    min-width: 58px !important;
    max-width: 58px !important;
  }

  .header-profile-popover .hero-avatar-icon,
  .header-profile-popover #hero-avatar-icon,
  .header-profile-popover #btn-edit-avatar-trigger .hero-avatar-icon,
  .header-profile-popover #btn-edit-avatar-trigger #hero-avatar-icon {
    width: 58px !important;
    height: 64px !important;
    max-width: 58px !important;
    max-height: 64px !important;
    font-size: 2.2rem !important;
  }

  .header-profile-popover .hero-avatar-icon svg,
  .header-profile-popover #hero-avatar-icon svg,
  .header-profile-popover .hero-avatar svg,
  .header-profile-popover #btn-edit-avatar-trigger svg {
    max-width: 60px !important;
    max-height: 68px !important;
  }

  .header-profile-popover #btn-popover-expand-card,
  .header-profile-popover .popover-expand-card-btn,
  .hero-section #btn-popover-expand-card {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
  }

  .header-profile-popover .popover-stats-grid .stat-cell {
    padding: 3px 2px !important;
  }

  .header-profile-popover .popover-tile {
    min-height: 40px !important;
    padding: 4px 2px !important;
    min-width: 0 !important;
  }

  .header-profile-popover .popover-tile-label {
    font-size: 0.64rem !important;
  }

  .header-profile-popover .popover-logout-btn {
    min-height: 30px !important;
    padding: 4px 10px !important;
    font-size: 0.74rem !important;
  }
}

/* Touch Devices (No sticky hover states) */
@media (hover: none) {
  .header-profile-popover .popover-tile:hover {
    transform: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  }

  .header-profile-popover .popover-expand-card-btn:hover,
  .header-profile-popover #btn-popover-expand-card:hover,
  .hero-section #btn-popover-expand-card:hover {
    transform: none !important;
  }

  .header-profile-popover .popover-logout-btn:hover {
    transform: none !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #f87171 !important;
    box-shadow: none !important;
  }
}

/* ⬡ Mobile Coins Visibility Guarantee in Header & Menu */
@media (max-width: 768px) {

  .mobile-stats-buttons,
  .app-header .mobile-stats-buttons,
  #mobile-stats-buttons {
    display: none !important;
  }

  #mobile-coins-btn-wrap {
    display: inline-flex;
    align-items: center !important;
  }

  #btn-mobile-coins.header-coins-btn-responsive {
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 36px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }

  #btn-mobile-coins .header-coins-val-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

.popover-stat-chip.coins-chip {
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fef08a !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* ─── Responsive Safeguard for Session Suspended Modal Button ─── */
#btn-resume-suspended-session,
#btn-inactivity-stay-active {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   KMKZ RULES & GUIDE SYSTEM (5 TABS, HIGH SIGNAL, ACCESSIBLE)
   ═══════════════════════════════════════════════════════════════════════════ */
.rules-tabs-nav {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 5px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  padding: 4px !important;
  margin-bottom: 12px !important;
}

@media (max-width: 580px) {
  .rules-tabs-nav {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
  }

  .rules-tab-btn {
    padding: 6px 3px !important;
    font-size: 0.70rem !important;
  }
}

@media (max-width: 380px) {
  .rules-tabs-nav {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.rules-tab-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  padding: 8px 4px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  text-align: center !important;
  line-height: 1.2 !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.rules-tab-btn:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.rules-tab-btn:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 1px !important;
}

.rules-tab-btn.active {
  background: rgba(56, 189, 248, 0.22) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.25) !important;
}

.rules-tab-panel {
  display: none !important;
  animation: rulesFadeIn 0.25s ease forwards !important;
}

.rules-tab-panel.active {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

@keyframes rulesFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Clear Visual Signals & Notices System (High Signal, Accessible) */
.rules-signal-banner {
  border-radius: 14px !important;
  padding: 12px 14px !important;
  display: flex !important;
  gap: 12px !important;
  align-items: flex-start !important;
  position: relative !important;
  overflow: hidden !important;
}

.rules-signal-banner.alert {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(185, 28, 28, 0.12) 100%) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.55) !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2) !important;
}

.rules-signal-banner.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(180, 83, 9, 0.1) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2) !important;
}

.rules-signal-banner.info {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.1) 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2) !important;
}

.rules-signal-banner.goal {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(217, 119, 6, 0.12) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.25) !important;
}

.rules-signal-banner.tip {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(21, 128, 61, 0.1) 100%) !important;
  border: 1.5px solid rgba(34, 197, 94, 0.5) !important;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2) !important;
}

.rules-signal-icon-box {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.35rem !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.rules-signal-banner.alert .rules-signal-icon-box {
  background: rgba(239, 68, 68, 0.35) !important;
  border: 1px solid rgba(239, 68, 68, 0.6) !important;
  color: #fee2e2 !important;
}

.rules-signal-banner.warning .rules-signal-icon-box {
  background: rgba(245, 158, 11, 0.35) !important;
  border: 1px solid rgba(245, 158, 11, 0.6) !important;
  color: #fef3c7 !important;
}

.rules-signal-banner.info .rules-signal-icon-box {
  background: rgba(56, 189, 248, 0.35) !important;
  border: 1px solid rgba(56, 189, 248, 0.6) !important;
  color: #e0f2fe !important;
}

.rules-signal-banner.goal .rules-signal-icon-box {
  background: rgba(251, 191, 36, 0.35) !important;
  border: 1px solid rgba(251, 191, 36, 0.6) !important;
  color: #fef08a !important;
}

.rules-signal-banner.tip .rules-signal-icon-box {
  background: rgba(34, 197, 94, 0.35) !important;
  border: 1px solid rgba(34, 197, 94, 0.6) !important;
  color: #dcfce7 !important;
}

.rules-signal-body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.rules-signal-badge {
  font-size: 0.70rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  margin-bottom: 2px !important;
}

.rules-signal-banner.alert .rules-signal-badge {
  color: #fca5a5 !important;
}

.rules-signal-banner.warning .rules-signal-badge {
  color: #fde68a !important;
}

.rules-signal-banner.info .rules-signal-badge {
  color: #7dd3fc !important;
}

.rules-signal-banner.goal .rules-signal-badge {
  color: #fde047 !important;
}

.rules-signal-banner.tip .rules-signal-badge {
  color: #86efac !important;
}

.rules-signal-title {
  font-size: 0.94rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  line-height: 1.25 !important;
}

.rules-signal-text {
  font-size: 0.82rem !important;
  color: #e2e8f0 !important;
  line-height: 1.4 !important;
}

.rules-signal-text strong {
  color: #ffffff !important;
}

/* Steps list inside Tab 1 */
.rules-steps-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.rules-step-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
}

.rules-step-num {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  border-radius: 8px !important;
  background: rgba(56, 189, 248, 0.2) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
  font-weight: 900 !important;
  font-size: 0.82rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.rules-step-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}

.rules-step-label {
  font-size: 0.84rem !important;
  color: #f1f5f9 !important;
  font-weight: 800 !important;
}

.rules-step-desc {
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
}

/* Compact Visual Rules System (High Signal, Low Text) */
.rules-quick-flow {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  flex-wrap: wrap !important;
}

.rules-flow-step {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
}

.rules-flow-arrow {
  color: #fbbf24 !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
}

.rules-recipe-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  transition: transform 0.15s ease, border-color 0.15s ease !important;
  flex-wrap: wrap !important;
}

.rules-recipe-card:hover {
  border-color: rgba(56, 189, 248, 0.4) !important;
  transform: translateY(-1px) !important;
}

.rules-recipe-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.rules-recipe-icon {
  font-size: 1.15rem !important;
  line-height: 1 !important;
}

.rules-recipe-title {
  font-weight: 800 !important;
  font-size: 0.86rem !important;
  color: #ffffff !important;
}

.rules-badge-pv {
  font-size: 0.70rem !important;
  font-weight: 900 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  background: rgba(251, 191, 36, 0.2) !important;
  color: #fde68a !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
}

.rules-recipe-chips {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
}

.rules-chip-res {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  padding: 3px 7px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.rules-chip-res.wood {
  background: rgba(34, 197, 94, 0.2) !important;
  border-color: rgba(34, 197, 94, 0.5) !important;
  color: #86efac !important;
}

.rules-chip-res.brick {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
}

.rules-chip-res.sheep {
  background: rgba(168, 85, 247, 0.2) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  color: #e9d5ff !important;
}

.rules-chip-res.wheat {
  background: rgba(234, 179, 8, 0.2) !important;
  border-color: rgba(234, 179, 8, 0.5) !important;
  color: #fde047 !important;
}

.rules-chip-res.ore {
  background: rgba(148, 163, 184, 0.2) !important;
  border-color: rgba(148, 163, 184, 0.5) !important;
  color: #e2e8f0 !important;
}

.rules-chip-plus {
  color: #64748b !important;
  font-weight: 900 !important;
  font-size: 0.72rem !important;
}

.rules-mini-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
}

@media (max-width: 520px) {
  .rules-mini-grid {
    grid-template-columns: 1fr !important;
  }
}

.rules-mini-card {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.rules-mini-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  color: #ffffff !important;
}

.rules-mini-card-desc {
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
}

.rules-modal-footer {
  display: flex !important;
  gap: 8px !important;
  margin-top: 14px !important;
  align-items: center !important;
}

.btn-launch-tutorial-banner {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}

.btn-launch-tutorial-banner:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45) !important;
}

.btn-rules-got-it {
  padding: 10px 16px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e2e8f0 !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-rules-got-it:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

/* Stylized Low-Profile Lobby Online Friends Rows */
.lobby-online-friend-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  background: linear-gradient(90deg, rgba(20, 29, 50, 0.55) 0%, rgba(15, 23, 42, 0.7) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  margin-bottom: 4px !important;
  min-height: 32px !important;
  height: 32px !important;
  box-sizing: border-box !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.lobby-online-friend-item:hover {
  background: linear-gradient(90deg, rgba(28, 42, 70, 0.78) 0%, rgba(18, 28, 48, 0.9) 100%) !important;
  border-color: rgba(56, 189, 248, 0.38) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(56, 189, 248, 0.06) !important;
  transform: translateX(2px) !important;
}

.lobby-online-friend-info {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.lobby-online-friend-avatar {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.lobby-online-friend-name {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 140px !important;
}

.btn-lobby-friend-invite {
  padding: 2px 9px !important;
  min-height: 24px !important;
  height: 24px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  font-family: 'Outfit', sans-serif !important;
  letter-spacing: 0.3px !important;
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1px solid rgba(56, 189, 248, 0.38) !important;
  color: #38bdf8 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease !important;
}

.btn-lobby-friend-invite:hover:not(:disabled) {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
  transform: scale(1.02) !important;
}

.btn-lobby-friend-invite:disabled {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
  color: #4ade80 !important;
  cursor: default !important;
  box-shadow: none !important;
  transform: none !important;
}

/* 2-Row Responsive Test Sandbox Header Overlay HUD */
.test-sandbox-header-overlay {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  right: 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  background: rgba(11, 19, 38, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 12px !important;
  padding: 5px 8px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5) !important;
  pointer-events: auto !important;
  z-index: 10 !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#test-sandbox-hud-bar {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.test-hud-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.test-hud-row .test-hud-live-pill {
  flex: 0 0 auto !important;
}

.test-hud-row .test-hud-chip {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  justify-content: center !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  font-size: 0.70rem !important;
  padding: 2.5px 6px !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   HIGH-DEFINITION PROFILE HEXAGON & FRAME SYSTEM (KMKZ V3)
   ══════════════════════════════════════════════════════════════════════════ */
.kmkz-profile-hex-svg {
  display: inline-block;
  vertical-align: middle;
  overflow: visible;
  shape-rendering: geometricPrecision;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kmkz-profile-hex-svg:hover {
  transform: scale(1.05);
}

/* Reset parent circular frames when wrapped in a custom hexagonal SVG */
.hero-avatar.is-hexagonal,
.modal-avatar-preview-circle.is-hexagonal,
.btn-header-profile-avatar.is-hexagonal,
.hero-avatar-wrap.is-hexagonal,
#hero-avatar-icon.is-hexagonal,
#btn-edit-avatar-trigger.is-hexagonal,
#avatar-modal-preview.is-hexagonal,
.stat-profile-avatar-wrap.is-hexagonal,
.hero-avatar:has(.kmkz-profile-hex-svg),
.hero-avatar-wrap:has(.kmkz-profile-hex-svg),
#hero-avatar-icon:has(.kmkz-profile-hex-svg),
.hero-avatar-icon:has(.kmkz-profile-hex-svg),
#btn-edit-avatar-trigger:has(.kmkz-profile-hex-svg),
.modal-avatar-preview-circle:has(.kmkz-profile-hex-svg) {
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* Dynamic Aura Animations */
@keyframes phxPulseRing {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.06);
    opacity: 0.9;
  }
}

.kmkz-profile-hex-svg.phx-animated .phx-pulse-ring {
  animation: phxPulseRing 2.4s ease-in-out infinite;
  transform-origin: 60px 69px;
}

/* Hex Customizer Frame Item Cards */
.hexframe-item-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hexframe-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.hexframe-item-card.active {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.16);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.35), inset 0 0 12px rgba(251, 191, 36, 0.1);
}

.hexframe-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hexframe-card-badge {
  font-size: 0.7rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid currentColor;
  text-transform: uppercase;
}

.hexframe-card-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.hexframe-card-title {
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 2px;
}

.hexframe-card-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* Hex Customizer Aura Item Cards */
.hexframe-aura-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hexframe-aura-card:hover {
  transform: translateY(-1.5px);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(30, 41, 59, 0.9);
}

.hexframe-aura-card.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.16);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35), inset 0 0 10px rgba(56, 189, 248, 0.1);
}

.aura-card-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #f1f5f9;
}

.aura-card-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* Color Accent Swatches */
.hexframe-color-chip {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
  outline: none;
}

.hexframe-color-chip:hover {
  transform: scale(1.18);
  border-color: #ffffff;
}

.hexframe-color-chip.active {
  border-color: #ffffff;
  transform: scale(1.22);
  box-shadow: 0 0 14px currentColor, 0 0 0 2px #0f172a;
}

/* ─── Touch Target Ergonomics (WCAG 2.5.5 / 2.5.8 / Mobile Standards >= 44x44px) ─── */
.btn-close-modal,
.btn-close-hud,
.popup-btn-close,
.modal-close-btn,
.close-modal-btn,
.btn-close,
.modal-close,
.bp-btn-close-modal,
.pending-close-btn,
.btn-dice-order-minimize,
.btn-dice-order-toggle-expand,
.color-swatch-btn,
.hexframe-color-chip {
  min-width: 44px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ─── 3D Falling Dice Animation (Desactivado en el centro del tablero para mantenerse exclusivamente en el HUD inferior) ─── */
.falling-dice-overlay {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.falling-dice-overlay.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.falling-dice-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
}

.falling-dice-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  perspective: 700px;
}

.falling-die-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.falling-die-num-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(10, 15, 30, 0.95);
  border: 2px solid #fbbf24;
  color: #fef08a;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75), 0 0 10px rgba(251, 191, 36, 0.5);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.3);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.falling-die-wrap.show-badge .falling-die-num-badge {
  opacity: 1;
  transform: scale(1);
}

.falling-die.die {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  min-height: 76px !important;
  border-radius: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform-style: preserve-3d !important;
  position: relative !important;
  will-change: transform, opacity !important;
  box-sizing: border-box !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), inset 0 2px 4px rgba(255, 255, 255, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.35) !important;
}

/* Default Ivory Skin Fallback */
.falling-die.die.skin-dice_default,
.falling-die.die.skin-default,
.falling-dice-tray.skin-dice_default .falling-die.die,
.falling-dice-tray.skin-default .falling-die.die {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f1f5f9 65%, #cbd5e1 100%) !important;
  border: 2.5px solid rgba(255, 255, 255, 0.95) !important;
  color: #dc2626 !important;
}
.falling-die.skin-dice_default .die-pip,
.falling-die.skin-default .die-pip,
.falling-dice-tray.skin-dice_default .die-pip,
.falling-dice-tray.skin-default .die-pip {
  background: #0f172a !important;
}
.falling-die.skin-dice_default[data-val="1"] .die-pip.pip-center,
.falling-die.skin-default[data-val="1"] .die-pip.pip-center,
.falling-dice-tray.skin-dice_default .falling-die[data-val="1"] .die-pip.pip-center,
.falling-dice-tray.skin-default .falling-die[data-val="1"] .die-pip.pip-center {
  background: #dc2626 !important;
  box-shadow: inset 0 1.5px 2px rgba(185, 28, 28, 0.6), 0 0 8px rgba(220, 38, 38, 0.6) !important;
}

/* ─── Equipped Custom Skins for 3D Falling Dice ─── */
/* Ruby */
.falling-die.die.skin-dice_ruby, .falling-die.die.skin-ruby,
.falling-die.die.skin-dice_red, .falling-die.die.skin-red {
  background: linear-gradient(145deg, #ef4444 0%, #991b1b 100%) !important;
  border: 2.5px solid #fca5a5 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(239, 68, 68, 0.8), inset 0 2px 4px rgba(254, 202, 202, 0.7) !important;
}
.falling-die.die.skin-dice_ruby .die-pip, .falling-die.die.skin-ruby .die-pip,
.falling-die.die.skin-dice_red .die-pip, .falling-die.die.skin-red .die-pip {
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px rgba(255, 255, 255, 0.8) !important;
}
.falling-die.die.skin-dice_ruby[data-val="1"] .die-pip.pip-center,
.falling-die.die.skin-ruby[data-val="1"] .die-pip.pip-center {
  background: #fbbf24 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 8px #f59e0b !important;
}

/* Sapphire */
.falling-die.die.skin-dice_sapphire, .falling-die.die.skin-sapphire,
.falling-die.die.skin-dice_blue, .falling-die.die.skin-blue {
  background: linear-gradient(145deg, #0284c7 0%, #0369a1 50%, #0c4a6e 100%) !important;
  border: 2.5px solid #7dd3fc !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(2, 132, 199, 0.8), inset 0 2px 4px rgba(186, 230, 253, 0.8) !important;
}
.falling-die.die.skin-dice_sapphire .die-pip, .falling-die.die.skin-sapphire .die-pip,
.falling-die.die.skin-dice_blue .die-pip, .falling-die.die.skin-blue .die-pip {
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px #7dd3fc !important;
}

/* Emerald */
.falling-die.die.skin-dice_emerald, .falling-die.die.skin-emerald,
.falling-die.die.skin-dice_green, .falling-die.die.skin-green {
  background: linear-gradient(145deg, #10b981 0%, #047857 50%, #064e3b 100%) !important;
  border: 2.5px solid #6ee7b7 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(16, 185, 129, 0.8), inset 0 2px 4px rgba(167, 243, 208, 0.8) !important;
}
.falling-die.die.skin-dice_emerald .die-pip, .falling-die.die.skin-emerald .die-pip,
.falling-die.die.skin-dice_green .die-pip, .falling-die.die.skin-green .die-pip {
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px #6ee7b7 !important;
}

/* Amber */
.falling-die.die.skin-dice_amber, .falling-die.die.skin-amber,
.falling-die.die.skin-dice_orange, .falling-die.die.skin-orange {
  background: linear-gradient(145deg, #f97316 0%, #ea580c 50%, #7c2d12 100%) !important;
  border: 2.5px solid #fdba74 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(249, 115, 22, 0.8), inset 0 2px 4px rgba(254, 215, 170, 0.8) !important;
}
.falling-die.die.skin-dice_amber .die-pip, .falling-die.die.skin-amber .die-pip,
.falling-die.die.skin-dice_orange .die-pip, .falling-die.die.skin-orange .die-pip {
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px #fdba74 !important;
}

/* Amethyst */
.falling-die.die.skin-dice_amethyst, .falling-die.die.skin-amethyst,
.falling-die.die.skin-dice_purple, .falling-die.die.skin-purple {
  background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 50%, #4c1d95 100%) !important;
  border: 2.5px solid #c4b5fd !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(139, 92, 246, 0.8), inset 0 2px 4px rgba(221, 214, 254, 0.8) !important;
}
.falling-die.die.skin-dice_amethyst .die-pip, .falling-die.die.skin-amethyst .die-pip,
.falling-die.die.skin-dice_purple .die-pip, .falling-die.die.skin-purple .die-pip {
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px #c4b5fd !important;
}

/* Gold */
.falling-die.die.skin-dice_gold, .falling-die.die.skin-gold {
  background: linear-gradient(145deg, #fbbf24 0%, #d97706 50%, #b45309 100%) !important;
  border: 2.5px solid #fef08a !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(251, 191, 36, 0.85), inset 0 2px 4px rgba(254, 240, 138, 0.9) !important;
}
.falling-die.die.skin-dice_gold .die-pip, .falling-die.die.skin-gold .die-pip {
  background: #451a03 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0.5px 1px rgba(255, 255, 255, 0.7) !important;
}

/* Obsidian */
.falling-die.die.skin-dice_obsidian, .falling-die.die.skin-obsidian,
.falling-die.die.skin-dice_black, .falling-die.die.skin-black {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border: 2.5px solid #64748b !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.75), 0 0 20px rgba(239, 68, 68, 0.55), inset 0 2px 4px rgba(148, 163, 184, 0.6) !important;
}
.falling-die.die.skin-dice_obsidian .die-pip, .falling-die.die.skin-obsidian .die-pip,
.falling-die.die.skin-dice_black .die-pip, .falling-die.die.skin-black .die-pip {
  background: #ef4444 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 8px #dc2626 !important;
}

/* Fire */
.falling-die.die.skin-dice_fire, .falling-die.die.skin-fire {
  background: linear-gradient(145deg, #f97316 0%, #c2410c 100%) !important;
  border: 2.5px solid #fed7aa !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 26px rgba(249, 115, 22, 0.9), inset 0 2px 4px rgba(253, 230, 138, 0.8) !important;
}
.falling-die.die.skin-dice_fire .die-pip, .falling-die.die.skin-fire .die-pip {
  background: #fff7ed !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 8px #f59e0b !important;
}

/* Neon */
.falling-die.die.skin-dice_neon, .falling-die.die.skin-neon {
  background: linear-gradient(145deg, #06b6d4 0%, #4f46e5 100%) !important;
  border: 2.5px solid #67e8f9 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 26px rgba(6, 182, 212, 0.9), inset 0 2px 4px rgba(165, 243, 252, 0.8) !important;
}
.falling-die.die.skin-dice_neon .die-pip, .falling-die.die.skin-neon .die-pip {
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 8px #22d3ee !important;
}

/* Cosmic */
.falling-die.die.skin-dice_cosmic, .falling-die.die.skin-cosmic {
  background: linear-gradient(145deg, #a855f7 0%, #3b0764 100%) !important;
  border: 2.5px solid #e9d5ff !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 26px rgba(168, 85, 247, 0.9), inset 0 2px 4px rgba(233, 213, 255, 0.8) !important;
}
.falling-die.die.skin-dice_cosmic .die-pip, .falling-die.die.skin-cosmic .die-pip {
  background: #faf5ff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 8px #c084fc !important;
}

/* Diamond */
.falling-die.die.skin-dice_diamond, .falling-die.die.skin-diamond {
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 30%, #fdf4ff 60%, #e2e8f0 100%) !important;
  border: 2.5px solid #ffffff !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 255, 255, 0.95), inset 0 2px 4px rgba(255, 255, 255, 1) !important;
}
.falling-die.die.skin-dice_diamond .die-pip, .falling-die.die.skin-diamond .die-pip {
  background: #0f172a !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0.5px 1px rgba(255, 255, 255, 0.7) !important;
}

/* Rainbow */
.falling-die.die.skin-dice_rainbow, .falling-die.die.skin-rainbow {
  background: linear-gradient(135deg, #ef4444, #f59e0b, #10b981, #06b6d4, #8b5cf6, #ec4899, #ef4444) !important;
  background-size: 300% 300% !important;
  border: 2.5px solid #ffffff !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 26px rgba(236, 72, 153, 0.9), inset 0 2px 4px rgba(255, 255, 255, 0.9) !important;
  animation: rainbowDiceShift 3.5s ease infinite !important;
}
.falling-die.die.skin-dice_rainbow .die-pip, .falling-die.die.skin-rainbow .die-pip {
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 6px #ffffff !important;
}

/* Cyan / Glaciar Ice */
.falling-die.die.skin-dice_cyan, .falling-die.die.skin-cyan,
.falling-die.die.skin-dice_ice, .falling-die.die.skin-ice {
  background: linear-gradient(145deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%) !important;
  border: 2.5px solid #bae6fd !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(56, 189, 248, 0.85), inset 0 2px 4px rgba(224, 242, 254, 0.85) !important;
}
.falling-die.die.skin-dice_cyan .die-pip, .falling-die.die.skin-cyan .die-pip,
.falling-die.die.skin-dice_ice .die-pip, .falling-die.die.skin-ice .die-pip {
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px #bae6fd !important;
}

/* Sakura Pink */
.falling-die.die.skin-dice_sakura, .falling-die.die.skin-sakura,
.falling-die.die.skin-dice_pink, .falling-die.die.skin-pink {
  background: linear-gradient(145deg, #ec4899 0%, #be185d 50%, #831843 100%) !important;
  border: 2.5px solid #fbcfe8 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(236, 72, 153, 0.85), inset 0 2px 4px rgba(251, 207, 232, 0.8) !important;
}
.falling-die.die.skin-dice_sakura .die-pip, .falling-die.die.skin-sakura .die-pip,
.falling-die.die.skin-dice_pink .die-pip, .falling-die.die.skin-pink .die-pip {
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px #fbcfe8 !important;
}

/* Topaz */
.falling-die.die.skin-dice_topaz, .falling-die.die.skin-topaz,
.falling-die.die.skin-dice_yellow, .falling-die.die.skin-yellow {
  background: linear-gradient(145deg, #eab308 0%, #ca8a04 50%, #713f12 100%) !important;
  border: 2.5px solid #fef08a !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(234, 179, 8, 0.85), inset 0 2px 4px rgba(254, 240, 138, 0.85) !important;
}
.falling-die.die.skin-dice_topaz .die-pip, .falling-die.die.skin-topaz .die-pip,
.falling-die.die.skin-dice_yellow .die-pip, .falling-die.die.skin-yellow .die-pip {
  background: #451a03 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0.5px 1px rgba(255, 255, 255, 0.7) !important;
}

/* Copper */
.falling-die.die.skin-dice_copper, .falling-die.die.skin-copper {
  background: linear-gradient(145deg, #f59e0b 0%, #d97706 25%, #b45309 55%, #78350f 85%, #451a03 100%) !important;
  border: 2.5px solid #fdba74 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 22px rgba(217, 119, 6, 0.8), inset 0 2px 4px rgba(254, 215, 170, 0.8) !important;
}
.falling-die.die.skin-dice_copper .die-pip, .falling-die.die.skin-copper .die-pip {
  background: #ffedd5 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px #fdba74 !important;
}

/* Frostbite */
.falling-die.die.skin-dice_frostbite, .falling-die.die.skin-frostbite {
  background: linear-gradient(145deg, #0ea5e9 0%, #0369a1 40%, #0f172a 100%) !important;
  border: 2.5px solid #7dd3fc !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(14, 165, 233, 0.85), inset 0 2px 4px rgba(186, 230, 253, 0.8) !important;
}
.falling-die.die.skin-dice_frostbite .die-pip, .falling-die.die.skin-frostbite .die-pip {
  background: #e0f2fe !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px #38bdf8 !important;
}

/* Onyx Gold */
.falling-die.die.skin-dice_onyx_gold, .falling-die.die.skin-onyx_gold {
  background: linear-gradient(145deg, #0f172a 0%, #020617 100%) !important;
  border: 2.5px solid #fbbf24 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.75), 0 0 24px rgba(251, 191, 36, 0.75), inset 0 2px 4px rgba(254, 240, 138, 0.8) !important;
}
.falling-die.die.skin-dice_onyx_gold .die-pip, .falling-die.die.skin-onyx_gold .die-pip {
  background: #fef08a !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px #eab308 !important;
}

/* Pioneer Founder */
.falling-die.die.skin-dice_pioneer_founder, .falling-die.die.skin-pioneer_founder {
  background: linear-gradient(135deg, #fff7c2 0%, #ffd700 18%, #b8860b 45%, #7a5806 80%, #3d2a00 100%) !important;
  border: 2.5px solid #fff5a6 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 26px rgba(255, 215, 0, 0.9), inset 0 2px 4px rgba(255, 245, 166, 0.9) !important;
}
.falling-die.die.skin-dice_pioneer_founder .die-pip, .falling-die.die.skin-pioneer_founder .die-pip {
  background: radial-gradient(circle at 35% 35%, #1e293b 0%, #090d16 80%) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 245, 166, 0.9) !important;
}

/* Bicolor Skins (Dual Separate Cubes: Die 1 = Color A, Die 2 = Color B) */
/* 1. Fire & Ice */
.falling-dice-tray.skin-dice_bicolor_fire_ice #falling-die-1,
.falling-dice-tray.skin-bicolor_fire_ice #falling-die-1,
.falling-die.die.skin-dice_bicolor_fire_ice:first-of-type,
.falling-die.die.skin-bicolor_fire_ice:first-of-type {
  background: linear-gradient(145deg, #fbbf24 0%, #f97316 45%, #dc2626 100%) !important;
  border: 2.5px solid #fef08a !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(249, 115, 22, 0.85), inset 0 2px 4px rgba(254, 240, 138, 0.7) !important;
}
.falling-dice-tray.skin-dice_bicolor_fire_ice #falling-die-2,
.falling-dice-tray.skin-bicolor_fire_ice #falling-die-2,
.falling-die.die.skin-dice_bicolor_fire_ice:last-of-type,
.falling-die.die.skin-bicolor_fire_ice:last-of-type {
  background: linear-gradient(145deg, #7dd3fc 0%, #0284c7 45%, #0c4a6e 100%) !important;
  border: 2.5px solid #bae6fd !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(56, 189, 248, 0.85), inset 0 2px 4px rgba(186, 230, 253, 0.7) !important;
}

/* 2. Black & Gold */
.falling-dice-tray.skin-dice_bicolor_black_gold #falling-die-1,
.falling-dice-tray.skin-bicolor_black_gold #falling-die-1,
.falling-die.die.skin-dice_bicolor_black_gold:first-of-type,
.falling-die.die.skin-bicolor_black_gold:first-of-type {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border: 2.5px solid #fbbf24 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(251, 191, 36, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.9) !important;
}
.falling-dice-tray.skin-dice_bicolor_black_gold #falling-die-2,
.falling-dice-tray.skin-bicolor_black_gold #falling-die-2,
.falling-die.die.skin-dice_bicolor_black_gold:last-of-type,
.falling-die.die.skin-bicolor_black_gold:last-of-type {
  background: linear-gradient(145deg, #fef08a 0%, #f59e0b 50%, #b45309 100%) !important;
  border: 2.5px solid #fef08a !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(245, 158, 11, 0.85), inset 0 2px 4px rgba(254, 240, 138, 0.7) !important;
}

/* 3. Cyberpunk Neon */
.falling-dice-tray.skin-dice_bicolor_cyber_neon #falling-die-1,
.falling-dice-tray.skin-bicolor_cyber_neon #falling-die-1,
.falling-die.die.skin-dice_bicolor_cyber_neon:first-of-type,
.falling-die.die.skin-bicolor_cyber_neon:first-of-type {
  background: linear-gradient(145deg, #00f3ff 0%, #0891b2 50%, #083344 100%) !important;
  border: 2.5px solid #00f3ff !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 243, 255, 0.9), inset 0 2px 4px rgba(0, 243, 255, 0.5) !important;
}
.falling-dice-tray.skin-dice_bicolor_cyber_neon #falling-die-2,
.falling-dice-tray.skin-bicolor_cyber_neon #falling-die-2,
.falling-die.die.skin-dice_bicolor_cyber_neon:last-of-type,
.falling-die.die.skin-bicolor_cyber_neon:last-of-type {
  background: linear-gradient(145deg, #f472b6 0%, #ec4899 45%, #831843 100%) !important;
  border: 2.5px solid #f472b6 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(236, 72, 153, 0.9), inset 0 2px 4px rgba(236, 72, 153, 0.5) !important;
}

/* 4. Emerald & Gold */
.falling-dice-tray.skin-dice_bicolor_emerald_gold #falling-die-1,
.falling-dice-tray.skin-bicolor_emerald_gold #falling-die-1,
.falling-die.die.skin-dice_bicolor_emerald_gold:first-of-type,
.falling-die.die.skin-bicolor_emerald_gold:first-of-type {
  background: linear-gradient(145deg, #34d399 0%, #10b981 45%, #064e3b 100%) !important;
  border: 2.5px solid #6ee7b7 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(16, 185, 129, 0.85), inset 0 2px 4px rgba(167, 243, 208, 0.7) !important;
}
.falling-dice-tray.skin-dice_bicolor_emerald_gold #falling-die-2,
.falling-dice-tray.skin-bicolor_emerald_gold #falling-die-2,
.falling-die.die.skin-dice_bicolor_emerald_gold:last-of-type,
.falling-die.die.skin-bicolor_emerald_gold:last-of-type {
  background: linear-gradient(145deg, #fef08a 0%, #eab308 50%, #854d0e 100%) !important;
  border: 2.5px solid #fef08a !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(234, 179, 8, 0.85), inset 0 2px 4px rgba(254, 240, 138, 0.7) !important;
}

/* 5. Twilight */
.falling-dice-tray.skin-dice_bicolor_twilight #falling-die-1,
.falling-dice-tray.skin-bicolor_twilight #falling-die-1,
.falling-die.die.skin-dice_bicolor_twilight:first-of-type,
.falling-die.die.skin-bicolor_twilight:first-of-type {
  background: linear-gradient(145deg, #c084fc 0%, #7c3aed 50%, #3b0764 100%) !important;
  border: 2.5px solid #c084fc !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(124, 58, 237, 0.85), inset 0 2px 4px rgba(233, 213, 255, 0.7) !important;
}
.falling-dice-tray.skin-dice_bicolor_twilight #falling-die-2,
.falling-dice-tray.skin-bicolor_twilight #falling-die-2,
.falling-die.die.skin-dice_bicolor_twilight:last-of-type,
.falling-die.die.skin-bicolor_twilight:last-of-type {
  background: linear-gradient(145deg, #fbbf24 0%, #ea580c 50%, #7c2d12 100%) !important;
  border: 2.5px solid #fdba74 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(234, 88, 12, 0.85), inset 0 2px 4px rgba(254, 215, 170, 0.7) !important;
}

/* 6. Yin Yang */
.falling-dice-tray.skin-dice_bicolor_yinyang #falling-die-1,
.falling-dice-tray.skin-bicolor_yinyang #falling-die-1,
.falling-die.die.skin-dice_bicolor_yinyang:first-of-type,
.falling-die.die.skin-bicolor_yinyang:first-of-type {
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 60%, #cbd5e1 100%) !important;
  border: 2.5px solid #94a3b8 !important;
  color: #020617 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(255, 255, 255, 0.8), inset 0 2px 4px rgba(255, 255, 255, 1) !important;
}
.falling-dice-tray.skin-dice_bicolor_yinyang #falling-die-2,
.falling-dice-tray.skin-bicolor_yinyang #falling-die-2,
.falling-die.die.skin-dice_bicolor_yinyang:last-of-type,
.falling-die.die.skin-bicolor_yinyang:last-of-type {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 60%, #020617 100%) !important;
  border: 2.5px solid #64748b !important;
  color: #ffffff !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 0, 0, 0.9), inset 0 2px 4px rgba(255, 255, 255, 0.15) !important;
}

/* 7. Blood & Void */
.falling-dice-tray.skin-dice_bicolor_blood_void #falling-die-1,
.falling-dice-tray.skin-bicolor_blood_void #falling-die-1,
.falling-die.die.skin-dice_bicolor_blood_void:first-of-type,
.falling-die.die.skin-bicolor_blood_void:first-of-type {
  background: linear-gradient(145deg, #f87171 0%, #dc2626 45%, #7f1d1d 100%) !important;
  border: 2.5px solid #f87171 !important;
  color: #fee2e2 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(239, 68, 68, 0.85), inset 0 2px 4px rgba(254, 202, 202, 0.7) !important;
}
.falling-dice-tray.skin-dice_bicolor_blood_void #falling-die-2,
.falling-dice-tray.skin-bicolor_blood_void #falling-die-2,
.falling-die.die.skin-dice_bicolor_blood_void:last-of-type,
.falling-die.die.skin-bicolor_blood_void:last-of-type {
  background: linear-gradient(145deg, #090d16 0%, #020617 60%, #000000 100%) !important;
  border: 2.5px solid #6366f1 !important;
  color: #c7d2fe !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(99, 102, 241, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.95) !important;
}

/* ─── Pips 3x3 CSS Grid System ─── */
.falling-die .die-inner.die-pips-face {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-template-rows: repeat(3, 1fr) !important;
  width: 100% !important;
  height: 100% !important;
  padding: 14% !important;
  box-sizing: border-box !important;
  place-items: center !important;
}

.falling-die .die-pip {
  position: static !important;
  width: 13.5px !important;
  height: 13.5px !important;
  max-width: 85% !important;
  max-height: 85% !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  transform: none !important;
  margin: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.65), 0 0.5px 1px rgba(255, 255, 255, 0.45) !important;
}

.falling-die .die-pip.pip-top-left { grid-area: 1 / 1 !important; }
.falling-die .die-pip.pip-top-right { grid-area: 1 / 3 !important; }
.falling-die .die-pip.pip-mid-left { grid-area: 2 / 1 !important; }
.falling-die .die-pip.pip-center { grid-area: 2 / 2 !important; }
.falling-die .die-pip.pip-mid-right { grid-area: 2 / 3 !important; }
.falling-die .die-pip.pip-bottom-left { grid-area: 3 / 1 !important; }
.falling-die .die-pip.pip-bottom-right { grid-area: 3 / 3 !important; }

/* Face 1: Large Center Pip */
.falling-die[data-val="1"] .die-pip.pip-center {
  width: 19px !important;
  height: 19px !important;
}

/* Fall Animation for Die 1 */
.falling-die-wrap:first-child .falling-die.animating-fall {
  animation: kmkzFallDie1 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

/* Fall Animation for Die 2 */
.falling-die-wrap:last-child .falling-die.animating-fall {
  animation: kmkzFallDie2 0.76s cubic-bezier(0.2, 1, 0.32, 1) forwards !important;
}

@keyframes kmkzFallDie1 {
  0% {
    transform: translateY(-380px) rotateX(720deg) rotateY(360deg) rotateZ(180deg) scale(0.5);
    opacity: 0.15;
  }
  35% {
    opacity: 1;
  }
  65% {
    transform: translateY(12px) rotateX(15deg) rotateY(-10deg) rotateZ(8deg) scale(1.18);
  }
  80% {
    transform: translateY(-16px) rotateX(-8deg) rotateY(6deg) rotateZ(-4deg) scale(0.96);
  }
  92% {
    transform: translateY(4px) rotateX(3deg) rotateY(-2deg) rotateZ(2deg) scale(1.02);
  }
  100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
  }
}

@keyframes kmkzFallDie2 {
  0% {
    transform: translateY(-420px) rotateX(-540deg) rotateY(-480deg) rotateZ(-210deg) scale(0.5);
    opacity: 0.15;
  }
  35% {
    opacity: 1;
  }
  65% {
    transform: translateY(14px) rotateX(-18deg) rotateY(14deg) rotateZ(-10deg) scale(1.2);
  }
  80% {
    transform: translateY(-18px) rotateX(10deg) rotateY(-8deg) rotateZ(5deg) scale(0.95);
  }
  92% {
    transform: translateY(5px) rotateX(-4deg) rotateY(3deg) rotateZ(-2deg) scale(1.03);
  }
  100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
  }
}

/* Dynamic Ground Shadow Expanding with Fall */
.falling-die-shadow {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 18px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 72%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

.animating-fall ~ .falling-die-shadow {
  animation: kmkzFallShadow 0.74s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes kmkzFallShadow {
  0% { transform: translateX(-50%) scale(0.2); opacity: 0; }
  65% { transform: translateX(-50%) scale(1.35); opacity: 0.85; }
  80% { transform: translateX(-50%) scale(0.85); opacity: 0.45; }
  100% { transform: translateX(-50%) scale(1); opacity: 0.65; }
}

/* Result Sum Pill floating below fallen dice */
.falling-dice-result-pill {
  margin-top: 22px;
  padding: 7px 24px;
  border-radius: 24px;
  background: rgba(10, 15, 30, 0.95);
  border: 1.8px solid rgba(251, 191, 36, 0.95);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.75), 0 0 18px rgba(251, 191, 36, 0.45);
  color: #fef08a;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: kmkzPillPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.falling-dice-result-pill.hidden {
  display: none !important;
}

.falling-dice-result-pill .falling-dice-formula {
  color: #cbd5e1;
  font-weight: 700;
  font-size: 1.15rem;
}

.falling-dice-result-pill .falling-dice-sum {
  color: #fef08a;
  font-weight: 900;
  font-size: 1.45rem;
}

.falling-dice-result-pill .falling-dice-robber-tag {
  background: #dc2626;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 4px;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.7);
}

.falling-dice-result-pill.seven-danger {
  border-color: rgba(239, 68, 68, 0.95);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.75), 0 0 22px rgba(239, 68, 68, 0.65);
}

.falling-dice-result-pill.seven-danger .falling-dice-formula {
  color: #fca5a5;
}

.falling-dice-result-pill.seven-danger .falling-dice-sum {
  color: #fee2e2;
  text-shadow: 0 0 8px #ef4444;
}

@keyframes kmkzPillPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   💬 KMKZ DIRECT MESSAGES (DM CHAT MODAL) - MODERN GLASSMORPHIC SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

#dm-chat-overlay {
  z-index: 10005 !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  background: rgba(4, 7, 15, 0.78) !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: center !important;
}

#dm-chat-overlay .overlay-content.dm-chat-card {
  width: 100% !important;
  max-width: min(calc(100vw - 20px), 440px) !important;
  max-height: calc(100dvh - 24px) !important;
  background: linear-gradient(175deg, rgba(17, 24, 39, 0.98) 0%, rgba(10, 15, 29, 0.99) 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  border-top: 1.5px solid rgba(216, 180, 254, 0.5) !important;
  border-radius: 20px !important;
  padding: 14px 16px !important;
  box-shadow: 
    0 24px 60px -8px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(168, 85, 247, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow: hidden !important;
  margin: auto !important;
  animation: dmModalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes dmModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Header */
.dm-chat-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.dm-recipient-block {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

.dm-recipient-avatar-wrap {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  flex-shrink: 0 !important;
}

.dm-recipient-avatar-wrap svg {
  width: 32px !important;
  height: 32px !important;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5)) !important;
}

.dm-recipient-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  gap: 1px !important;
}

.dm-recipient-name {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100% !important;
  max-width: 100% !important;
  letter-spacing: 0.2px !important;
  line-height: 1.2 !important;
}

.dm-recipient-status {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100% !important;
  max-width: 100% !important;
}

.dm-status-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6) !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.dm-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

/* Match Invite Action Button in Header */
.btn-dm-match-invite {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 10px !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  font-family: 'Outfit', sans-serif !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(99, 102, 241, 0.35) 100%) !important;
  border: 1px solid rgba(192, 132, 252, 0.45) !important;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  color: #f3e8ff !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease !important;
  user-select: none !important;
  outline: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.btn-dm-match-invite:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.5) 0%, rgba(99, 102, 241, 0.55) 100%) !important;
  border-color: #c084fc !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px) scale(1.02) !important;
}

.btn-dm-match-invite:active:not(:disabled) {
  transform: translateY(0) scale(0.97) !important;
}

.btn-dm-match-invite:focus-visible {
  outline: 2px solid #c084fc !important;
  outline-offset: 2px !important;
}

.btn-dm-match-invite .btn-dm-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #c084fc !important;
}

/* Close Button in Header */
.btn-close-dm-modal {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
  padding: 0 !important;
  outline: none !important;
  flex-shrink: 0 !important;
}

.btn-close-dm-modal:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #ffffff !important;
  transform: scale(1.06) !important;
}

.btn-close-dm-modal:active {
  transform: scale(0.94) !important;
}

.btn-close-dm-modal:focus-visible {
  outline: 2px solid #ef4444 !important;
  outline-offset: 2px !important;
}

/* Messages Container */
.dm-messages-container {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 140px !important;
  max-height: min(340px, 48dvh) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 10px 8px !important;
  background: rgba(9, 14, 26, 0.75) !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45) !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(168, 85, 247, 0.35) transparent !important;
}

.dm-messages-container::-webkit-scrollbar {
  width: 4px !important;
}

.dm-messages-container::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35) !important;
  border-radius: 4px !important;
}

/* Match Invite Card inside Chat */
.dm-match-invite-card {
  margin-top: 8px !important;
  padding: 10px 12px !important;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(20, 15, 36, 0.95) 100%) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.45) !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.dm-match-card-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

.dm-match-card-title {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-weight: 800 !important;
  color: #f3e8ff !important;
  font-size: 0.82rem !important;
  font-family: 'JetBrains Mono', monospace !important;
}

.dm-match-mode-badge {
  font-size: 0.66rem !important;
  background: rgba(168, 85, 247, 0.22) !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
  color: #c084fc !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

/* Action button inside match card */
.btn-dm-card-action {
  width: 100% !important;
  padding: 8px 12px !important;
  font-size: 0.80rem !important;
  font-weight: 800 !important;
  font-family: 'Outfit', sans-serif !important;
  border-radius: 9px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  outline: none !important;
  border: none !important;
  user-select: none !important;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
}

.btn-dm-card-action:hover {
  transform: translateY(-1px) scale(1.02) !important;
}

.btn-dm-card-action:active {
  transform: translateY(0) scale(0.97) !important;
}

.btn-dm-card-action.btn-dm-join {
  background: linear-gradient(135deg, #059669 0%, #0284c7 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.5) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35) !important;
}

.btn-dm-card-action.btn-dm-join:hover {
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.5) !important;
}

.btn-dm-card-action.btn-dm-enter-room {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.5) 0%, rgba(56, 189, 248, 0.45) 100%) !important;
  border: 1.5px solid rgba(192, 132, 252, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.35) !important;
}

.btn-dm-card-action.btn-dm-enter-room:hover {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.7) 0%, rgba(56, 189, 248, 0.65) 100%) !important;
  border-color: #d8b4fe !important;
  box-shadow: 0 6px 18px rgba(147, 51, 234, 0.5) !important;
}

.dm-match-card-host-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}

.dm-match-waiting-indicator {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 0.72rem !important;
  color: #c4b5fd !important;
  font-weight: 600 !important;
  text-align: center !important;
}

.dm-pulse-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #a855f7 !important;
  box-shadow: 0 0 6px #a855f7 !important;
  animation: dmPulse 1.8s infinite ease-in-out !important;
}

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

/* Input Row */
.dm-input-row {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.dm-input-field {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  padding: 9px 12px !important;
  font-size: 0.85rem !important;
  font-family: inherit !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.dm-input-field:focus {
  border-color: #c084fc !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.28) !important;
}

.btn-dm-send {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 9px 14px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  font-family: 'Outfit', sans-serif !important;
  background: linear-gradient(135deg, #9333ea 0%, #6366f1 100%) !important;
  border: 1px solid rgba(216, 180, 254, 0.4) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  user-select: none !important;
  box-shadow: 0 3px 10px rgba(147, 51, 234, 0.35) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
  flex-shrink: 0 !important;
}

.btn-dm-send:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 16px rgba(147, 51, 234, 0.5) !important;
}

.btn-dm-send:active {
  transform: translateY(0) scale(0.97) !important;
}

/* DM Chat Responsive Adaptations */
@media (max-width: 440px) {
  #dm-chat-overlay .overlay-content.dm-chat-card {
    padding: 12px 12px !important;
    gap: 8px !important;
    border-radius: 18px !important;
  }

  .dm-chat-header {
    padding-bottom: 8px !important;
  }

  .dm-recipient-avatar-wrap {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .dm-recipient-avatar-wrap svg {
    width: 30px !important;
    height: 30px !important;
  }

  .dm-recipient-name {
    font-size: 0.94rem !important;
  }

  .btn-dm-match-invite {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    border-radius: 9px !important;
  }

  .btn-dm-match-invite .btn-dm-match-text,
  .btn-dm-match-invite span:not(.btn-dm-icon) {
    display: none !important;
  }

  .btn-dm-send {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    justify-content: center !important;
  }

  .btn-dm-send .btn-dm-send-text,
  .btn-dm-send span {
    display: none !important;
  }
}

@media (max-width: 360px) {
  #dm-chat-overlay {
    padding: 6px !important;
  }

  #dm-chat-overlay .overlay-content.dm-chat-card {
    padding: 10px 8px !important;
    gap: 7px !important;
    border-radius: 15px !important;
  }

  .dm-recipient-avatar-wrap {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }

  .dm-recipient-avatar-wrap svg {
    width: 26px !important;
    height: 26px !important;
  }

  .dm-recipient-name {
    font-size: 0.88rem !important;
  }

  .dm-recipient-status {
    font-size: 0.64rem !important;
  }

  .dm-messages-container {
    min-height: 110px !important;
    padding: 8px 6px !important;
  }

  .dm-input-field {
    padding: 7px 10px !important;
    font-size: 0.80rem !important;
  }

  .btn-dm-card-action {
    padding: 6px 8px !important;
    font-size: 0.74rem !important;
  }
}

@media (max-height: 520px) {
  #dm-chat-overlay {
    padding: 6px !important;
  }

  #dm-chat-overlay .overlay-content.dm-chat-card {
    max-height: calc(100dvh - 12px) !important;
    padding: 8px 12px !important;
    gap: 6px !important;
  }

  .dm-chat-header {
    padding-bottom: 5px !important;
  }

  .dm-messages-container {
    min-height: 80px !important;
    max-height: calc(100dvh - 105px) !important;
    padding: 6px 8px !important;
    gap: 6px !important;
  }

  .dm-input-field {
    padding: 6px 10px !important;
  }
}

/* ─── WCAG 2.3.3 Reduced Motion Accessibility ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .pulse,
  .pulsing,
  .glow-pulse,
  .neon-pulse,
  .shimmer,
  .spinning,
  .rotating,
  .kmkz-piece,
  .kmkz-glint-band,
  .kmkz-slash-beam {
    animation: none !important;
    transform: none !important;
  }

  .kmkz-glint-band,
  .kmkz-slash-beam {
    display: none !important;
  }
}