:root {
  /* Dark casino emerald theme */
  --bg0: #020b07;
  --bg1: #05160e;
  --card: rgba(255, 255, 255, 0.05);
  --card2: rgba(255, 255, 255, 0.08);
  --text: rgba(233, 255, 243, 0.92);
  --muted: rgba(181, 235, 208, 0.66);
  --line: rgba(86, 170, 132, 0.22);
  --accent: #16a34a; /* emerald */
  --accent2: #22c55e; /* bright green */
  --gold: #d4af37;
  --gold2: #fbbf24;
  --danger: #ef4444;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --bottom-nav-h: 64px;
  --bottom-nav-space: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
}

:root[data-theme="light"] {
  --bg0: #f6f3ff;
  --bg1: #f1f7ff;
  --card: rgba(17, 24, 39, 0.06);
  --card2: rgba(17, 24, 39, 0.08);
  --text: rgba(17, 24, 39, 0.92);
  --muted: rgba(17, 24, 39, 0.62);
  --line: rgba(17, 24, 39, 0.14);
  --shadow: 0 14px 32px rgba(17, 24, 39, 0.10);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: "Noto Sans Ethiopic", "Noto Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 680px at 12% 8%, rgba(34,197,94,0.18), transparent 60%),
    radial-gradient(900px 680px at 88% 22%, rgba(212,175,55,0.12), transparent 62%),
    radial-gradient(900px 640px at 50% 110%, rgba(5, 150, 105, 0.16), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

:root[data-theme="light"] html, :root[data-theme="light"] body {
  background:
    radial-gradient(1100px 680px at 12% 6%, rgba(34,197,94,0.18), transparent 56%),
    radial-gradient(900px 640px at 92% 18%, rgba(212,175,55,0.10), transparent 56%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

#app {
  padding: 14px 14px calc(22px + var(--bottom-nav-space));
  max-width: 980px;
  margin: 0 auto;
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(2, 16, 10, 0.82);
  border-top: 1px solid rgba(86, 170, 132, 0.22);
  box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

:root[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.78);
  border-top: 1px solid var(--line);
  box-shadow: 0 -14px 34px rgba(17, 24, 39, 0.10);
}

.bottom-nav-inner {
  height: var(--bottom-nav-h);
  max-width: 980px;
  margin: 0 auto;
  padding: 0 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 4px;
}

.bn-item {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
}

.bn-item:active {
  transform: translateY(1px);
}

.bn-ic {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}

.bn-tx {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.bn-item.bn-active {
  color: rgba(251,191,36,0.95);
  background: rgba(212,175,55,0.12);
}

.bn-item.bn-active .bn-ic {
  transform: translateY(-1px);
}

@media (min-width: 840px) {
  .bottom-nav-inner { padding: 0 18px; }
}

/* ── Simple Pages (Scores/History/Wallet/Profile) ── */
.page-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
}

/* ── Wallet Page (Emerald) ── */
.wallet-page {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 14px;
}

.wallet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wallet-title {
  font-weight: 950;
  font-size: 20px;
  letter-spacing: 0.2px;
}

.wallet-user {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.wallet-user-ic {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.22);
}

.wallet-user-main { min-width: 0; }

.wallet-user-id {
  font-weight: 900;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-user-badge {
  margin-left: auto;
  font-weight: 900;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,0.34);
  background: rgba(212,175,55,0.10);
  color: rgba(251,191,36,0.95);
}

.wallet-user-badge.ok {
  border-color: rgba(34,197,94,0.38);
  background: rgba(34,197,94,0.10);
  color: rgba(34,197,94,0.95);
}

.wallet-tabs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.wt-btn {
  border: 1px solid transparent;
  background: var(--card);
  color: var(--muted);
  padding: 10px 8px;
  border-radius: 12px;
  font-weight: 950;
  font-size: 12px;
  cursor: pointer;
}

.wt-btn:active { transform: translateY(1px); }

.wt-btn.wt-active {
  border-color: rgba(34,197,94,0.28);
  background: linear-gradient(135deg, var(--card2), rgba(34,197,94,0.10));
  color: var(--text);
}

.wallet-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
}

.wallet-card.wallet-card-mini { padding: 12px 14px; }

.wallet-card-k {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.wallet-card-ic { opacity: 0.85; }

.wallet-card-v {
  margin-top: 8px;
  font-weight: 950;
  font-size: 22px;
  letter-spacing: 0.2px;
  color: var(--text);
}

.wallet-card-v.wallet-card-v-good { color: rgba(34,197,94,0.95); }

.wallet-empty {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  text-align: center;
}

.wallet-tx {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
}

.tx-left { min-width: 0; }
.tx-title { font-weight: 950; font-size: 13px; color: var(--text); }
.tx-sub { margin-top: 4px; font-weight: 800; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt { font-weight: 950; font-size: 13px; }
.tx-amt.pos { color: rgba(34,197,94,0.95); }
.tx-amt.neg { color: rgba(251,191,36,0.95); }

.page-title {
  font-weight: 900;
  font-size: 16px;
}

.page-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn.icon-btn-mini {
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

:root[data-theme="light"] .icon-btn {
  border: 1px solid rgba(17,24,39,0.14);
  background: rgba(255,255,255,0.72);
  color: rgba(17,24,39,0.82);
}

.icon-btn:active { transform: translateY(1px); opacity: 0.9; }

/* ── Scores ── */
.score-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.seg {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
}

.seg.seg-2 {
  grid-template-columns: repeat(2, 1fr);
}

.seg-btn {
  border: 1px solid transparent;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.82);
  padding: 10px 8px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}

.seg-btn:active { transform: translateY(1px); }

.seg-btn.seg-active {
  border-color: rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(22,163,74,0.22), rgba(212,175,55,0.10));
  color: rgba(255,255,255,0.95);
}

.score-bubbles {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sb {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #fff;
  border: 2px solid rgba(0,0,0,0.18);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 45%),
    linear-gradient(135deg, var(--av, #8b5cf6), rgba(0,0,0,0.15));
  box-shadow: 0 10px 18px rgba(0,0,0,0.25);
}

.score-caption {
  margin-top: 12px;
  text-align: center;
  font-weight: 900;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}

.score-empty {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.86);
  font-weight: 800;
  font-size: 12px;
  text-align: center;
}

.lb-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
}

.lb-row.me {
  border-color: rgba(34,197,94,0.45);
  background: rgba(34,197,94,0.10);
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 45%),
    linear-gradient(135deg, var(--av, #6366f1), rgba(0,0,0,0.16));
  flex-shrink: 0;
}

.lb-names {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lb-name {
  font-weight: 900;
  font-size: 13px;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-sub {
  font-weight: 800;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-score {
  font-weight: 900;
  font-size: 16px;
  color: rgba(255,255,255,0.92);
  flex-shrink: 0;
}

.page-note {
  margin-top: 12px;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.86);
  font-weight: 800;
  font-size: 12px;
}

.kv-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
  font-weight: 800;
}

.kv span:first-child {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.page-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* ── History List ── */
.history-empty {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.86);
  font-weight: 800;
  font-size: 12px;
  text-align: center;
}

.history-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.history-list.history-list2 {
  margin-top: 14px;
}

.h2-item {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  padding: 12px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
}

/* ── Profile ── */
.profile-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 14px;
}

.profile-hero {
  position: relative;
  border-radius: 18px;
  padding: 18px 14px 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(820px 360px at 12% 0%, rgba(34,197,94,0.18), transparent 58%),
    radial-gradient(740px 360px at 92% 10%, rgba(212,175,55,0.12), transparent 58%),
    rgba(0,0,0,0.14);
}

:root[data-theme="light"] .profile-hero {
  border: 1px solid rgba(17,24,39,0.10);
  background:
    radial-gradient(820px 360px at 12% 0%, rgba(34,197,94,0.16), transparent 55%),
    radial-gradient(740px 360px at 92% 10%, rgba(212,175,55,0.10), transparent 55%),
    rgba(255,255,255,0.55);
}

.profile-refresh {
  position: absolute;
  top: 10px;
  right: 10px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.18);
  overflow: hidden;
  display: grid;
  place-items: center;
}

:root[data-theme="light"] .profile-avatar {
  border-color: rgba(17,24,39,0.10);
  background: rgba(255,255,255,0.70);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.profile-avatar-fallback {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.92);
}

:root[data-theme="light"] .profile-avatar-fallback {
  color: rgba(17,24,39,0.88);
}

.profile-handle {
  margin-top: 12px;
  text-align: center;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.profile-sub {
  margin-top: 6px;
  text-align: center;
  color: rgba(255,255,255,0.72);
  font-weight: 800;
  font-size: 12px;
}

:root[data-theme="light"] .profile-sub {
  color: rgba(17,24,39,0.60);
}

.profile-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pstat {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
  padding: 12px;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 6px;
}

:root[data-theme="light"] .pstat {
  border-color: rgba(17,24,39,0.12);
  background: rgba(255,255,255,0.62);
}

.pstat-k {
  color: rgba(255,255,255,0.70);
  font-weight: 900;
  font-size: 12px;
}

:root[data-theme="light"] .pstat-k {
  color: rgba(17,24,39,0.62);
}

.pstat-v {
  font-weight: 900;
  font-size: 16px;
}

.profile-settings-title {
  margin-top: 16px;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.profile-settings {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.ps-row {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

:root[data-theme="light"] .ps-row {
  border-color: rgba(17,24,39,0.12);
  background: rgba(255,255,255,0.62);
}

.ps-action {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.ps-action:active { transform: translateY(1px); }

.ps-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ps-ic {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}

:root[data-theme="light"] .ps-ic {
  border-color: rgba(17,24,39,0.12);
  background: rgba(17,24,39,0.05);
}

.ps-tx {
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.72);
  font-weight: 900;
  font-size: 12px;
}

:root[data-theme="light"] .ps-right {
  color: rgba(17,24,39,0.62);
}

.ps-arrow {
  font-size: 18px;
  line-height: 1;
}

/* Switch */
.switch {
  position: relative;
  width: 46px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-ui {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
  transition: background 160ms ease, border-color 160ms ease;
}

:root[data-theme="light"] .switch-ui {
  background: rgba(17,24,39,0.08);
  border-color: rgba(17,24,39,0.14);
}

.switch-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
  transition: transform 160ms ease;
}

.switch input:checked + .switch-ui {
  background: rgba(22,163,74,0.26);
  border-color: rgba(22,163,74,0.40);
}

.switch input:checked + .switch-ui::after {
  transform: translateX(18px);
}

.h2-ic {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: 2px solid rgba(255,255,255,0.12);
}

.h2-ic.win {
  border-color: rgba(34,197,94,0.55);
  color: rgba(34,197,94,0.95);
  background: rgba(34,197,94,0.10);
}

.h2-ic.loss {
  border-color: rgba(239,68,68,0.55);
  color: rgba(239,68,68,0.95);
  background: rgba(239,68,68,0.08);
}

.h2-ic.no {
  border-color: rgba(249,115,22,0.55);
  color: rgba(249,115,22,0.95);
  background: rgba(249,115,22,0.08);
}

.h2-main {
  min-width: 0;
}

.h2-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.h2-status {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.h2-ref {
  margin-top: 4px;
  color: rgba(255,255,255,0.68);
  font-weight: 800;
  font-size: 12px;
}

.h2-right {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex-shrink: 0;
}

.h2-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.72);
  font-weight: 800;
  font-size: 12px;
}

.h2-amt {
  font-weight: 900;
  font-size: 13px;
}

.h2-amt.win { color: rgba(34,197,94,0.95); }
.h2-amt.loss { color: rgba(239,68,68,0.95); }
.h2-amt.no { color: rgba(249,115,22,0.95); }

.h-item {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(0,0,0,0.16);
  padding: 12px;
}

.h-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.h-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.h-badge.win {
  border-color: rgba(34,197,94,0.55);
  background: rgba(34,197,94,0.12);
  color: rgba(34,197,94,0.95);
}

.h-badge.loss {
  border-color: rgba(239,68,68,0.55);
  background: rgba(239,68,68,0.10);
  color: rgba(239,68,68,0.95);
}

.h-badge.no {
  border-color: rgba(249,115,22,0.55);
  background: rgba(249,115,22,0.10);
  color: rgba(249,115,22,0.95);
}

.h-amt {
  font-weight: 900;
  font-size: 14px;
}

.h-amt.win { color: rgba(34,197,94,0.95); }
.h-amt.loss { color: rgba(239,68,68,0.95); }
.h-amt.no { color: rgba(249,115,22,0.95); }

.h-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255,255,255,0.86);
  font-size: 12px;
  font-weight: 800;
}

.h-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

.h-sub {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.h-sub .right {
  color: rgba(255,255,255,0.72);
  font-weight: 800;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.10));
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, rgba(22,163,74,0.95), rgba(212,175,55,0.42));
}
.title { font-weight: 800; font-size: 16px; line-height: 1.1; }
.subtitle { color: var(--muted); font-size: 12px; margin-top: 2px; }

.chips { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; }
.chip {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(86, 170, 132, 0.26);
  background: rgba(2, 16, 10, 0.55);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.86);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.chip-accent {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(5, 36, 24, 0.68);
}

.chip-good {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(3, 30, 20, 0.68);
}

.chip-num-bonus {
  color: #fbbf24;
  font-weight: 900;
}

.chip-num-balance {
  color: #a855f7;
  font-weight: 900;
}

.chip-live {
  border-color: rgba(34,197,94,0.55);
  background: rgba(34,197,94,0.10);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(34,197,94,1);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.16);
}

.notice {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.12);
  color: rgba(255,255,255,0.92);
}

