/* ============================================================
   BARON BINGO — style.css
   Aesthetic: Neon-lit casino floor meets Ethiopian nights
   ============================================================ */

/* Block text selection / long-press copy everywhere (native-app feel), but
   keep real inputs selectable so typing/pasting still works. */
*, *::before, *::after {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

:root {
  /* Themed background image — admin can override via a link (session.bgUrl sets this
     custom property at runtime); falls back to the bundled asset. */
  --xoxo-bg-img: url('assets/xoxo-bg.jpg');
  --bg:         #050812;
  --bg2:        #0a0f20;
  --bg3:        #0f1530;
  --surface:    rgba(255,255,255,0.04);
  --border:     rgba(255,255,255,0.07);
  --gold:       #ffd700;
  --gold2:      #ff9500;
  --cyan:       #00e5ff;
  --green:      #00e676;
  --red:        #ff4444;
  --purple:     #d500f9;
  --text:       rgba(255,255,255,0.92);
  --text-dim:   rgba(255,255,255,0.4);
  --radius:     16px;
  --font-head:  'Orbitron', sans-serif;
  --font-body:  'Rajdhani', 'Noto Sans Ethiopic', sans-serif;
  --font-am:    'Noto Sans Ethiopic', sans-serif;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

html, body {
  height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  overscroll-behavior: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(0,229,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 85% 80%, rgba(213,0,249,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255,215,0,0.03) 0%, transparent 70%),
    var(--bg);
}

button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }
a { color: inherit; text-decoration: none; }
input { outline: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: none;
  color: #fff;
  padding: 12px 18px;
  border-radius: 16px;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.85), 0 0 3px rgba(0,0,0,0.9);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.3s ease;
  /* Wrap long messages onto multiple lines instead of running off the screen. */
  white-space: normal;
  text-align: center;
  line-height: 1.4;
  width: max-content;
  max-width: 88vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== SIDE MENU ===== */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}
.overlay.open { opacity: 1; visibility: visible; }

.side-menu {
  position: fixed;
  top: 0; right: -310px;
  width: 290px; height: 100%;
  background: linear-gradient(180deg, #0d1128 0%, #080d1e 100%);
  border-left: 1px solid rgba(255,255,255,0.07);
  z-index: 300;
  transition: right 0.35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.side-menu.open { right: 0; }

.menu-inner { padding: 20px 18px; display: flex; flex-direction: column; gap: 16px; height: 100%; }

.menu-profile {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.menu-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 900; color: #000;
  font-family: var(--font-head);
  flex-shrink: 0;
}
.menu-name { font-weight: 700; font-size: 0.95rem; }
.menu-phone { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; font-family: var(--font-am); }

.menu-balance-box {
  background: linear-gradient(135deg, rgba(0,229,255,0.1), rgba(0,97,255,0.08));
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
}
.mbl-label { font-size: 0.7rem; color: var(--text-dim); font-family: var(--font-am); }
.mbl-value { font-size: 1.9rem; font-weight: 900; color: var(--cyan); font-family: var(--font-head); }
.mbl-curr { font-size: 0.75rem; color: var(--text-dim); }

.menu-nav { display: flex; flex-direction: column; gap: 4px; }
.menu-nav-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s;
  border: 1px solid transparent;
  font-family: var(--font-am);
}
.menu-nav-btn:hover, .menu-nav-btn:active {
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
}
.menu-links { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.menu-links:empty { display: none; }
.menu-links .menu-nav-btn { text-decoration: none; color: inherit; }
.mnb-icon { font-size: 1.1rem; }
.menu-footer { margin-top: auto; text-align: center; font-size: 0.62rem; color: rgba(255,255,255,0.2); padding-top: 10px; }

/* ===== TOP BAR ===== */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  background: rgba(5,8,18,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.menu-toggle {
  width: auto; height: 32px;
  padding: 0 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: 0.2s;
}
.menu-toggle:active { transform: scale(0.92); }
.menu-toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px;
}

.top-logo {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,215,0,0.4);
}
.top-logo span { color: var(--cyan); }

.top-balance {
  display: flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, rgba(0,229,255,0.12), rgba(0,97,255,0.1));
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0,229,255,0.2);
  font-weight: 700; font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 0.75rem;
}
.tb-coin { font-size: 0.9rem; }

/* Top bar buttons disabled state during game */
.top-bar-disabled .menu-toggle,
.top-bar-disabled .top-balance {
  opacity: 0.35 !important;
  pointer-events: none !important;
  cursor: default !important;
}

/* Inside a live game the top bar is hidden entirely and its 56px space is
   reclaimed so the board fills the screen. */
body.in-game .top-bar { display: none !important; }
body.in-game .screens { margin-top: 0 !important; min-height: 100vh !important; }

/* Admin spectator: show the shared CALL ZONE live but hide the personal card
   zone (a spectator holds no card) and show a view-only banner. */
.spectate-banner { text-align: center; font-size: 0.72rem; font-weight: 800; color: #ffd54a;
  background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 10px; margin: 6px 8px 4px; }
body.bingo-spectate .player-card-zone { display: none !important; }
body.bingo-spectate .game-layout { grid-template-columns: 1fr !important; }

/* ===== SCREENS ===== */
.screens { margin-top: 56px; min-height: calc(100vh - 56px); }

.screen {
  display: none;
  min-height: calc(100vh - 56px);
  padding: 16px 14px 80px;
  animation: screenIn 0.3s ease;
}
.screen.active { display: block; }

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

/* ===== HOME SCREEN ===== */
.home-hero {
  padding: 20px 4px 16px;
  text-align: center;
}
.hero-title {
  font-family: var(--font-am);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.stake-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

/* ===== GAME HUB (home) ===== */
.hero-back {
  position: absolute; left: 6px; top: 14px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-am);
  font-size: 0.78rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.home-hero { position: relative; }

.games-grid {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 8px;
}
.game-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  padding: 18px 16px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  cursor: pointer; color: var(--text);
  transition: transform .12s ease, border-color .12s ease;
}
.game-card:active { transform: scale(0.98); }
.game-bingo {
  border-color: rgba(255,215,0,0.35);
  background: linear-gradient(135deg, rgba(255,215,0,0.14), rgba(255,149,0,0.05));
}
.gc-icon {
  font-size: 2.4rem; line-height: 1;
  width: 56px; height: 56px; flex: 0 0 56px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25); border-radius: 16px;
}
.gc-info { flex: 1; min-width: 0; }
.gc-name {
  font-family: var(--font-head); font-weight: 900;
  font-size: 1.25rem; letter-spacing: 1px; color: var(--text);
}
.game-bingo .gc-name {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.gc-desc {
  font-family: var(--font-am); font-size: 0.74rem;
  color: var(--text-dim); margin-top: 3px;
}
.gc-cta {
  flex: 0 0 auto; font-family: var(--font-am);
  font-size: 0.72rem; font-weight: 700;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.gc-play { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #000; }
.gc-soon { background: rgba(255,255,255,0.06); color: var(--text-dim); border: 1px solid var(--border); }
.game-ludo, .game-spin { opacity: 0.72; }
.game-ludo .gc-icon, .game-spin .gc-icon { filter: grayscale(0.4); }

/* ===== APP LOADING SCREEN ===== */
.app-loading {
  position: fixed; inset: 0; z-index: 99999;
  background: radial-gradient(circle at 50% 35%, var(--bg3), var(--bg));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.app-loading.hidden { display: none; }
.al-logo { font-family: var(--font-head); font-weight: 900; font-size: 1.9rem; letter-spacing: 2px; color: var(--gold); }
.al-logo span { color: var(--cyan); }
.al-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid rgba(255,215,0,0.22); border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
.al-text { font-family: var(--font-am); color: var(--text-dim); font-size: 0.9rem; }

/* ===== SERVICE / MAINTENANCE — full-screen block above everything ===== */
.service-overlay {
  position: fixed; inset: 0; z-index: 999999;
  background: radial-gradient(circle at 50% 30%, var(--bg3), var(--bg));
  display: flex; align-items: center; justify-content: center;
}
.service-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 24px;
}
.service-emoji { font-size: 4rem; }
.service-title { font-family: var(--font-am); font-size: 1.6rem; font-weight: 700; color: var(--gold); }
.service-sub { font-family: var(--font-am); font-size: 0.95rem; color: var(--text-dim); line-height: 1.6; }

/* ===== ADMIN USERS — search box + sort dropdown ===== */
.admin-users-toolbar { position: relative; margin-bottom: 10px; }
.aut-search-row { display: flex; gap: 8px; }
.user-search-input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-am); font-size: 0.85rem;
}
.user-sort-toggle {
  flex: 0 0 auto; width: 46px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--gold); font-size: 1.2rem; font-weight: 700; cursor: pointer;
}
.user-sort-menu {
  display: none; flex-direction: column; gap: 3px;
  margin-top: 8px; padding: 6px; border-radius: 14px;
  background: var(--bg3); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.user-sort-menu.open { display: flex; }
.user-sort-menu button {
  text-align: left; padding: 11px 14px; border-radius: 10px;
  background: transparent; border: none; color: var(--text);
  font-family: var(--font-am); font-size: 0.84rem; font-weight: 600; cursor: pointer;
}
.user-sort-menu button.active {
  background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #000;
}
.ac-meta { font-size: 0.68rem; color: var(--text-dim); margin-top: 2px; }
.wd-phone { display: inline-flex; align-items: center; gap: 6px; }
.wd-copy-btn {
  padding: 2px 8px; border-radius: 8px; cursor: pointer;
  background: rgba(0,229,255,0.15); border: 1px solid rgba(0,229,255,0.3);
  color: var(--cyan); font-size: 0.72rem;
}
.wd-regphone { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); margin-top: 4px; }