.view { margin-top: 14px; }

.h { font-weight: 800; font-size: 15px; }
.p { color: var(--muted); font-size: 12px; margin-top: 4px; }

.btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 6px 10px; font-size: 11px; }
.btn-primary {
  border-color: rgba(34,197,94,0.5);
  background: rgba(34,197,94,0.16);
}

/* ── Wallet Balance Bar ── */
.wallet-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
}
.wallet-bar-icon { font-size: 18px; }
.wallet-bar-amount {
  margin-left: auto;
  font-weight: 900;
  font-size: 16px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.wb-k {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.wb-v {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}

.wb-sep {
  opacity: 0.35;
  font-weight: 800;
}

/* ── Lobby Title ── */
.lobby-title {
  text-align: center;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 2px;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding: 10px 16px;
  border: 2px solid #fbbf24;
  border-radius: 12px;
}

/* ── Room Table ── */
.room-table-wrap {
  position: relative;
  margin-top: 12px;
  border-radius: 14px;
}

/* Four snake lines — each covers one side, animates in sequence */
.snake-top, .snake-right, .snake-bottom, .snake-left {
  position: absolute;
  background: #ffffff;
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
}

/* TOP: slides left→right */
.snake-top {
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  animation: snake-top 8s linear infinite;
}
/* RIGHT: slides top→bottom, starts after top finishes (25%) */
.snake-right {
  top: 0; right: 0;
  width: 2px;
  height: 0%;
  animation: snake-right 8s linear infinite;
}
/* BOTTOM: slides right→left, starts after right finishes (50%) */
.snake-bottom {
  bottom: 0; right: 0;
  height: 2px;
  width: 0%;
  animation: snake-bottom 8s linear infinite;
}
/* LEFT: slides bottom→top, starts after bottom finishes (75%) */
.snake-left {
  bottom: 0; left: 0;
  width: 2px;
  height: 0%;
  animation: snake-left 8s linear infinite;
}

@keyframes snake-top {
  0%        { width: 0%;   left: 0;    opacity: 1; }
  24%       { width: 100%; left: 0;    opacity: 1; }
  25%       { width: 0%;   left: 100%; opacity: 0; }
  100%      { width: 0%;   left: 0;    opacity: 0; }
}
@keyframes snake-right {
  0%,  25%  { height: 0%;   top: 0;    opacity: 0; }
  26%       { height: 0%;   top: 0;    opacity: 1; }
  49%       { height: 100%; top: 0;    opacity: 1; }
  50%       { height: 0%;   top: 100%; opacity: 0; }
  100%      { height: 0%;   top: 0;    opacity: 0; }
}
@keyframes snake-bottom {
  0%,  50%  { width: 0%;   right: 0;    opacity: 0; }
  51%       { width: 0%;   right: 0;    opacity: 1; }
  74%       { width: 100%; right: 0;    opacity: 1; }
  75%       { width: 0%;   right: 100%; opacity: 0; }
  100%      { width: 0%;   right: 0;    opacity: 0; }
}
@keyframes snake-left {
  0%,  75%  { height: 0%;   bottom: 0;    opacity: 0; }
  76%       { height: 0%;   bottom: 0;    opacity: 1; }
  99%       { height: 100%; bottom: 0;    opacity: 1; }
  100%      { height: 0%;   bottom: 100%; opacity: 0; }
}

.room-table {
  position: relative;
  z-index: 1;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.room-table-header {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.4fr;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.room-table-header span:last-child {
  text-align: right;
  padding-right: 4px;
}

.room-row {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.4fr;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.room-row:last-child { border-bottom: none; }

.room-bet {
  font-weight: 900;
  font-size: 15px;
  color: var(--text);
}
.room-win {
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.room-win-amount {
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
}
.room-player-count {
  font-weight: 700;
  font-size: 11px;
  color: rgba(251,191,36,0.85);
}
.room-status-join {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.room-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0;
}

.status-badge {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,0.38);
  background: rgba(212,175,55,0.10);
  color: rgba(251,191,36,0.95);
  white-space: nowrap;
}
.status-badge.status-running {
  border-color: rgba(34,197,94,0.45);
  background: rgba(34,197,94,0.12);
  color: rgba(34,197,94,0.92);
}

.status-badge.status-waiting-players {
  border-color: rgba(168,85,247,0.45);
  background: rgba(168,85,247,0.12);
  color: rgba(216,180,254,0.95);
}

.btn-join {
  border: none;
  background: #9333ea;
  color: #fff;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}
.btn-join:active { transform: translateY(1px); opacity: 0.9; }
.btn-join:disabled {
  background: #6b21a8;
  opacity: 0.55;
  cursor: not-allowed;
}

.lobby-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 4px;
}
.lobby-footer-text {
  color: var(--muted);
  font-size: 11px;
}

.small { color: var(--muted); font-size: 12px; }

/* ── Game Layout (two-column like Wana Bingo) ── */
.game-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

/* Drawn numbers panel (left) */
.drawn-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 8px;
  overflow: hidden;
}

.bingo-col-headers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.col-hdr {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  justify-self: center;
}
.col-b { background: #3b82f6; }
.col-i { background: #ef4444; }
.col-n { background: #22c55e; }
.col-g { background: #a855f7; }
.col-o { background: #f97316; }

.drawn-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}

/* 75-number drawn board: white box, green text; called = amber; current = bright green */
.drawn-num {
  padding: 5px 0;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: #ffffff;
  border-radius: 6px;
  background: #9333ea;
  border: 1px solid #7e22ce;
}
.drawn-num.called {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  font-weight: 900;
}
.drawn-num.current-num {
  background: #22c55e;
  border-color: #16a34a;
  color: #ffffff;
  font-weight: 900;
}

/* Info panel (right) */
.info-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.countdown-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  font-weight: 700;
}
.countdown-status {
  color: #22c55e;
  font-weight: 900;
  font-size: 14px;
}

.current-call-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
}
.current-call-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 36px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(22,163,74,0.95), rgba(212,175,55,0.55));
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  padding: 0 12px;
}

.recent-calls {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.recent-chip {
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
}
.recent-chip.rc-b { background: #3b82f6; }
.recent-chip.rc-i { background: #ef4444; }
.recent-chip.rc-n { background: #22c55e; }
.recent-chip.rc-g { background: #a855f7; }
.recent-chip.rc-o { background: #f97316; }

/* Player's bingo card */
.my-card-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 8px;
}
.bingo-card-headers { margin-bottom: 4px; }
.bingo-card-headers .col-hdr { width: 100%; height: auto; padding: 4px 0; border-radius: 6px; font-size: 12px; }

.bingo-card {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.my-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.my-card-panel {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0,0,0,0.14);
}

.my-card-panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  margin-bottom: 8px;
}

.my-card-panel-title .label {
  font-size: 12px;
  color: rgba(255,255,255,0.92);
}

.my-card-panel-title .hint {
  font-size: 11px;
  color: var(--muted);
}

@media (min-width: 840px) {
  .my-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.bc-cell {
  padding: 8px 0;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.15);
}
.bc-cell.bc-marked {
  background: #22c55e;
  border-color: #16a34a;
  color: #ffffff;
}
.bc-cell.bc-free {
  background: #111111;
  border-color: rgba(212,175,55,0.60);
  color: #fbbf24;
  font-size: 16px;
}

/* Called numbers that are available to mark */
.bc-cell.bc-callable {
  cursor: pointer;
  border-color: rgba(255,255,255,0.35);
}
.bc-cell.bc-callable:hover {
  border-color: #22c55e;
  background: rgba(34,197,94,0.20);
}

.cartela-number-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
}
.cartela-num-val {
  color: #22c55e;
  font-weight: 900;
  font-size: 16px;
}

/* Bingo button */
.btn-bingo {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
  letter-spacing: 1px;
}
.btn-bingo:active { transform: translateY(1px); opacity: 0.9; }

/* Bottom bar */
.game-bottom-bar {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.btn-leave {
  flex: 1;
  padding: 12px;
  border: 2px solid #f97316;
  border-radius: 12px;
  background: transparent;
  color: #f97316;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}
.btn-leave:active { opacity: 0.8; }
.btn-refresh {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #22c55e;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}
.btn-refresh:active { opacity: 0.8; }
.poll-status { text-align: center; margin-top: 4px; }

/* ── Game Top Bar ── */
.game-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.game-topbar-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.game-topbar-btn:active { transform: translateY(1px); }
.game-topbar-btn .voice-slash { display: none; }
.game-topbar-btn.voice-off .voice-slash { display: block; }
.game-topbar-btn.voice-off { opacity: 0.75; }

.game-topbar-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.18);
  flex: 1;
  min-width: 50px;
}

.game-topbar-label {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-topbar-value {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}

/* ── Game Timer ── */
.game-timer {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(212,175,55,0.42);
  background: rgba(212,175,55,0.10);
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  animation: timerPulse 1.5s infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── Cartela Selection (in game view) ── */
.cartela-header {
  margin: 10px 2px 4px;
  font-size: 14px;
}

.cartela-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cartela-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  /* Reserve space at bottom for preview + join button */
  padding-bottom: 170px;
}

.cartela-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  position: sticky;
  bottom: 10px;
  padding-bottom: 6px;
  z-index: 2;
  justify-items: center;
}

.my-boards-bar {
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  padding: 10px;
}

.my-boards-title {
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.92);
}

.my-boards-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.board-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.92);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.board-chip.active {
  border-color: rgba(34,197,94,0.6);
  background: rgba(34,197,94,0.14);
}

.board-chip .x {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.25);
  font-size: 12px;
  line-height: 1;
  opacity: 0.85;
}

.board-chip .x:hover {
  opacity: 1;
  border-color: rgba(239,68,68,0.55);
}

/* Multi-card tabs (during play) */
.my-cards-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.card-tab {
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.92);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}

.card-tab.active {
  border-color: rgba(59,130,246,0.65);
  background: rgba(59,130,246,0.18);
}

.cartela-cell {
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.16);
  background: rgba(255,255,255,0.92);
  padding: 10px 0;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: rgba(0,0,0,0.88);
  cursor: pointer;
  transition: all 0.15s;
}

.cartela-cell:hover:not(.taken) {
  border-color: rgba(34,197,94,0.55);
  background: rgba(220, 252, 231, 0.96);
}

.cartela-cell.selected {
  border-color: rgba(34,197,94,0.80);
  background: rgba(187, 247, 208, 0.98);
  color: rgba(0,0,0,0.92);
  box-shadow: 0 0 0 2px rgba(34,197,94,0.18) inset, 0 10px 18px rgba(0,0,0,0.25);
}

.cartela-cell.taken {
  opacity: 1;
  cursor: not-allowed;
  border-color: rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.55);
  color: rgba(0,0,0,0.35);
}

/* Cartela preview */
.cartela-preview {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #000;
  padding: 8px;
  max-width: 220px;
}

.cartela-preview-sub {
  color: rgba(255,255,255,0.92);
  font-weight: 900;
  font-size: 12px;
}

.cartela-preview-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.cp-cell {
  padding: 6px 0;
  text-align: center;
  font-weight: 900;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.22);
  background: #fff;
  color: #000;
  font-size: 11px;
}

.cp-cell.cp-free {
  border-color: rgba(22,163,74,0.55);
  background: #fff;
}

.cartela-footer {
  margin-top: 12px;
  text-align: center;
}

.btn-lg {
  padding: 12px 20px;
  font-size: 14px;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Game-Over Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;              /* hidden by default */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}
.modal-overlay.active {
  display: flex;              /* shown only when .active class is added */
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px 22px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.25s ease;
}
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-icon {
  font-size: 48px;
  margin-bottom: 8px;
}
.modal-title {
  font-weight: 900;
  font-size: 22px;
  margin-bottom: 6px;
}
.modal-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.modal-meta {
  margin: -8px auto 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(86, 170, 132, 0.18);
  background: rgba(2, 16, 10, 0.40);
  color: rgba(181,235,208,0.82);
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.modal-meta .tag {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,0.34);
  background: rgba(212,175,55,0.10);
  color: rgba(251,191,36,0.95);
}

.modal-meta .tag.win-h { border-color: rgba(34,197,94,0.40); background: rgba(34,197,94,0.10); color: rgba(34,197,94,0.95); }
.modal-meta .tag.win-v { border-color: rgba(6,182,212,0.40); background: rgba(6,182,212,0.10); color: rgba(6,182,212,0.95); }
.modal-meta .tag.win-d { border-color: rgba(251,191,36,0.42); background: rgba(212,175,55,0.12); color: rgba(251,191,36,0.98); }
.modal-meta .tag.win-c { border-color: rgba(244,114,182,0.35); background: rgba(244,114,182,0.10); color: rgba(244,114,182,0.95); }
.modal-meta .tag.win-f { border-color: rgba(245,158,11,0.40); background: rgba(245,158,11,0.10); color: rgba(245,158,11,0.98); }

.modal-board {
  margin: 10px auto 18px;
  width: 100%;
  max-width: 300px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.mb-cell {
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.30);
  background: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 950;
  color: #111111;
  font-size: 13px;
}

.mb-cell.free {
  border-color: rgba(34,197,94,0.50);
  background: #ffffff;
  color: #16a34a;
}

.mb-cell.marked {
  border-color: rgba(212,175,55,0.60);
  background: rgba(212,175,55,0.15);
  color: #111111;
}

.mb-cell.win {
  border-color: #22c55e;
  background: #22c55e;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(34,197,94,0.55);
}

.mb-cell.win.win-v { border-color: #22c55e; background: #22c55e; color: #ffffff; box-shadow: 0 0 8px rgba(34,197,94,0.55); }
.mb-cell.win.win-d { border-color: #22c55e; background: #22c55e; color: #ffffff; box-shadow: 0 0 8px rgba(34,197,94,0.55); }
.mb-cell.win.win-c { border-color: #22c55e; background: #22c55e; color: #ffffff; box-shadow: 0 0 8px rgba(34,197,94,0.55); }
.mb-cell.win.win-f { border-color: #22c55e; background: #22c55e; color: #ffffff; box-shadow: 0 0 8px rgba(34,197,94,0.55); }
.modal-btn {
  width: 100%;
}

@media (min-width: 840px) {
  #app { padding: 18px 18px 26px; }
  .game-layout { grid-template-columns: 1.2fr 0.8fr; }
  .cartela-grid { grid-template-columns: repeat(13, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .game-layout { gap: 6px; }
  .drawn-panel { padding: 5px; }
  .drawn-grid { gap: 2px; }
  .drawn-num { font-size: 10px; padding: 3px 0; }
  .col-hdr { width: 22px; height: 22px; font-size: 11px; }
  .bc-cell { padding: 5px 0; font-size: 11px; }
  .info-panel { gap: 5px; }
  .countdown-bar { padding: 6px 8px; font-size: 12px; }
  .current-call-box { padding: 6px 8px; font-size: 12px; }
  .current-call-bubble { min-width: 40px; height: 30px; font-size: 13px; padding: 0 8px; }
  .recent-chip { padding: 3px 6px; font-size: 10px; }
  .my-card-section { padding: 5px; }
  .btn-bingo { padding: 10px; font-size: 15px; }
  .cartela-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .game-topbar { gap: 4px; padding: 6px 6px; }
  .game-topbar-chip { padding: 3px 6px; }
  .room-bet { font-size: 13px; }
  .room-win { font-size: 12px; }
}