/* ===== PHONE REGISTRATION MODAL ===== */
.phone-overlay {
  position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.7);
  display: none;
}
.phone-overlay.active { display: block; }
.phone-modal {
  position: fixed; z-index: 10001; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: min(340px, 88vw); padding: 22px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: none; opacity: 0; transition: opacity .15s ease, transform .15s ease;
}
.phone-modal.active { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.pm-title { font-family: var(--font-am); font-weight: 700; font-size: 1.15rem; color: var(--gold); }
.pm-sub { font-family: var(--font-am); font-size: 0.82rem; color: var(--text-dim); margin: 6px 0 14px; }

/* Styled confirm dialog (replaces the ugly native window.confirm). */
.confirm-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.72); display: none; }
.confirm-overlay.active { display: block; }
.confirm-modal {
  position: fixed; z-index: 10001; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: min(330px, 88vw); padding: 24px 22px 20px; text-align: center;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: none; opacity: 0; transition: opacity .16s ease, transform .16s ease;
}
.confirm-modal.active { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cfm-icon { font-size: 2.3rem; line-height: 1; margin-bottom: 8px; }
.cfm-title { font-family: var(--font-am); font-weight: 700; font-size: 1.12rem; color: var(--gold); }
.cfm-msg { font-family: var(--font-am); font-size: 0.9rem; color: rgba(255,255,255,0.88); margin: 8px 0 18px; line-height: 1.5; }
.cfm-actions { display: flex; gap: 10px; }
.cfm-btn { flex: 1; padding: 12px; border-radius: 12px; font-family: var(--font-am); font-weight: 700;
  font-size: 0.9rem; cursor: pointer; }
.cfm-cancel { background: var(--surface); color: #fff; border: 1px solid var(--border); }
.cfm-ok { background: linear-gradient(135deg, #ff6b6b, #e23b3b); color: #fff; border: none; }
.cfm-btn:active { transform: scale(0.96); }

/* ===== ADMIN USER PROFILE — phone row ===== */
.upm-phone-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; margin: 8px 0; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.upm-phone-label { font-size: 1rem; }
.upm-phone-val { flex: 1; min-width: 80px; font-family: var(--font-main); color: var(--text); font-size: 0.9rem; }
.upm-phone-input {
  flex: 1; min-width: 120px; padding: 6px 10px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: 0.9rem;
}
.upm-phone-btn {
  padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--cyan); font-family: var(--font-am); font-size: 0.75rem; font-weight: 600;
}
.upm-phone-btn.upm-phone-save { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #000; border-color: transparent; }

.stake-card {
  position: relative;
  border-radius: 20px;
  padding: 18px 14px 14px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.stake-card::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 20px; opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.stake-card:active { transform: scale(0.97); }

/* Themes */
.sc-gold::before { background: radial-gradient(circle at 50% 20%, rgba(255,215,0,0.14) 0%, transparent 70%); }
.sc-gold:active, .sc-gold.selected { border-color: rgba(255,215,0,0.4); box-shadow: 0 6px 28px rgba(255,215,0,0.12); }
.sc-gold:active::before, .sc-gold.selected::before { opacity: 1; }
.sc-gold .sc-ring { background: linear-gradient(135deg, #ffd700, #ff9500); box-shadow: 0 4px 18px rgba(255,215,0,0.3); }
.sc-gold .sc-amount { color: #ffd700; }

.sc-green::before { background: radial-gradient(circle at 50% 20%, rgba(0,230,118,0.14) 0%, transparent 70%); }
.sc-green:active, .sc-green.selected { border-color: rgba(0,230,118,0.4); box-shadow: 0 6px 28px rgba(0,230,118,0.12); }
.sc-green:active::before, .sc-green.selected::before { opacity: 1; }
.sc-green .sc-ring { background: linear-gradient(135deg, #00c853, #69f0ae); box-shadow: 0 4px 18px rgba(0,200,83,0.3); }
.sc-green .sc-amount { color: #69f0ae; }

.sc-cyan::before { background: radial-gradient(circle at 50% 20%, rgba(0,229,255,0.14) 0%, transparent 70%); }
.sc-cyan:active, .sc-cyan.selected { border-color: rgba(0,229,255,0.4); box-shadow: 0 6px 28px rgba(0,229,255,0.12); }
.sc-cyan:active::before, .sc-cyan.selected::before { opacity: 1; }
.sc-cyan .sc-ring { background: linear-gradient(135deg, #0061ff, #00e5ff); box-shadow: 0 4px 18px rgba(0,229,255,0.3); }
.sc-cyan .sc-amount { color: #00e5ff; }

.sc-purple::before { background: radial-gradient(circle at 50% 20%, rgba(213,0,249,0.14) 0%, transparent 70%); }
.sc-purple:active, .sc-purple.selected { border-color: rgba(213,0,249,0.4); box-shadow: 0 6px 28px rgba(213,0,249,0.12); }
.sc-purple:active::before, .sc-purple.selected::before { opacity: 1; }
.sc-purple .sc-ring { background: linear-gradient(135deg, #aa00ff, #e040fb); box-shadow: 0 4px 18px rgba(170,0,255,0.3); }
.sc-purple .sc-amount { color: #e040fb; }

.sc-ring {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 10px;
  transition: transform 0.3s;
}
.stake-card:active .sc-ring { transform: scale(1.12) rotate(-6deg); }
.sc-amount { font-size: 1.5rem; font-weight: 900; line-height: 1; font-family: var(--font-head); }
.sc-curr { font-size: 0.62rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; margin-top: 2px; }
.sc-divider { width: 28px; height: 1.5px; background: rgba(255,255,255,0.08); border-radius: 2px; margin: 10px 0; }

.sc-meta { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.sc-players {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.7rem; color: var(--text-dim);
}
.sc-live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: livePulse 2s infinite;
}
@keyframes livePulse { 0%,100%{opacity:.3} 50%{opacity:1} }

.sc-prize { font-size: 0.68rem; color: var(--text-dim); }
.sc-prize-val { font-weight: 800; color: rgba(255,255,255,0.75); }

.sc-phase {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.3px;
  font-family: var(--font-am);
}
.phase-join { background: rgba(0,230,118,0.14); color: #00e676; border: 1px solid rgba(0,230,118,0.3); }
.phase-started { background: rgba(255,68,68,0.14); color: #ff6b6b; border: 1px solid rgba(255,68,68,0.3); animation: phaseGlow 1s ease-in-out infinite alternate; }
.phase-none { background: rgba(120,120,120,0.1); color: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.08); }

@keyframes phaseGlow { from{box-shadow:none} to{box-shadow:0 0 10px rgba(255,68,68,0.4)} }

.sc-phase-dot { width: 4px; height: 4px; border-radius: 50%; }
.phase-join .sc-phase-dot { background: #00e676; animation: livePulse 1s infinite; }
.phase-started .sc-phase-dot { background: #ff6b6b; animation: livePulse 0.6s infinite; }
.phase-none .sc-phase-dot { background: rgba(255,255,255,0.25); }

.sc-timer {
  width: 100%; display: flex; align-items: center; gap: 5px;
}
.sc-timer-bar {
  flex: 1; height: 2.5px; border-radius: 2px;
  background: rgba(255,255,255,0.07); overflow: hidden;
}
.sc-timer-fill { height: 100%; border-radius: 2px; transition: width 1s linear; }
.tf-join { background: linear-gradient(90deg, #00c853, #69f0ae); }
.tf-started { background: linear-gradient(90deg, #ff4444, #ff9500); }
.sc-timer-val { font-size: 0.6rem; color: var(--text-dim); font-weight: 700; min-width: 22px; text-align: right; }

/* ===== SUB HEADER ===== */
.sub-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  padding-top: 4px;
}
.back-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--cyan); font-size: 1rem;
  transition: 0.2s;
}
.back-btn:active { transform: scale(0.9); }
.sub-title { flex: 1; font-size: 1.1rem; font-weight: 800; font-family: var(--font-am); }
.sub-badge {
  padding: 4px 12px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,149,0,0.15));
  color: var(--gold); border: 1px solid rgba(255,215,0,0.25);
  font-size: 0.75rem; font-weight: 800;
  font-family: var(--font-head);
}

/* ===== CARD PICKER ===== */
.card-picker-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  background: rgba(0,0,0,0.4);
  border-radius: 12px;
  padding: 8px 6px;
  border: 1px solid var(--border);
  max-height: 280px;
  overflow-y: auto;
}
.cp-num {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 7px;
  font-weight: 700; font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.cp-num:active { transform: scale(0.88); }
.cp-num.taken { opacity: 0.2; pointer-events: none; background: rgba(255,68,68,0.1); color: #ff4444; }
.cp-num.selected {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #000; border-color: transparent;
  box-shadow: 0 0 12px rgba(255,215,0,0.35);
  font-weight: 900;
}

.card-preview-wrap { display: flex; flex-direction: column; align-items: center; margin-top: 14px; gap: 6px; }
.cp-label { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; }

.bingo-preview {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 3px; width: 150px;
  min-height: 150px;
  background: rgba(0,0,0,0.3);
  padding: 8px; border-radius: 12px;
  border: 1px solid var(--border);
}
.bp-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 5px;
  font-size: 0.6rem; font-weight: 700;
  color: rgba(255,255,255,0.55);
}
.bp-cell.bp-free { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #000; font-size: 0.5rem; }

/* ===== WINNER CARD (shown on the result screen to prove a real card won) ===== */
.result-winner-card {
  margin: 10px auto 4px; width: fit-content; max-width: 100%;
  display: flex; gap: 12px; overflow-x: auto;
  padding: 4px 2px 8px; -webkit-overflow-scrolling: touch;
}
.rwc-card { flex: 0 0 auto; }
.rwc-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 3px; width: 150px;
  background: rgba(0,0,0,0.3);
  padding: 8px; border-radius: 12px;
  border: 1px solid var(--border);
}
.rwc-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 5px;
  font-size: 0.62rem; font-weight: 700;
  color: rgba(255,255,255,0.5);
}
.rwc-cell.rwc-free { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #000; font-size: 0.48rem; }
.rwc-cell.rwc-daubed { background: rgba(0,229,255,0.28); color: #fff; }
.rwc-cell.rwc-win { background: linear-gradient(135deg, #00c853, #64dd17); color: #000; box-shadow: 0 0 8px rgba(0,200,83,0.6); }
.rwc-caption { text-align: center; font-size: 0.7rem; color: var(--gold); font-family: var(--font-am); margin-bottom: 6px; }

/* ===== NOTIFICATION BELL — blinking red dot while there are unread messages ===== */
@keyframes notifPulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255,68,68,0.75); }
  50%      { transform: scale(1.3); box-shadow: 0 0 0 7px rgba(255,68,68,0); }
}
#notifBadge.notif-blink { animation: notifPulse 1s ease-in-out infinite; }
@keyframes bellWiggle {
  0%, 90%, 100% { transform: rotate(0); }
  93% { transform: rotate(12deg); }
  96% { transform: rotate(-12deg); }
}
.notif-bell-btn.has-unread > span:first-child {
  display: inline-block;
  animation: bellWiggle 2s ease-in-out infinite;
  transform-origin: 50% 0;
}

/* ===== CTA BTN ===== */
.cta-btn {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #000; border-radius: 14px;
  font-weight: 900; font-size: 1rem;
  letter-spacing: 0.5px; margin-top: 14px;
  transition: 0.2s;
  font-family: var(--font-am);
}
.cta-btn:active { transform: scale(0.97); }

/* ===== LOBBY ===== */
.lobby-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px;
  min-height: calc(100vh - 140px);
  text-align: center;
}
.lobby-spinner {
  width: 60px; height: 60px;
  border: 4px solid rgba(255,255,255,0.08);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Wallet-modal manual balance refresh (spin-until-success). */
.wm-refresh { align-self:center; width:34px; height:34px; padding:0; margin-left:6px; display:inline-flex; align-items:center; justify-content:center; background:rgba(255,215,0,.10); border:1px solid rgba(255,215,0,.22); border-radius:50%; cursor:pointer; flex-shrink:0; }
.wm-refresh:active { transform:scale(.9); }
.wm-refresh img { width:18px; height:18px; }
.wm-refresh.spinning { animation:spin .8s linear infinite; }
.lobby-title { font-family: var(--font-am); font-size: 1rem; font-weight: 700; }
.lobby-count { font-size: 1.4rem; font-weight: 900; color: var(--gold); font-family: var(--font-head); }
.lobby-players {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center; max-width: 300px;
}
.lp-chip {
  padding: 4px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  font-size: 0.72rem; font-weight: 600;
}
.lp-chip.lp-bot { color: rgba(255,255,255,0.45); }
.lp-chip.lp-real { color: var(--cyan); border-color: rgba(0,229,255,0.3); }
.cancel-btn {
  padding: 10px 28px; border-radius: 12px;
  background: rgba(255,68,68,0.15); border: 1px solid rgba(255,68,68,0.3);
  color: var(--red); font-weight: 700; font-size: 0.88rem;
  transition: 0.2s;
}
.cancel-btn:active { transform: scale(0.95); }

/* ===== GAME SCREEN ===== */
#screen-game { padding: 8px 8px 20px; }

.game-topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg3); border-radius: 12px;
  padding: 8px 12px; margin-bottom: 8px;
  border: 1px solid var(--border);
}
.gtb-left { display: flex; align-items: center; gap: 8px; }
.gtb-round {
  font-size: 0.65rem; font-weight: 800;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px;
}
.gtb-players { font-size: 0.7rem; color: var(--cyan); font-weight: 600; }
.gtb-prize {
  font-size: 0.8rem; font-weight: 900; color: var(--gold);
  font-family: var(--font-head);
  text-shadow: 0 0 14px rgba(255,215,0,0.4);
}
.gtb-leave {
  padding: 5px 12px; border-radius: 8px;
  background: rgba(255,68,68,0.12); border: 1px solid rgba(255,68,68,0.25);
  color: var(--red); font-size: 0.7rem; font-weight: 700;
  transition: 0.2s;
}
.gtb-leave:active { transform: scale(0.93); }

.gtb-sound {
  padding: 4px 8px; border-radius: 8px;
  background: rgba(255,215,0,0.10); border: 1px solid rgba(255,215,0,0.22);
  font-size: 0.95rem; line-height: 1; cursor: pointer;
  transition: 0.2s;
}
.gtb-sound:active { transform: scale(0.9); }

/* ===== Card selection: selected cards, side-scrolling row with ✕ ===== */
.selected-cards-row {
  display: flex; gap: 12px; overflow-x: auto;
  width: 100%; max-width: 100%; box-sizing: border-box;
  justify-content: flex-start; align-self: stretch;
  padding: 10px 4px 12px; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.selected-cards-row:empty { display: none; }
.sel-card {
  position: relative; flex: 0 0 auto; scroll-snap-align: start;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,215,0,0.28);
  border-radius: 12px; padding: 12px 8px 8px;
}
.sel-card-title {
  text-align: center; font-size: 0.7rem; color: #ffd700;
  font-weight: 700; margin-bottom: 6px;
}
.sel-card-x {
  position: absolute; top: -9px; right: -9px; width: 24px; height: 24px;
  border-radius: 50%; background: #ff4444; color: #fff;
  border: 2px solid #14142a; font-size: 0.72rem; font-weight: 700;
  cursor: pointer; z-index: 2; padding: 0;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.sel-card-x:active { transform: scale(0.88); }

/* ===== In-game: stacked extra cards for multi-card players ===== */
.extra-cards { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
/* 4–5 cards: shrink the extra cards and lay them out 2-across (matches the
   selected-cards preview). The main card above is unchanged. */
/* minmax(0,1fr) so two side-by-side extra cards shrink to fit the column
   instead of overflowing (which would widen the right side and squeeze the
   1-75 board). The main card and board keep their original size. */
.extra-cards.ec-2col { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; align-items: start; }
.extra-cards.ec-2col .ec-card  { padding: 5px; }
.extra-cards.ec-2col .ec-title { font-size: 0.58rem; margin-bottom: 3px; }
.extra-cards.ec-2col .ec-cell  { font-size: 0.5rem; border-radius: 4px; }
.extra-cards.ec-2col .bch      { font-size: 0.52rem; }
.extra-cards.ec-2col .ec-grid,
.extra-cards.ec-2col .ec-header { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 2px; }
.ec-card {
  border: 1px solid rgba(0,229,255,0.25); border-radius: 12px;
  padding: 8px; background: rgba(255,255,255,0.02);
}
.ec-title { text-align: center; font-size: 0.72rem; color: #00e5ff; font-weight: 700; margin-bottom: 6px; }
.main-card-no { text-align: center; font-size: 0.82rem; color: #00e5ff; font-weight: 700; margin: 6px 0 2px; }
.main-card-no:empty { display: none; }
.ec-header { margin-bottom: 4px; }
.ec-win { border-color: #ffd700; box-shadow: 0 0 14px rgba(255,215,0,0.4); }

.game-layout {
  display: grid;
  /* minmax(0,1fr) pins both halves to 50/50 so content in the right column
     (e.g. side-by-side extra cards) can NEVER expand it and shrink the left
     1-75 call board. */
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 8px;
}

/* LEFT: CALL ZONE */
.call-zone {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 10px 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.call-zone-title {
  position: relative;
  font-size: 0.55rem; font-weight: 900;
  letter-spacing: 2px; text-align: center;
  color: var(--text-dim); text-transform: uppercase;
}
/* Refresh sits in the empty gap left of the centered title — nothing else moves. */
.cz-refresh {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: 0.72rem; line-height: 1; color: var(--text-dim);
}
.cz-refresh:active { transform: translateY(-50%) scale(0.88); }
.cz-refresh.spin { animation: czspin 0.6s linear; }
@keyframes czspin { from { transform: translateY(-50%) rotate(0); } to { transform: translateY(-50%) rotate(360deg); } }

.bingo-headers {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}
.bh {
  text-align: center;
  font-size: 0.7rem; font-weight: 900;
  font-family: var(--font-head);
  padding: 3px 0;
  border-radius: 4px;
}
.bh-b { color: #ff5252; background: rgba(255,82,82,0.1); }
.bh-i { color: #ffd700; background: rgba(255,215,0,0.1); }
.bh-n { color: #00e676; background: rgba(0,230,118,0.1); }
.bh-g { color: #00e5ff; background: rgba(0,229,255,0.1); }
.bh-o { color: #e040fb; background: rgba(224,64,251,0.1); }

.current-call-wrap {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(0,0,0,0.35);
  border-radius: 12px; padding: 8px 4px;
  border: 1px solid rgba(255,215,0,0.15);
}
.current-call-letter {
  font-size: 0.65rem; font-weight: 900;
  color: var(--gold); letter-spacing: 1px;
  font-family: var(--font-head);
}
.current-call-number {
  font-size: 2rem; font-weight: 900;
  line-height: 1;
  font-family: var(--font-head);
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  animation: numberPop 0.35s ease;
}
@keyframes numberPop {
  from { transform: scale(1.4); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

.call-history {
  display: flex; gap: 4px; overflow-x: auto;
  padding: 2px 0; scrollbar-width: none;
}
.call-history::-webkit-scrollbar { display: none; }
.ch-ball {
  min-width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 800; flex-shrink: 0;
  color: #000;
}
.chb-b { background: linear-gradient(135deg, #ff5252, #ff1744); color: #fff; }
.chb-i { background: linear-gradient(135deg, #ff9500, #ffd700); }
.chb-n { background: linear-gradient(135deg, #00c853, #00e676); }
.chb-g { background: linear-gradient(135deg, #0061ff, #00e5ff); color: #fff; }
.chb-o { background: linear-gradient(135deg, #aa00ff, #e040fb); color: #fff; }

.called-list-label { font-size: 0.52rem; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.called-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px 2px;
}
.cg-col-header {
  text-align: center;
  font-size: 0.6rem; font-weight: 900;
  font-family: var(--font-head);
  padding: 2px 0;
  border-radius: 4px;
  margin-bottom: 1px;
}
.cg-col-header.cg-hb { color: #ff5252; background: rgba(255,82,82,0.15); }
.cg-col-header.cg-hi { color: #ffd700; background: rgba(255,215,0,0.15); }
.cg-col-header.cg-hn { color: #00e676; background: rgba(0,230,118,0.15); }
.cg-col-header.cg-hg { color: #00e5ff; background: rgba(0,229,255,0.15); }
.cg-col-header.cg-ho { color: #e040fb; background: rgba(224,64,251,0.15); }
.cg-num {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.52rem; font-weight: 700;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.3);
  transition: all 0.3s;
}
.cg-num.cg-called { color: #000; }
.cg-num.cg-b.cg-called { background: linear-gradient(135deg,#ff5252,#ff1744); color: #fff; }
.cg-num.cg-i.cg-called { background: linear-gradient(135deg,#ff9500,#ffd700); }
.cg-num.cg-n.cg-called { background: linear-gradient(135deg,#00c853,#00e676); }
.cg-num.cg-g.cg-called { background: linear-gradient(135deg,#0061ff,#00e5ff); color: #fff; }
.cg-num.cg-o.cg-called { background: linear-gradient(135deg,#aa00ff,#e040fb); color: #fff; }

/* RIGHT: PLAYER CARD */
.player-card-zone {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.pcz-label {
  font-size: 0.55rem; font-weight: 900;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-dim);
}

.bingo-card-header {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 2px; width: 100%;
}
.bch {
  text-align: center;
  font-size: 0.7rem; font-weight: 900;
  font-family: var(--font-head);
  padding: 3px 0; border-radius: 4px;
}
.bch-b { color: #ff5252; background: rgba(255,82,82,0.12); }
.bch-i { color: #ffd700; background: rgba(255,215,0,0.12); }
.bch-n { color: #00e676; background: rgba(0,230,118,0.12); }
.bch-g { color: #00e5ff; background: rgba(0,229,255,0.12); }
.bch-o { color: #e040fb; background: rgba(224,64,251,0.12); }

.bingo-card {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 3px; width: 100%;
}
.gc-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  font-weight: 700; font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  position: relative;
}
.gc-cell:active { transform: scale(0.88); }
.gc-cell.gc-free { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #000; font-size: 0.55rem; font-weight: 900; cursor: default; }
.gc-cell.gc-called {
  border-color: rgba(0,229,255,0.3);
  background: rgba(0,229,255,0.06);
}
.gc-cell.gc-daubed {
  background: linear-gradient(135deg, rgba(0,229,255,0.3), rgba(0,97,255,0.2));
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(0,229,255,0.2);
}
.gc-cell.gc-win {
  animation: winCell 0.5s ease-in-out infinite alternate;
}
@keyframes winCell {
  from { box-shadow: 0 0 8px rgba(255,215,0,0.3); border-color: var(--gold); }
  to   { box-shadow: 0 0 22px rgba(255,215,0,0.7); border-color: var(--gold2); }
}

.bingo-shout-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #ff4444, #ff1744);
  color: #fff; border-radius: 12px;
  font-weight: 900; font-size: 1rem;
  letter-spacing: 2px; opacity: 0.6;
  pointer-events: auto;
  transition: all 0.3s;
  font-family: var(--font-head);
  border: 2px solid rgba(255,100,100,0.4);
}
.bingo-shout-btn.ready {
  opacity: 1;
  border-color: #ff1744;
  box-shadow: 0 0 18px rgba(255,68,68,0.5);
  animation: bingoBtnPulse 0.8s ease-in-out infinite alternate;
}
@keyframes bingoBtnPulse {
  from { box-shadow: 0 0 18px rgba(255,68,68,0.4); }
  to   { box-shadow: 0 0 36px rgba(255,68,68,0.7); }
}
.bingo-shout-btn:active { transform: scale(0.96); }

/* Players strip */
.players-strip {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 8px 0 2px;
  scrollbar-width: none; margin-top: 6px;
}
.players-strip::-webkit-scrollbar { display: none; }
.ps-chip {
  flex-shrink: 0;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 0.65rem; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.ps-chip.ps-self { color: var(--cyan); border-color: rgba(0,229,255,0.3); }
.ps-chip.ps-bot { color: var(--text-dim); }
.ps-chip.ps-out { opacity: 0.35; text-decoration: line-through; }

/* ===== RESULT ===== */
.result-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px;
  min-height: calc(100vh - 140px); text-align: center;
}
.result-emoji { font-size: 4.5rem; animation: resultPop 0.5s ease; }
@keyframes resultPop {
  from { transform: scale(0.3) rotate(-10deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}
.result-title {
  font-size: 2rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-head);
}
.result-title.loss {
  background: linear-gradient(135deg, #ff4444, #ff1744);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.result-amount { font-size: 2rem; font-weight: 900; color: var(--cyan); font-family: var(--font-head); }
.result-amount.loss { color: var(--red); }
.result-winner { font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }
.result-sub { font-size: 0.8rem; color: var(--text-dim); font-family: var(--font-am); }

/* ===== DEPOSIT ===== */
.deposit-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 16px;
}
.dc-title { font-size: 1rem; font-weight: 700; color: var(--cyan); margin-bottom: 14px; font-family: var(--font-am); }
.dc-field-label { font-size: 0.68rem; color: var(--text-dim); margin-top: 12px; margin-bottom: 4px; font-family: var(--font-am); }
.dc-field-val { font-weight: 700; font-size: 1rem; }
.dc-copy-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0,0,0,0.4);
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border);
}
.dc-copy-row span { font-weight: 700; color: var(--cyan); letter-spacing: 1.5px; font-size: 0.95rem; }
.copy-btn {
  padding: 6px 12px; border-radius: 7px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  font-size: 0.72rem; font-weight: 600;
  transition: 0.2s;
}
.copy-btn:active { transform: scale(0.93); background: rgba(255,255,255,0.15); }

.dc-input {
  width: 100%; padding: 12px 14px; margin-top: 4px;
  border-radius: 10px;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color 0.25s;
}
.dc-input:focus { border-color: var(--cyan); box-shadow: 0 0 10px rgba(0,229,255,0.12); }
.dc-input::placeholder { color: rgba(255,255,255,0.2); }

.history-section { margin-top: 20px; }
.hs-title { font-size: 0.8rem; font-weight: 700; color: var(--cyan); margin-bottom: 10px; font-family: var(--font-am); }

.history-list { display: flex; flex-direction: column; gap: 7px; }
.hist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border-left: 3px solid var(--cyan);
  font-size: 0.82rem;
  transition: background 0.2s;
}
.hist-item.hist-dep { border-left-color: var(--green); }
.hist-item.hist-win { border-left-color: var(--gold); }
.hist-item.hist-bet { border-left-color: var(--red); }
.hist-item.hist-withdraw { border-left-color: var(--cyan); }

.hist-left  { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hist-label { font-weight: 600; font-family: var(--font-am); font-size: 0.83rem; overflow: hidden; }
.hist-date { font-size: 0.62rem; color: var(--text-dim); margin-top: 2px; font-family: var(--font-main); letter-spacing: 0.3px; }
.hist-date  { font-size: 0.62rem; color: rgba(255,255,255,0.35); font-family: var(--font-main); }
.tx-copy { background: none; border: none; border-radius: 0; padding: 0 2px; font-size: 0.66rem; cursor: pointer; line-height: 1; vertical-align: middle; }
.tx-copy:active { transform: scale(0.9); }
/* "View the game" button — inline on the Game-id row (matches CORE). */
.hist-gidrow { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hist-viewgame { display: inline-flex; align-items: center; gap: 4px; font-size: 0.62rem; font-weight: 700;
  color: var(--gold, #e6b545); background: rgba(230,181,69,0.12); border: 1px solid rgba(230,181,69,0.35);
  border-radius: 6px; padding: 1px 7px; cursor: pointer; line-height: 1.5; }
.hist-viewgame:active { transform: scale(0.96); }
.hist-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.hist-amount { font-weight: 800; font-size: 0.9rem; }
.hist-amount.pos { color: var(--green); }
.hist-amount.neg { color: var(--red); }

/* Status badges */
.hist-badge {
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--font-main);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.hist-badge-pending   { background: rgba(255,165,0,0.18);  color: #ffa500; }
.hist-badge-approved  { background: rgba(0,200,83,0.18);   color: #00c853; }
.hist-badge-cancelled { background: rgba(255,68,68,0.18);  color: #ff4444; }

/* keep old class for backward compat */
.hist-status { font-size: 0.62rem; color: rgba(255,215,0,0.8); font-style: italic; }

/* ===== CONFETTI ===== */
.confetti-wrap {
  position: fixed; inset: 0; pointer-events: none; z-index: 9990; overflow: hidden;
}
.conf-piece {
  position: absolute; top: -12px;
  animation: confFall linear forwards;
}
@keyframes confFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* No-players state */
.sc-no-players-label {
  font-size: 0.62rem; color: rgba(255,255,255,0.25);
  font-family: var(--font-am);
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}

/* Call counter in game topbar */
.gtb-call-count {
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 4px 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ===== ADMIN PANEL ===== */
#screen-admin { padding-bottom:40px; overflow-y:auto; height:100%; }
.admin-stats-row { display:flex; gap:10px; padding:12px 16px 0; }
.admin-stat-box { flex:1; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.1); border-radius:12px; padding:12px 8px; text-align:center; }
.asb-val { font-family:var(--font-main); font-size:1.4rem; font-weight:900; color:#ffd700; }
.asb-lbl { font-size:0.6rem; color:rgba(255,255,255,0.4); font-family:var(--font-am); margin-top:2px; }
.admin-tabs { display:flex; gap:8px; padding:14px 16px 6px; }
.admin-tab { flex:1; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.1); border-radius:20px; color:rgba(255,255,255,0.5); font-size:0.72rem; font-family:var(--font-main); padding:8px 4px; cursor:pointer; transition:all 0.2s; }
.admin-tab.active { background:rgba(255,215,0,0.15); border-color:rgba(255,215,0,0.4); color:#ffd700; }
.admin-panel { padding:10px 16px; }
.admin-list { display:flex; flex-direction:column; gap:10px; }
.admin-empty { text-align:center; color:rgba(255,255,255,0.3); font-family:var(--font-am); padding:40px 0; font-size:0.85rem; }
.admin-card { background:rgba(255,255,255,0.04); border-radius:14px; padding:14px; border-left:3px solid transparent; display:flex; flex-direction:column; gap:8px; }
.acard-pending  { border-left-color:#ffa500; background:rgba(255,165,0,0.06); }
.acard-approved { border-left-color:#00c853; background:rgba(0,200,83,0.05); }
.acard-cancelled{ border-left-color:#ff4444; background:rgba(255,68,68,0.05); }
.acard-user     { border-left-color:#00b4d8; background:rgba(0,180,216,0.05); }
.ac-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ac-meta { font-size:0.72rem; color:rgba(255,255,255,0.5); font-family:var(--font-am); flex-wrap:wrap; }
.ac-user { flex:1; min-width:0; }
.ac-name { font-family:var(--font-main); font-size:0.88rem; font-weight:700; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ac-uid { font-size:0.65rem; color:rgba(255,255,255,0.35); font-family:var(--font-main); }
.ac-amount { font-family:var(--font-main); font-weight:800; font-size:1rem; flex-shrink:0; }
.ac-amount.pos { color:#00c853; } .ac-amount.neg { color:#ff4444; }
.ac-status { font-size:0.72rem; font-family:var(--font-main); font-weight:600; }
.st-pending { color:#ffa500; } .st-approved { color:#00c853; } .st-cancelled { color:#ff4444; }
.ac-actions { display:flex; gap:8px; margin-top:4px; }
.ac-btn { flex:1; padding:9px 6px; border:none; border-radius:10px; font-size:0.78rem; font-family:var(--font-main); font-weight:700; cursor:pointer; transition:transform 0.15s; }
.ac-btn:active { transform:scale(0.96); }
.ac-approve { background:linear-gradient(135deg,#00c853,#007c39); color:#fff; }
.ac-cancel  { background:linear-gradient(135deg,#ff4444,#b71c1c); color:#fff; }

/* Call counter */
.gtb-call-count { font-family:var(--font-main); font-size:0.72rem; font-weight:700; color:rgba(255,255,255,0.7); background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.15); border-radius:20px; padding:4px 10px; letter-spacing:0.5px; white-space:nowrap; }

/* ===== WITHDRAW SCREEN ===== */
.withdraw-balance-box { display:flex; align-items:center; justify-content:space-between; background:rgba(255,165,0,0.08); border:1px solid rgba(255,165,0,0.25); border-radius:12px; padding:14px 18px; margin-bottom:18px; }
.wbb-label { font-family:var(--font-am); font-size:0.82rem; color:var(--text-dim); }
.wbb-amount { font-family:var(--font-main); font-size:1.15rem; font-weight:700; color:#ffa500; }
.withdraw-note { display:flex; gap:8px; align-items:flex-start; background:rgba(255,200,0,0.06); border:1px solid rgba(255,200,0,0.18); border-radius:10px; padding:12px 14px; margin:14px 0; font-family:var(--font-am); font-size:0.78rem; color:rgba(255,220,100,0.85); line-height:1.5; }
.withdraw-cta { background:linear-gradient(135deg,#ff8c00,#e65c00) !important; box-shadow:0 4px 18px rgba(255,100,0,0.35) !important; }

/* ===== WALLET MODAL ===== */
.wallet-modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.7); z-index:900; backdrop-filter:blur(6px); }
.wallet-modal-overlay.active { display:block; }
.wallet-modal { display:none; position:fixed; left:50%; top:50%; transform:translate(-50%,-40%) scale(0.92); width:min(320px,88vw); background:linear-gradient(160deg,#1c1c3a 0%,#12122a 100%); border:1px solid rgba(255,255,255,0.1); border-radius:24px; z-index:901; opacity:0; transition:opacity 0.25s ease,transform 0.28s cubic-bezier(0.34,1.4,0.64,1); overflow:hidden; box-shadow:none; }
.wallet-modal.active { display:block; opacity:1; transform:translate(-50%,-50%) scale(1); }
.wallet-modal::before { content:''; display:block; height:3px; background:linear-gradient(90deg,#ffd700,#ff8c00,#ffd700); background-size:200% 100%; animation:wm-shine 2.5s linear infinite; }
@keyframes wm-shine { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.wm-inner { padding:22px 20px 24px; }
.wm-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.wm-label { font-family:var(--font-am); font-size:0.78rem; color:rgba(255,255,255,0.4); }
.wm-close-btn { background:rgba(255,255,255,0.08); border:none; color:rgba(255,255,255,0.5); width:28px; height:28px; border-radius:50%; font-size:0.9rem; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.wm-balance-row { display:flex; align-items:baseline; gap:8px; margin-bottom:22px; padding:16px; background:rgba(255,215,0,0.06); border-radius:14px; border:1px solid rgba(255,215,0,0.15); }
.wm-coin { font-size:1.4rem; }
.wm-balance { font-family:var(--font-main); font-size:1.9rem; font-weight:900; color:#ffd700; flex:1; }
.wm-curr-tag { font-family:var(--font-main); font-size:0.75rem; color:rgba(255,215,0,0.5); font-weight:600; align-self:center; }
.wm-buttons { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.wm-btn { display:flex; flex-direction:column; align-items:center; gap:6px; padding:16px 10px; border:none; border-radius:16px; cursor:pointer; transition:transform 0.15s; }
.wm-btn:active { transform:scale(0.95); }
.wm-btn-icon { font-size:1.8rem; line-height:1; }
.wm-btn-name { font-family:var(--font-main); font-size:0.9rem; font-weight:800; color:#fff; }
.wm-btn-sub { font-size:0.65rem; font-family:var(--font-am); color:rgba(255,255,255,0.7); }
.wm-deposit { background:linear-gradient(145deg,#00b248,#005c28); box-shadow:none; }
.wm-withdraw { background:linear-gradient(145deg,#e67e00,#7a3800); box-shadow:none; }

/* ═══════════════════════════════════════════════════════
   NOTIFICATION MODAL
════════════════════════════════════════════════════════ */
.notif-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:1100;opacity:0;pointer-events:none;transition:opacity .25s}
.notif-overlay.active{opacity:1;pointer-events:all}
.notif-modal{position:fixed;bottom:-100%;left:0;right:0;max-height:75vh;background:var(--card-bg,#1a1a2e);border-radius:22px 22px 0 0;z-index:1101;display:flex;flex-direction:column;transition:bottom .3s cubic-bezier(.4,0,.2,1)}
.notif-modal.active{bottom:0}
.notif-modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 10px;border-bottom:1px solid rgba(255,255,255,.08)}
.notif-modal-title{font-size:1rem;font-weight:700;color:#fff}
.notif-close-btn{background:none;border:none;color:rgba(255,255,255,.5);font-size:1.1rem;cursor:pointer;padding:4px 8px}
.notif-list{overflow-y:auto;flex:1;padding:8px 0}
.notif-empty{text-align:center;color:rgba(255,255,255,.35);padding:32px;font-size:.85rem}
.notif-item{padding:12px 18px;border-bottom:1px solid rgba(255,255,255,.06);transition:background .15s}
.notif-item.notif-unread{background:rgba(100,181,246,.07);border-left:3px solid #64b5f6}
.notif-item-from{font-size:.7rem;font-weight:700;color:#64b5f6;margin-bottom:3px}
.notif-item-msg{font-size:.82rem;color:#e0e0e0;white-space:pre-wrap;line-height:1.5}
.notif-item-time{font-size:.65rem;color:rgba(255,255,255,.3);margin-top:4px}

/* ═══════════════════════════════════════════════════════
   USER PROFILE MODAL
════════════════════════════════════════════════════════ */
.upm-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:1200;opacity:0;pointer-events:none;transition:opacity .25s}
.upm-overlay.active{opacity:1;pointer-events:all}
.upm-modal{position:fixed;inset:0;background:#0f0f1a;z-index:1201;overflow-y:auto;transform:translateY(100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}
.upm-modal.active{transform:translateY(0)}
.upm-header{background:linear-gradient(160deg,#1a0533,#0d1b3e);padding:28px 20px 20px;text-align:center;position:relative}
.upm-close{position:absolute;top:14px;right:16px;background:rgba(255,255,255,.1);border:none;color:#fff;width:30px;height:30px;border-radius:50%;font-size:.9rem;cursor:pointer}
.upm-avatar{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#7c3aed,#2563eb);display:flex;align-items:center;justify-content:center;font-size:1.8rem;font-weight:700;color:#fff;margin:0 auto 10px;border:3px solid rgba(255,255,255,.15)}
.upm-name{font-size:1.1rem;font-weight:700;color:#fff}
.upm-username{font-size:.8rem;color:rgba(255,255,255,.5);margin-top:2px}
.upm-uid{font-size:.7rem;color:rgba(255,255,255,.3);margin-top:2px}
.upm-balance-badge{display:inline-block;background:rgba(0,230,118,.15);color:#00e676;border:1px solid rgba(0,230,118,.3);border-radius:20px;padding:4px 14px;font-size:.85rem;font-weight:700;margin-top:8px}
.upm-joined{font-size:.72rem;color:rgba(255,255,255,.4);padding:8px 18px;border-bottom:1px solid rgba(255,255,255,.06)}
.upm-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:rgba(255,255,255,.06);margin:0}
.upm-stat{background:#0f0f1a;padding:10px 6px;text-align:center}
.upm-stat-val{font-size:1rem;font-weight:700;color:#fff}
.upm-stat-lbl{font-size:.6rem;color:rgba(255,255,255,.4);margin-top:2px}
.upm-actions{display:flex;gap:10px;padding:14px 16px}
.upm-btn{flex:1;padding:11px;border-radius:10px;border:none;font-size:.82rem;font-weight:700;cursor:pointer}
.upm-btn-msg{background:linear-gradient(135deg,#5500cc,#8833ff);color:#fff}
.upm-btn-bal{background:linear-gradient(135deg,#1565c0,#1976d2);color:#fff}
.upm-tx-title{font-size:.75rem;font-weight:700;color:rgba(255,255,255,.5);padding:10px 18px 6px;border-top:1px solid rgba(255,255,255,.06)}
.upm-tx-list{padding:0 12px 24px}
.upm-tx-item{display:flex;justify-content:space-between;align-items:flex-start;padding:10px 8px;border-bottom:1px solid rgba(255,255,255,.05)}
.upm-tx-label{font-size:.78rem;color:#e0e0e0;font-weight:600}
.upm-tx-date{font-size:.63rem;color:rgba(255,255,255,.35);margin-top:2px}
.upm-tx-amt{font-size:.82rem;font-weight:700}
.upm-tx-status{font-size:.65rem;font-weight:600;margin-top:3px}
.upm-dep .upm-tx-amt{color:#00e676}
.upm-wd .upm-tx-amt{color:#ffa726}
.upm-win .upm-tx-amt{color:#ffb700}
.upm-stake .upm-tx-amt{color:#ef5350}

/* ═══════════════════════════════════════════════════════
   SEND MESSAGE MODAL
════════════════════════════════════════════════════════ */
.smm-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:1300;opacity:0;pointer-events:none;transition:opacity .25s}
.smm-overlay.active{opacity:1;pointer-events:all}
.smm-modal{position:fixed;bottom:-100%;left:0;right:0;background:#1a1a2e;border-radius:22px 22px 0 0;padding:20px 18px 32px;z-index:1301;transition:bottom .3s cubic-bezier(.4,0,.2,1)}
.smm-modal.active{bottom:0}
.smm-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.smm-title{font-size:.95rem;font-weight:700;color:#fff}
.smm-close{background:none;border:none;color:rgba(255,255,255,.5);font-size:1rem;cursor:pointer}
.smm-to{font-size:.75rem;color:#64b5f6;margin-bottom:10px;font-weight:600}
.smm-textarea{width:100%;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);border-radius:12px;color:#fff;font-size:.88rem;padding:12px;resize:none;box-sizing:border-box;font-family:var(--font-am,'Noto Sans Ethiopic',sans-serif)}
.smm-send-btn{width:100%;margin-top:12px;padding:13px;background:linear-gradient(135deg,#5500cc,#8833ff);color:#fff;border:none;border-radius:12px;font-size:.9rem;font-weight:700;cursor:pointer}

/* ═══════════════════════════════════════════════════════
   DEPOSIT HISTORY — rejected + resubmit
════════════════════════════════════════════════════════ */
.hist-rejected{border-left:3px solid #ff4444 !important;background:rgba(255,68,68,.05) !important}
.resubmit-btn{margin-top:5px;padding:4px 12px;background:rgba(255,165,0,.15);color:#ffa500;border:1px solid rgba(255,165,0,.3);border-radius:8px;font-size:.7rem;font-weight:700;cursor:pointer}

/* ═══════════════════════════════════════════════════════
   SETTINGS PANEL
════════════════════════════════════════════════════════ */
.settings-panel{padding:14px 12px;display:flex;flex-direction:column;gap:14px}
.settings-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:16px}
.settings-card-title{font-size:.9rem;font-weight:700;color:#fff;margin-bottom:4px}
.settings-card-sub{font-size:.7rem;color:rgba(255,255,255,.4);margin-bottom:14px;line-height:1.5}
.settings-field-label{font-size:.72rem;color:rgba(255,255,255,.55);margin-bottom:5px;margin-top:10px}
.settings-field-label:first-of-type{margin-top:0}
.settings-input{width:100%;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);border-radius:10px;color:#fff;font-size:.85rem;padding:10px 12px;box-sizing:border-box;font-family:inherit}
.settings-input:focus{outline:none;border-color:rgba(100,181,246,.5)}
.settings-textarea{resize:none;min-height:72px}
.settings-save-btn{width:100%;margin-top:14px;padding:12px;background:linear-gradient(135deg,#1565c0,#1976d2);color:#fff;border:none;border-radius:11px;font-size:.88rem;font-weight:700;cursor:pointer}

/* ── Mini avatar — admin dep/wd/users cards ─────────────── */
.ac-mini-avatar{
  width:36px;height:36px;border-radius:50%;
  background:linear-gradient(135deg,#1565c0,#1976d2);
  display:flex;align-items:center;justify-content:center;
  font-size:.8rem;font-weight:700;color:#fff;
  flex-shrink:0;margin-right:8px;
  background-size:cover;background-position:center;
}

/* ── Toggle switch + bonus preview ─────────────────────── */
.settings-toggle-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.toggle-switch{position:relative;display:inline-block;width:48px;height:26px;flex-shrink:0}
.toggle-switch input{opacity:0;width:0;height:0}
.toggle-slider{position:absolute;inset:0;background:rgba(255,255,255,.15);border-radius:26px;cursor:pointer;transition:.3s}
.toggle-slider:before{content:"";position:absolute;width:20px;height:20px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.3s}
.toggle-switch input:checked + .toggle-slider{background:#00c853}
.toggle-switch input:checked + .toggle-slider:before{transform:translateX(22px)}
.settings-bonus-preview{font-size:.75rem;color:#00e676;margin-top:8px;padding:8px 10px;background:rgba(0,200,83,.08);border-radius:8px;text-align:center}

/* ── Bonus banner ────────────────────────────────────────── */
.bonus-banner{background:linear-gradient(135deg,rgba(0,200,83,.15),rgba(0,230,118,.08));border:1px solid rgba(0,200,83,.35);border-radius:12px;padding:10px 14px;color:#00e676;font-size:.82rem;font-weight:700;text-align:center;margin-bottom:14px;animation:bonusPulse 2s infinite}
@keyframes bonusPulse{0%,100%{opacity:1}50%{opacity:.75}}

/* ── Admin: per-stake bot range grid ─────────────────────── */
.bot-range-grid{display:flex;flex-direction:column;gap:8px;margin:6px 0 4px}
.bot-range-row{display:flex;align-items:center;gap:8px}
.bot-range-row .brr-stake{flex:0 0 70px;font-size:.8rem;font-weight:700;color:var(--text-dim,#aaa)}
.bot-range-row .brr-in{flex:1;min-width:0;text-align:center;margin:0;padding:8px 4px}
.bot-range-row .brr-dash{color:var(--text-dim,#aaa);font-weight:700}

/* ── Auto-mark toggle above the player card ──────────────── */
.auto-daub-row{display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,215,0,.18);border-radius:10px;
  padding:6px 10px;margin-bottom:8px}
.auto-daub-row .ad-label{font-family:var(--font-am);font-size:.72rem;font-weight:600;color:#ffd700;line-height:1.15}
/* called-but-not-yet-marked hint (manual mode) */
.gc-cell.gc-callable{box-shadow:inset 0 0 0 2px rgba(0,229,255,.9);animation:callablePulse 1.1s infinite}
@keyframes callablePulse{0%,100%{box-shadow:inset 0 0 0 2px rgba(0,229,255,.9)}50%{box-shadow:inset 0 0 0 2px rgba(0,229,255,.35)}}

/* Terms & Conditions modal */
.terms-overlay{position:fixed;inset:0;background:rgba(0,0,0,.65);z-index:1200;display:none}
.terms-overlay.active{display:block}
.terms-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(92vw,460px);max-height:82vh;background:#14142a;border:1px solid var(--border);border-radius:16px;z-index:1201;display:none;flex-direction:column;overflow:hidden}
.terms-modal.active{display:flex}
.terms-modal-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border);font-weight:700;color:#ffd700}
.terms-modal-head button{background:none;border:none;color:#fff;font-size:1.1rem;cursor:pointer;line-height:1}
.terms-modal-body{padding:14px 16px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.terms-modal-body h3{color:#00e5ff;font-size:.95rem;margin:16px 0 6px}
.terms-modal-body h3:first-child{margin-top:0}
.terms-modal-body p,.terms-modal-body li{font-size:.82rem;line-height:1.65;color:rgba(255,255,255,.82);margin:5px 0}
.terms-modal-body ul{padding-left:18px;margin:4px 0}
.terms-modal-body b{color:#fff}

/* ==================================================================
   BARON XOXO — game-specific styles (feed, stake chips, board)
   Reuses the shared theme tokens (--gold/--cyan/--green/--surface…).
   ================================================================== */

/* When inside a game the top bar is hidden — reclaim its space. */
body.in-game .screens { margin-top: 0; }
#screen-game { padding: 12px 14px 20px; }

/* ---------- HOME: layout ---------- */
#screen-home {
  display: none;
  flex-direction: column;
  gap: 12px;
  height: calc(100vh - 56px);
  padding: 12px 12px 14px;
}
#screen-home.active { display: flex; }

/* ---------- HOME: posted-rooms feed (top ~40%) ---------- */
/* Frosted-glass panels (feed + create), floating over the artwork. */
.xoxo-feed-wrap {
  flex: 0 0 40%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.055);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  overflow: hidden;
}
.xoxo-feed-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,229,255,0.06);
}
.xfh-title { font-family: var(--font-am); font-weight: 700; color: var(--cyan); font-size: 0.98rem; }
.xfh-count {
  min-width: 24px; text-align: center;
  background: var(--cyan); color: #04121a; font-weight: 800;
  border-radius: 99px; padding: 1px 8px; font-size: 0.82rem;
}
.xoxo-feed { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 11px; display: flex; flex-direction: column; gap: 10px; }
.xoxo-feed-empty {
  margin: auto; text-align: center; color: rgba(255,255,255,0.55);
  font-family: var(--font-am); font-size: 0.9rem; line-height: 1.8; padding: 20px;
}

/* Glassy room card in the feed */
.xoxo-room-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 10px 12px;
  animation: xoxoCardIn .25s ease;
}
@keyframes xoxoCardIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.xoxo-room-card.is-mine {
  /* Keep the gold FRAME so I can spot my own post, but no gold fill — same
     background as everyone else's cards. */
  border-color: rgba(255,215,0,0.55);
}
.xrc-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.xrc-avatar {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; color: #04121a;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  overflow: hidden;
}
.xrc-info { min-width: 0; }
.xrc-name { font-family: var(--font-am); font-weight: 600; color: #fff; font-size: 0.94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xrc-you { color: var(--gold); font-size: 0.78rem; }
.xrc-amounts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; }
.xrc-amt { font-size: 0.9rem; font-weight: 600; white-space: nowrap; line-height: 1.15; }
.xrc-amt b { font-weight: 800; font-size: 0.98rem; }
.xrc-amt-stake { color: rgba(255,255,255,0.78); margin-top: 3px; }
.xrc-amt-stake b { color: #fff; }
.xrc-amt-win { color: rgba(255,215,0,0.85); }
.xrc-amt-win b { color: var(--gold); }
.xrc-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.xrc-countdown {
  font-family: var(--font-head); font-weight: 700; font-size: 0.82rem;
  color: var(--cyan); background: rgba(0,229,255,0.12);
  border: 1px solid rgba(0,229,255,0.25);
  border-radius: 9px; padding: 5px 8px; text-align: center;
  /* Fixed width + equal-width digits so the box never resizes as the number changes
     (⏱ 50s vs ⏱ 11s vs ⏱ 8s) — otherwise the whole row jittered every second. */
  width: 58px; box-sizing: border-box; white-space: nowrap; flex: 0 0 auto;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}
.xrc-countdown.urgent { color: #ff8a8a; background: rgba(255,68,68,0.14); border-color: rgba(255,90,90,0.4); animation: xUrgent .8s infinite; }
@keyframes xUrgent { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* Glassy pill buttons — Join (teal glow, like "TP"), Cancel (red, like "SL"). */
.xrc-btn {
  border-radius: 12px; padding: 10px 16px;
  font-family: var(--font-am); font-weight: 700; font-size: 0.9rem; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .1s;
}
.xrc-join {
  color: #7dffd6;
  background: linear-gradient(135deg, rgba(0,210,150,0.30), rgba(0,120,110,0.18));
  border: 1px solid rgba(0,230,180,0.55);
}
.xrc-cancel {
  color: #ff9aa2;
  background: linear-gradient(135deg, rgba(255,70,90,0.24), rgba(150,20,40,0.16));
  border: 1px solid rgba(255,90,100,0.5);
}
.xrc-btn:active { transform: scale(0.94); }

/* ---------- HOME: stake selector + create ---------- */
.xoxo-create-wrap {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  background: rgba(255,255,255,0.055);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 13px 15px 15px;
}
.xcw-label { font-family: var(--font-am); font-weight: 600; color: rgba(255,255,255,0.65); font-size: 0.86rem; margin-bottom: 11px; }
/* Read-only badge showing the admin-selected game mode (players no longer pick it). */
.xcw-mode { font-family: var(--font-am); font-size: 0.84rem; color: rgba(255,255,255,0.7); margin-bottom: 11px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
  padding: 8px 12px; display: inline-block; align-self: flex-start; }
.xcw-mode b { color: var(--gold, #ffcf4a); font-weight: 800; }
.stake-chip-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-content: start;
}
/* Frosted glass chips with a soft inner highlight (like the reference pills). */
.stake-chip {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 16px;
  padding: 9px 4px;   /* height trimmed ~15% (vertical padding only; width unchanged) */
  font-family: var(--font-body); font-weight: 700; font-size: 1.06rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform .1s, border-color .18s, background .18s, color .18s;
}
.stake-chip:active { transform: scale(0.94); }
.stake-chip.active {
  border-color: rgba(0,230,180,0.65);
  background: linear-gradient(135deg, rgba(0,210,155,0.30), rgba(0,110,100,0.18));
  color: #7dffd6;
}
/* Game-mode selector (two chips) */
.mode-row { display: flex; gap: 10px; margin-bottom: 12px; }
.mode-chip {
  flex: 1; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; border-radius: 14px; padding: 11px 6px; cursor: pointer;
  font-family: var(--font-am); font-weight: 700; font-size: 0.92rem;
  transition: transform .1s, border-color .18s, background .18s, color .18s;
}
.mode-chip span { font-weight: 600; font-size: 0.72rem; opacity: 0.7; }
.mode-chip:active { transform: scale(0.96); }
.mode-chip.active {
  border-color: rgba(0,230,180,0.65);
  background: linear-gradient(135deg, rgba(0,210,155,0.30), rgba(0,110,100,0.18));
  color: #7dffd6;
}
.xoxo-create-btn {
  margin-top: 13px;
  border-radius: 16px;
}

/* ---------- GAME: top row — refresh (left) + Exit (right) ---------- */
.xoxo-game-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 12px; }
.xoxo-exit-link {
  background: none; border: none; padding: 6px 4px;
  color: rgba(255,255,255,0.78);
  font-family: var(--font-am); font-weight: 700; font-size: 1rem; letter-spacing: 0.04em;
  cursor: pointer;
}
.xoxo-exit-link:active { color: #fff; }

/* ---------- GAME: players + timer + pot ---------- */
.xoxo-game-top { display: flex; align-items: stretch; gap: 10px; margin-bottom: 16px; }
/* Player chip — matches the Ludo/Dama profile card: bordered rounded-square
   avatar + name below, no glassy box; turn shown as a gold glow on the avatar. */
.xgt-player {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; border: none; border-radius: 0; padding: 2px;
  position: relative; transition: none;
}
.xgt-player.active-turn { background: transparent; }
.xgt-player.active-turn .xgt-avatar { box-shadow: 0 0 14px rgba(255,215,0,.55); }
.xgt-sym { font-family: var(--font-head); font-weight: 900; font-size: 0.9rem; line-height: 1; }
.xgt-sym-x { color: var(--cyan); }
.xgt-sym-o { color: var(--gold); }
.xgt-nm { font-family: var(--font-am); font-weight: 700; font-size: 12px; color: #fff; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.xgt-center { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0 4px; }
.xgt-timer {
  font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: #fff;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(0,229,255,0.5); background: rgba(0,229,255,0.08);
}
.xgt-timer.urgent { color: #ff8a8a; border-color: rgba(255,80,90,0.75); background: rgba(255,68,68,0.12); animation: xUrgent .8s infinite; }
.xgt-pot { font-family: var(--font-head); font-weight: 800; color: var(--gold); font-size: 1rem; white-space: nowrap; line-height: 1.1; }
.xgt-stake { font-family: var(--font-head); font-weight: 700; color: rgba(255,255,255,0.72); font-size: 0.82rem; white-space: nowrap; line-height: 1.1; }

/* ---------- GAME: turn banner ---------- */
.xoxo-turn {
  text-align: center; font-family: var(--font-am); font-weight: 700; font-size: 1.02rem;
  min-height: 1.4em; margin-bottom: 14px;
}
.xoxo-turn.my-turn { color: #7dffd6; }
.xoxo-turn.opp-turn { color: rgba(255,255,255,0.55); }

/* ---------- mutual draw ---------- */
.xoxo-draw-btn {
  display: block; margin: 0 auto 12px; padding: 8px 20px; border: 1px solid rgba(125,255,214,0.5);
  border-radius: 999px; background: rgba(125,255,214,0.12); color: #7dffd6;
  font-family: var(--font-am); font-weight: 700; font-size: 0.92rem; cursor: pointer;
}
.xoxo-draw-btn:disabled { opacity: 0.6; cursor: default; border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.06); }
.xoxo-draw-btn:not(:disabled):active { transform: scale(0.96); }
.xoxo-draw-ov {
  position: fixed; inset: 0; z-index: 4200; background: rgba(0,0,0,0.62);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.xoxo-draw-card {
  background: var(--panel, #161b2e); border: 1px solid var(--border, #26324f); border-radius: 18px;
  padding: 22px 18px; max-width: 320px; width: 100%; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.xdc-emoji { font-size: 2.4rem; margin-bottom: 6px; }
.xdc-title { font-family: var(--font-am); font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.xdc-sub { font-family: var(--font-am); font-size: 0.86rem; color: var(--sub, #8892b0); margin-bottom: 16px; }
.xdc-btns { display: flex; gap: 10px; }
.xdc-btns button { flex: 1; padding: 11px 0; border-radius: 12px; border: none; font-family: var(--font-am); font-weight: 700; font-size: 0.95rem; cursor: pointer; }
.xdc-ok { background: #2ecc71; color: #06210f; }
.xdc-no { background: transparent; border: 1px solid var(--border, #26324f) !important; color: var(--sub, #8892b0); }
.xdc-btns button:active { transform: scale(0.97); }

/* ---------- GAME: the board ---------- */
.xoxo-board-wrap { display: flex; align-items: center; justify-content: center; }
.xoxo-board {
  width: min(86vw, 360px);
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
}
.xoxo-cell {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(2.4rem, 15vw, 4.2rem); line-height: 1;
  color: #fff; cursor: default;
  transition: transform .08s, border-color .15s, background .15s;
}
.xoxo-cell.x { color: var(--cyan); text-shadow: 0 0 18px rgba(0,229,255,0.5); }
.xoxo-cell.o { color: var(--gold); text-shadow: 0 0 18px rgba(255,200,0,0.45); }
.xoxo-cell.playable { cursor: pointer; border-color: rgba(0,230,180,0.5); background: rgba(0,230,180,0.07); }
.xoxo-cell.playable:active { transform: scale(0.94); }
.xoxo-cell.win { border-color: rgba(0,230,150,0.85); background: rgba(0,230,150,0.18); animation: xWin .6s ease; }
/* Move phase: slowly blink the border of the player's own (movable) marks. */
.xoxo-cell.can-move { animation: xCanMove 1.3s ease-in-out infinite; }
@keyframes xCanMove {
  0%, 100% { border-color: rgba(255,255,255,0.14); box-shadow: none; }
  50%      { border-color: rgba(0,230,180,0.95); box-shadow: 0 0 12px rgba(0,230,180,0.45); }
}
@keyframes xWin { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ---------- HOME: back-to-hub header ---------- */
.xoxo-home-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xhh-right { display: flex; align-items: center; gap: 8px; }
.xoxo-back {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-am);
  font-size: 0.82rem; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.xoxo-back:active { transform: scale(0.96); }

/* ---------- Avatars (feed + in-game) ---------- */
.xrc-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.xgt-avatar {
  width: 48px; height: 48px; border-radius: 14px;
  border: 3px solid #888;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 18px; color: #fff;
  background: #1b2742; background-size: cover; background-position: center;
  overflow: hidden; flex-shrink: 0; position: relative;
}
.xgt-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; display: block; }
/* Border colour encodes the symbol (like each Ludo player's colour). */
.xgt-x .xgt-avatar { border-color: var(--cyan); }
.xgt-o .xgt-avatar { border-color: var(--gold); }

/* ---------- 3-piece rule: picked-up mark ---------- */
.xoxo-cell.selected {
  border-color: var(--gold);
  background: rgba(255,215,0,0.16);
  box-shadow: 0 0 14px rgba(255,215,0,0.35);
}

/* ==================================================================
   XOXO themed background — maroon/plum gradient + handwritten "xoxo"
   watermark. Shown behind the home (stake) and game screens.
   ================================================================== */
/* The old fixed #xoxoBg layer sat at z-index:-1 and was hidden behind the body's
   opaque background, so the artwork is applied directly to the screen sections
   (in-flow → painted above the body background = always visible). */
#xoxoBg { display: none !important; }

/* XOXO artwork behind the home (stake) + game screens. A light dark overlay
   keeps panels/text readable; the maroon gradient is the fallback if the image
   can't load. The translucent feed/create/board panels let it show through. */
body.show-xoxo-bg #screen-home,
body.show-xoxo-bg #screen-game {
  background-color: #180810;
  background-image:
    linear-gradient(rgba(11,5,9,0.60), rgba(11,5,9,0.78)),
    var(--xoxo-bg-img),
    radial-gradient(ellipse 95% 70% at 50% 42%, #5a2138 0%, #431829 42%, #2a0f1b 72%, #180810 100%);
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
}
body.show-xoxo-bg #screen-game { min-height: 100vh; }

/* Paint the SAME viewport-anchored artwork on the top bar so it shows the theme
   background too. background-attachment:fixed anchors it to the viewport, so the
   bar's top slice lines up seamlessly with the screen background right below it. */
body.show-xoxo-bg .top-bar {
  background-color: #180810;
  background-image:
    linear-gradient(rgba(11,5,9,0.55), rgba(11,5,9,0.72)),
    var(--xoxo-bg-img),
    radial-gradient(ellipse 95% 70% at 50% 42%, #5a2138 0%, #431829 42%, #2a0f1b 72%, #180810 100%);
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
  backdrop-filter: none;
}

/* ---------- online count + refresh buttons ---------- */
.xfh-right { display: flex; align-items: center; gap: 8px; }
.xoxo-online {
  font-family: var(--font-am); font-weight: 700; font-size: 0.8rem;
  color: #7dffd6; background: rgba(0,210,155,0.14);
  border: 1px solid rgba(0,230,180,0.35);
  border-radius: 99px; padding: 2px 9px; white-space: nowrap;
}
.xoxo-ingame {
  font-family: var(--font-am); font-weight: 700; font-size: 0.8rem;
  color: #ffd66b; background: rgba(255,190,60,0.14);
  border: 1px solid rgba(255,200,80,0.35);
  border-radius: 99px; padding: 2px 9px; white-space: nowrap;
}
.xoxo-refresh {
  background: none; border: none; cursor: pointer;
  font-size: 1.05rem; line-height: 1; padding: 4px;
  color: #fff; opacity: 0.85;
}
.xoxo-refresh:active { transform: scale(0.9); }
.xoxo-refresh.spinning { animation: xoxoSpin .6s linear; }
@keyframes xoxoSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ===== emoji reactions (ported from Ludo) ===== */
.xgt-player{ position:relative; }
.xgt-body{ display:flex; flex-direction:column; align-items:center; gap:6px; width:100%; }
.pl-react{ position:absolute; left:50%; top:4px; transform:translateX(-50%); width:54px; height:54px;
  pointer-events:none; z-index:20; display:none; filter:drop-shadow(0 3px 5px rgba(0,0,0,.45)); }
.pl-react.show{ display:block; }
.pl-react svg{ width:100%!important; height:100%!important; }
.emoji-fab{ position:fixed; left:14px; bottom:16px; z-index:60; width:46px; height:46px;
  border-radius:50%; background:rgba(20,28,48,.85); border:1.5px solid rgba(255,255,255,.18);
  color:#fff; font-size:22px; display:flex; align-items:center; justify-content:center;
  cursor:pointer; -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  box-shadow:0 4px 14px rgba(0,0,0,.4); }
.emoji-fab:active{ transform:scale(.92); }
.emoji-backdrop{ position:fixed; inset:0; z-index:64; display:none; }
.emoji-backdrop.show{ display:block; }
.emoji-panel{ position:fixed; left:12px; bottom:70px; z-index:66; width:min(212px,72vw);
  background:rgba(16,22,38,.96); border:1px solid rgba(255,255,255,.14); border-radius:16px;
  padding:9px; box-shadow:0 10px 30px rgba(0,0,0,.5);
  transform:translateY(12px) scale(.96); opacity:0; pointer-events:none;
  transition:transform .16s ease, opacity .16s ease; }
.emoji-panel.open{ transform:translateY(0) scale(1); opacity:1; pointer-events:auto; }
.emoji-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.emoji-cell{ background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08);
  border-radius:12px; padding:2px; cursor:pointer; width:100%; aspect-ratio:1/1;
  display:flex; align-items:center; justify-content:center; }
.emoji-cell:active{ transform:scale(.9); background:rgba(255,255,255,.12); }
.emoji-cell svg{ width:100%!important; height:100%!important; }

/* ═══════════════ UI ICONS (replace user-facing emojis) ═══════════════ */
.ic { height: 1em; width: auto; vertical-align: -0.14em; display: inline-block;
  object-fit: contain; flex: none;
  pointer-events: none; -webkit-user-drag: none; }
.ic-lg { height: 1.5em; vertical-align: -0.28em; }
/* 🎮 / 👑 icons that replaced emoji: bump to match the emoji's visual size */
.ic[src$="/game.png"], .ic[src$="/crown.png"]{ height:1.3em; vertical-align:-0.24em; }
.ic-xl { height: 2.4em; vertical-align: middle; }
/* icons that live inside fixed-size icon spans fill their box */
.mnb-icon .ic, .wm-btn-icon .ic { height: 1.15em; vertical-align: -0.18em; }

/* icon fixes: remove hamburger box; white deposit/withdraw icons inside wallet modal */
.menu-toggle { background: none; border: none; }
.wm-btn-icon .ic { filter: brightness(0) invert(1); }

/* wallet balance font: plain system sans (NOT Orbitron) across all Baron apps */
#topBalance, .mbl-value, .wm-balance { font-family: -apple-system, 'Segoe UI', Roboto, 'Noto Sans Ethiopic', sans-serif !important; }

/* top-bar alignment: wallet icon vs number, and equal bell/hamburger sizing */
.top-balance { line-height:1; align-items:center; gap:6px; }
.top-balance .tb-coin { display:inline-flex; align-items:center; font-size:1rem; line-height:1; }
.top-balance .tb-coin .ic { height:1.15em; width:auto; vertical-align:middle; }
#topBalance { font-size:0.95rem; line-height:1; display:inline-flex; align-items:center; }
.notif-bell-btn > span:first-child { display: inline-flex; align-items: center; line-height: 1; }
.menu-toggle { justify-content: center; gap: 5px; height: auto; padding: 6px 10px; }
.menu-toggle span { width: 22px; height: 2.5px; }


/* top-bar: wallet pill compact (hamburger untouched); bell nudged toward the menu */
.menu-toggle { height: 34px; box-sizing: border-box; }
.top-balance { height: 28px; box-sizing: border-box; padding: 0 12px; }
.top-bar > div:last-child { gap: 2px !important; }
.notif-bell-btn { padding-right: 2px !important; }

/* side-menu link icons (support/channel/group) render white line-art */
#menuLinks .ic { filter: brightness(0) invert(1); }

/* ═══ xoxo lobby parity: back-to-game + private rooms + stake-alert bell/modal ═══ */
.back-to-game{ background:linear-gradient(135deg,#39d98a,#1fae6a); border:none; color:#04160d; font-weight:800;
  font-size:12px; padding:7px 12px; border-radius:10px; cursor:pointer; white-space:nowrap; }
.back-to-game:active{ transform:scale(.96); }
/* create-area header row: mode badge left, private-room + bell right */
.wt-head-row{ display:flex; align-items:center; gap:8px; margin-bottom:11px; }
.wt-head-row .xcw-mode{ margin-bottom:0; flex:1 1 auto; }
.wt-gear{ flex:0 0 auto; height:26px; padding:0 11px; border-radius:8px; border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05); color:var(--text-dim); font-size:11.5px; font-weight:800; cursor:pointer;
  display:flex; align-items:center; white-space:nowrap; }
.wt-gear:active{ transform:scale(.94); }
.wt-bell{ flex:0 0 auto; background:rgba(255,255,255,.06); border:1.5px solid rgba(255,255,255,.14);
  color:var(--gold); height:26px; padding:0 11px; border-radius:8px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; line-height:1; }
.wt-bell:active{ transform:translateY(1px); }
.wt-bell .ic{ height:16px; opacity:.5; }   /* dimmed to match the muted "private room" text */
.ic-lg{ height:1.4em; vertical-align:-0.26em; }
/* created-private-room key bar */
.private-box{ display:flex; width:100%; align-items:center; gap:8px; margin-bottom:11px;
  background:rgba(0,200,120,.12); border:1.5px solid rgba(0,200,120,.4); border-radius:10px; padding:7px 11px; }
.private-box .pb-txt{ font-size:14px; color:#eafff2; }
.private-box .pb-key{ color:#00e676; letter-spacing:1px; }
.private-box .pb-cancel{ flex:0 0 auto; margin-left:auto; background:none; border:none; cursor:pointer; font-size:15px; color:#ff6b6b; padding:2px 4px; }
/* private-room menu / join overlay */
.priv-ov{ position:fixed; inset:0; z-index:5000; background:rgba(0,0,0,.62); display:flex; align-items:center; justify-content:center; padding:24px; }
.priv-card{ background:#141b2e; border:1px solid rgba(255,255,255,.12); border-radius:18px; padding:20px; max-width:340px; width:100%; }
.priv-title{ font-weight:800; color:var(--gold); margin-bottom:14px; text-align:center; display:flex; align-items:center; justify-content:center; gap:6px; }
.priv-btn{ width:100%; background:linear-gradient(135deg,#0f9d58,#12c85a); border:none; color:#fff; font-weight:800; font-size:15px;
  padding:13px; border-radius:12px; cursor:pointer; margin-bottom:10px; display:flex; align-items:center; justify-content:center; gap:6px; }
.priv-btn-alt{ background:linear-gradient(135deg,#2f6bdc,#4d8cff); }
.priv-btn:active{ transform:scale(.98); }
.priv-close{ width:100%; background:transparent; border:1px solid rgba(255,255,255,.16); color:#9aa4bd; padding:10px; border-radius:12px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; }
.priv-input{ width:100%; text-align:center; font-size:16px; letter-spacing:3px; font-weight:700; padding:11px; border-radius:12px;
  border:1.5px solid rgba(255,255,255,.16); background:rgba(255,255,255,.06); color:#fff; margin-bottom:12px; }
.priv-preview{ min-height:0; }
.priv-found{ text-align:center; background:rgba(0,200,120,.12); border:1px solid rgba(0,200,120,.35); border-radius:10px; padding:10px; margin-bottom:12px; color:#eafff2; }
/* stake-alert modal (self-contained) */
.modal-back{ position:fixed; inset:0; background:rgba(4,8,18,.8); z-index:400; display:none; align-items:center; justify-content:center; padding:20px; }
.modal-back.open{ display:flex; }
.result-card{ background:#141c2b; border:1px solid rgba(255,255,255,.1); border-radius:18px; padding:20px; max-width:360px; width:100%; }
.result-btn{ background:linear-gradient(135deg,#4d8cff,#2f6bdc); border:none; color:#fff; font-weight:800; font-size:14px;
  padding:11px 14px; border-radius:12px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; }
.alert-card{ text-align:left; }
.alert-title{ font-size:18px; font-weight:900; color:var(--gold); margin-bottom:4px; display:flex; align-items:center; gap:6px; }
.alert-sub{ font-size:12.5px; color:var(--text-dim); margin-bottom:14px; line-height:1.4; }
.alert-toggle{ display:flex; align-items:center; gap:8px; font-size:14px; font-weight:700; margin-bottom:14px; cursor:pointer; }
.at-lbl{ flex:1; }
.alert-toggle input{ position:absolute; opacity:0; width:0; height:0; }
.at-switch{ position:relative; flex:0 0 auto; width:44px; height:26px; border-radius:13px; background:#3a4658; transition:background .18s ease; }
.at-knob{ position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.4); transition:transform .18s ease; }
.alert-toggle input:checked + .at-switch{ background:linear-gradient(135deg,#39d98a,#1fae6a); }
.alert-toggle input:checked + .at-switch .at-knob{ transform:translateX(18px); }
.alert-range{ display:flex; gap:10px; margin-bottom:16px; }
.alert-field{ flex:1; }
.alert-lbl{ font-size:11.5px; color:var(--text-dim); margin-bottom:4px; }
.alert-select{ width:100%; padding:9px 10px; border-radius:10px; background:#111a28; color:#e7ecf3; border:1px solid #2a3547; font-size:14px; }
.alert-btns{ display:flex; gap:10px; }
.alert-btns .result-btn{ flex:1; }
.alert-cancel{ background:#243144 !important; color:#e7ecf3 !important; }

/* Prevent the mobile long-press image menu (Open in / Download / Copy Link) from exposing asset URLs. */
img{ -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; -webkit-user-drag:none; }

.slow-net{ position:fixed; left:50%; bottom:14px; transform:translateX(-50%) translateY(12px);
  background:rgba(20,10,10,.92); color:#ffcaca; border:1px solid rgba(255,90,90,.5);
  font-family:var(--font-am,inherit); font-size:12.5px; font-weight:700; white-space:nowrap;
  padding:8px 16px; border-radius:99px; z-index:1400; opacity:0; pointer-events:none;
  transition:opacity .25s ease, transform .25s ease; box-shadow:0 6px 20px rgba(0,0,0,.5); }
.slow-net.show{ opacity:1; transform:translateX(-50%) translateY(0); }

.slow-net.slow{ background:rgba(40,28,4,.94); color:#ffe08a; border-color:rgba(255,200,60,.55); }
