/* KoraBingo - modern fintech look: near-black, soft glow, big numbers with dim decimals,
   pill buttons, rounded panels, floating pill navigation. Bingo balls keep their colours. */

@font-face { font-family: "BP Text"; src: url("/fonts/text.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face {
  font-family: "BP Ethiopic"; src: url("/fonts/ethiopic.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+1200-139F, U+2D80-2DDF, U+AB00-AB2F, U+1E7E0-1E7FF;
}

:root {
  --f-text: "BP Ethiopic", "BP Text", system-ui, "Segoe UI", Roboto, "Nyala", sans-serif;
  --f-display: var(--f-text);

  /* dark is the house look */
  --bg: #0b0b0d;
  --surface: #17171a;
  --surface-2: #222226;
  --surface-3: #2c2c31;
  --border: rgb(255 255 255 / 0.07);
  --text: #f5f5f7;
  --muted: #8e8e96;
  --faint: #5c5c64;
  --primary: #ffffff;          /* main action: white pill */
  --on-primary: #0b0b0d;
  --accent: #ffb547;           /* highlights, timer, winning cells */
  --on-accent: #1a1206;
  --brand-a: #ffb547; --brand-b: #ff4f81; --brand-c: #7b5cff;  /* the KoraBingo gradient */
  --success: #34d399;
  --danger: #ff5d6c;
  --dab: rgb(255 79 129 / 0.9);
  --called: #3a2f16;
  --mark: var(--dab);
  --mark-text: #ffffff;
  --glow: rgb(123 92 255 / 0.28);
  --b: #3b82f6; --i: #ef4444; --n: #8b8b95; --g: #22c55e; --o: #f59e0b;
  --radius: 22px;
  --radius-sm: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f4f6; --surface: #ffffff; --surface-2: #eeeef2; --surface-3: #e4e4ea; --border: rgb(0 0 0 / 0.06);
  --text: #111114; --muted: #6b6b75; --faint: #a4a4ad; --primary: #111114; --on-primary: #ffffff;
  --called: #fde9c0; --glow: rgb(123 92 255 / 0.16); --n: #6b6b75; color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--f-text);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  letter-spacing: -0.01em;
}
/* soft coloured glow behind the top of every screen */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 340px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 70% at 15% 0%, var(--glow), transparent 70%),
    radial-gradient(50% 60% at 90% 10%, rgb(255 79 129 / 0.14), transparent 70%);
}
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--text); text-underline-offset: 3px; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-c); outline-offset: 2px; }

/* Layout */
.shell { max-width: 560px; margin: 0 auto; padding: 0 16px calc(104px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 0 -16px 8px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.greet { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; font-size: 1.02rem; }
.greet span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem; color: #fff;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c));
}
.brand-dot {
  --c: var(--o); position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 40%, #fff), var(--c) 48%, color-mix(in srgb, var(--c) 72%, #000));
}
.brand-dot::before {
  content: "K"; position: absolute; inset: 22%; border-radius: 50%; background: #fff; color: var(--c);
  display: grid; place-items: center; font: 800 0.7rem/1 var(--f-text);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); border: 0; cursor: pointer; text-decoration: none;
  font-weight: 700; font-size: 0.92rem; font-variant-numeric: tabular-nums;
}
.icon-btn {
  position: relative; background: var(--surface-2); border: 0; border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer; display: grid; place-items: center; color: var(--text);
}
.badge {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg);
}

/* Floating pill navigation; the current tab is a white capsule */
.bottom-nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; justify-content: center; pointer-events: none;
}
.bottom-nav .inner {
  pointer-events: auto; display: flex; gap: 4px; width: 100%; max-width: 536px; padding: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px 6px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 0.7rem; font-weight: 600; transition: background-color 0.2s, color 0.2s;
}
.bottom-nav a.active { background: var(--primary); color: var(--on-primary); }
.bottom-nav svg { width: 21px; height: 21px; }

/* Panels */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card h2, .card h3 { margin: 0 0 12px; font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }

/* Buttons: pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0;
  border-radius: 999px; padding: 12px 20px; font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--text);
  text-decoration: none; transition: transform 0.08s ease, background-color 0.15s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.danger { background: color-mix(in srgb, var(--danger) 18%, var(--surface-2)); color: var(--danger); }
.btn.success { background: color-mix(in srgb, var(--success) 18%, var(--surface-2)); color: var(--success); }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 14px; font-size: 0.84rem; }
.btn.link { background: none; color: var(--text); padding: 4px; text-decoration: underline; text-underline-offset: 3px; }

/* Forms */
label { display: block; font-weight: 600; font-size: 0.84rem; margin-bottom: 6px; color: var(--muted); }
.field { margin-bottom: 12px; }
/* 16px text in inputs stops phones zooming in when a field is tapped */
input, select {
  width: 100%; padding: 13px 16px; font-size: 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--surface-2); outline: none; transition: border-color 0.15s, background-color 0.15s;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus { border-color: color-mix(in srgb, var(--text) 35%, transparent); background: var(--surface-3); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.switch span { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.switch:last-child { border-bottom: 0; }
.switch input { width: 46px; height: 28px; appearance: none; background: var(--surface-3); border: 0; border-radius: 14px; position: relative; cursor: pointer; padding: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left 0.18s; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); }
.switch input:checked { background: var(--success); }
.switch input:checked::after { left: 21px; }
/* Segmented tabs as pills (Deposit / Withdraw / History, admin tabs) */
.seg { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1 0 auto; border: 0; background: var(--surface-2); padding: 11px 18px; border-radius: 999px; font-weight: 600; cursor: pointer;
  color: var(--text); white-space: nowrap; text-transform: capitalize;
}
.seg button.active { background: var(--primary); color: var(--on-primary); }

/* Money: big number with dim decimals */
.dec { color: var(--muted); }
.cur { font-size: 0.45em; font-weight: 600; color: var(--muted); margin-left: 0.15em; letter-spacing: 0; }
.hero { padding: 8px 4px 18px; }
.hero-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.big-balance { font-size: 3.1rem; line-height: 1.05; font-weight: 800; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; margin-top: 4px; }

/* Auth */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-start; padding: 22px 0 16px; }
.auth-hero { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 12px; margin: 0 4px 10px; }
.auth-hero .brand-dot { width: 46px; height: 46px; margin: 0; grid-row: span 2; box-shadow: 0 0 0 3px rgb(255 207 92 / 0.25), 0 0 24px rgb(255 181 71 / 0.55); }
.auth-hero .brand-dot::before { font-size: 1.1rem; }
.auth-hero h1 {
  margin: 0; font-size: 1.7rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; text-align: left;
  background: linear-gradient(180deg, #fff6d5 0%, #ffcf5c 50%, #e0880f 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #5a2d00) drop-shadow(0 0 14px rgb(255 207 92 / 0.35));
}
.auth-hero .muted { margin-top: 2px; font-size: 0.86rem; text-align: left; }
.auth .card h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 14px; color: #fff; text-shadow: 0 2px 12px rgb(168 85 247 / 0.7); }
.auth .btn.link { padding: 2px 6px; }
.auth form > p { margin: 12px 0 0; }
.auth .btn.primary.block { margin-top: 4px; padding: 14px; }
/* Only tablets and computers get the centred form; phones keep it near the top (less movement when the keyboard opens) */
@media (min-height: 820px) and (min-width: 700px) { .auth { justify-content: center; } }
.notice {
  padding: 12px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  font-size: 0.9rem; margin-bottom: 12px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Game status: the gradient card */
.status {
  --state: #ffffff;
  position: relative; overflow: hidden; border-radius: 26px; padding: 18px 18px 16px; margin-bottom: 12px; color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(255 255 255 / 0.18), transparent 55%),
    linear-gradient(135deg, var(--brand-a) 0%, var(--brand-b) 45%, var(--brand-c) 100%);
  box-shadow: 0 18px 40px -18px rgb(123 92 255 / 0.6);
}
.status::after { /* faint bingo-ball circles, decoration only */
  content: ""; position: absolute; right: -40px; bottom: -60px; width: 190px; height: 190px; border-radius: 50%;
  border: 26px solid rgb(255 255 255 / 0.08); pointer-events: none;
}
.status.live { --state: #4ade80; }
.status.claiming { animation: pulse 0.9s infinite alternate; }
.status.finished { background: linear-gradient(135deg, #3a3a42, #24242a); box-shadow: none; }
.status-head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.status-head .small { font-size: 0.78rem; font-weight: 600; opacity: 0.85 !important; }
.status-title { font-size: 1.55rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.035em; margin-top: 4px; }
.status.live .status-title::before {
  content: ""; display: inline-block; width: 0.38em; height: 0.38em; border-radius: 50%; margin: 0 0.32em 0.12em 0;
  background: var(--state); vertical-align: middle; animation: blink 1.2s infinite; box-shadow: 0 0 0 4px rgb(74 222 128 / 0.25);
}
.status-timer {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  background: rgb(0 0 0 / 0.22); padding: 6px 14px; border-radius: 999px;
}
.status-sub { position: relative; opacity: 0.88; font-size: 0.88rem; margin-top: 4px; }
.stats { position: relative; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-top: 14px; }
.stat { padding: 10px 12px; border-radius: 16px; background: rgb(0 0 0 / 0.2); backdrop-filter: blur(6px); }
.stat b { display: block; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat:first-child b { font-size: 1.55rem; }
.stat .dec, .stat .cur { color: rgb(255 255 255 / 0.6); }
.stat > span { display: block; margin-top: 2px; font-size: 0.72rem; opacity: 0.8; font-weight: 600; }
.stat em { display: block; font-style: normal; font-size: 0.7rem; opacity: 0.95; margin-top: 2px; font-weight: 600; }
/* Winning-shape hint */
.hint { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.hint-label { font-size: 0.74rem; opacity: 0.8; font-weight: 600; }
.hint-item { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 0.85rem; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgb(0 0 0 / 0.18); }
.mini { display: inline-grid; grid-template-columns: repeat(5, 5px); gap: 2px; padding: 4px; border-radius: 8px; background: rgb(0 0 0 / 0.25); }
.mini i { width: 5px; height: 5px; border-radius: 1.5px; background: rgb(255 255 255 / 0.2); }
.mini i.c { background: rgb(255 255 255 / 0.4); }
.mini i.on { background: #fff; }
@keyframes pulse { from { filter: brightness(1); } to { filter: brightness(1.15); } }
@keyframes blink { 50% { opacity: 0.3; } }

/* Balls: coloured sphere, white centre disc */
.ball {
  --c: var(--n); position: relative; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 40%, #fff), var(--c) 48%, color-mix(in srgb, var(--c) 70%, #000));
}
.ball > span {
  width: 72%; height: 72%; border-radius: 50%; background: #fff; color: #111114;
  display: grid; place-content: center; text-align: center; font-size: 0.9rem; font-weight: 800; line-height: 0.95; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.ball small { display: block; font-size: 0.55em; color: var(--c); font-weight: 800; }
.ball.B { --c: var(--b); } .ball.I { --c: var(--i); } .ball.N { --c: var(--n); } .ball.G { --c: var(--g); } .ball.O { --c: var(--o); }
.ball.big { width: 88px; height: 88px; box-shadow: 0 12px 28px rgb(0 0 0 / 0.4); animation: pop 0.5s cubic-bezier(.2, 1.5, .4, 1); }
.ball.big > span { font-size: 2rem; }
@keyframes pop { from { transform: translateY(-30px) rotate(-120deg) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.ball-row { display: flex; align-items: center; gap: 14px; }
.ball-row .small { font-size: 0.8rem; font-weight: 600; margin-bottom: 8px; }
.recent { display: flex; gap: 6px; flex-wrap: wrap; }
.recent .ball { width: 34px; height: 34px; }
.recent .ball > span { width: 76%; height: 76%; font-size: 0.8rem; }

/* Called-number board */
.board { display: grid; grid-template-columns: 22px repeat(15, minmax(0, 1fr)); gap: 2px; margin-top: 12px; font-size: 0.64rem; font-weight: 700; letter-spacing: -0.04em; }
.board > * { min-width: 0; }
.board .lt { font-weight: 800; font-size: 0.8rem; display: grid; place-items: center; color: #fff; border-radius: 6px; }
.board .lt.B { background: var(--b); } .board .lt.I { background: var(--i); } .board .lt.N { background: var(--n); } .board .lt.G { background: var(--g); } .board .lt.O { background: var(--o); }
.board .n { aspect-ratio: 1; display: grid; place-items: center; border-radius: 5px; color: var(--faint); background: var(--surface-2); font-variant-numeric: tabular-nums; }
.board .n.on { background: var(--called); color: var(--accent); }
.board .n.last { background: var(--accent); color: var(--on-accent); }

/* Card picker */
.picker { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.picker > * { min-width: 0; }
.pick {
  aspect-ratio: 1; border-radius: 12px; border: 0; background: var(--surface-2); cursor: pointer; padding: 0; color: var(--text);
  font-weight: 700; font-size: 0.92rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; transition: transform 0.1s, background-color 0.15s;
}
.pick:hover:not(.sold) { background: var(--surface-3); }
.pick.sold { color: var(--faint); cursor: not-allowed; background: transparent; box-shadow: inset 0 0 0 1px var(--border); text-decoration: line-through; }
.pick.mine { background: var(--success); color: #062b1c; }
.pick.sel { background: var(--primary); color: var(--on-primary); transform: scale(1.06); }
.sticky-buy {
  position: sticky; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 5; margin: 12px -6px 0; padding: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border-radius: 999px; border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

/* Bingo cards */
.cards { display: grid; gap: 12px; min-width: 0; }
.cards > * { min-width: 0; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.bcard.win { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), 0 12px 30px -10px rgb(255 181 71 / 0.5); }
.bcard.dq { opacity: 0.45; filter: grayscale(1); }
.bcard-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 6px; font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; }
.grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.grid5 > * { min-width: 0; }
.grid5 .h { text-align: center; color: #fff; border-radius: 9px; padding: 4px 0; font-weight: 800; font-size: 1rem; }
.grid5 .h.B { background: var(--b); } .grid5 .h.I { background: var(--i); } .grid5 .h.N { background: var(--n); } .grid5 .h.G { background: var(--g); } .grid5 .h.O { background: var(--o); }
.cell {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); position: relative; isolation: isolate;
  border: 0; padding: 0; cursor: pointer; color: var(--text);
  font-size: 1.2rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
/* Two cards side by side: everything inside each card scales down to fit half the width */
.cards.two .bcard { padding: 8px; border-radius: 16px; }
.cards.two .bcard-head { font-size: 0.82rem; margin-bottom: 6px; gap: 4px; }
.cards.two .bcard-head .btn.sm { padding: 4px 9px; font-size: 0.72rem; }
.cards.two .togo { padding: 3px 7px; font-size: 0.64rem; }
.cards.two .grid5 { gap: 3px; }
.cards.two .grid5 .h { font-size: 0.72rem; padding: 2px 0; border-radius: 6px; }
.cards.two .cell { font-size: 0.82rem; border-radius: 7px; }
.cards.two .cell.free { font-size: 0.42rem; letter-spacing: 0; }
.cards.two .bingo-btn { margin-top: 8px; padding: 10px; font-size: 0.95rem; letter-spacing: 0.04em; }
/* The "Your cards" box already has padding; two cards inside it get a little more room */
.card > .cards.two { margin: 0 -6px; }
.cell.free { background: linear-gradient(135deg, var(--brand-a), var(--brand-b)); color: #fff; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; }
.cell.marked { color: var(--mark-text); }
.cell.marked::before {
  content: ""; position: absolute; inset: 10%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 35% 30%, #ff8db1, var(--brand-b) 60%, #c2185b);
  animation: dab 0.18s ease-out;
}
.cell.hint { box-shadow: inset 0 0 0 2px var(--accent); animation: pulse 0.8s infinite alternate; }
.cell.line { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
@keyframes dab { from { transform: scale(1.5); opacity: 0; } }
.togo { font-size: 0.74rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.togo.hot { background: var(--accent); color: var(--on-accent); }
.bingo-btn {
  margin-top: 12px; width: 100%; padding: 15px; border: 0; border-radius: 999px; cursor: pointer;
  font-size: 1.3rem; font-weight: 800; letter-spacing: 0.08em;
  background: var(--surface-2); color: var(--muted);
}
.bingo-btn.ready { color: #fff; background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 50%, var(--brand-c)); box-shadow: 0 10px 26px -8px rgb(255 79 129 / 0.7); animation: nudge 0.9s infinite; }
.bingo-btn.ready:active { transform: scale(0.98); animation: none; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-1deg); } 86% { transform: rotate(1deg); } }

/* Lists: rows with a round icon on the left and the amount on the right */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.amount { font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.pos { color: var(--success); }
.amount.neg { color: var(--text); }
.pill { font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.pending { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.pill.approved { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.pill.rejected { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.method { border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--surface-2); padding: 14px 6px; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.method.active { background: var(--primary); color: var(--on-primary); }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 8px; }
.copy-row b { font-variant-numeric: tabular-nums; word-break: break-all; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.76rem; word-break: break-all; }
.ok-box { padding: 13px 15px; border-radius: var(--radius-sm); font-weight: 600; }
.ok-box.good { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.ok-box.bad { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; }
.kpi b { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.78rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Overlay (bottom sheet feel) and toast */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / 0.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade 0.2s; }
.overlay .card { width: 100%; max-width: 420px; max-height: 90dvh; overflow: auto; border-radius: 26px; padding: 22px; background: var(--surface); }
.overlay .card h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.035em; }
@keyframes fade { from { opacity: 0; } }
.toast-wrap { position: fixed; top: 12px; left: 0; right: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--surface-3); color: var(--text); padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; max-width: 520px; animation: fade 0.2s; box-shadow: 0 10px 30px rgb(0 0 0 / 0.4); }
.toast.error { background: color-mix(in srgb, var(--danger) 30%, var(--surface-3)); }
.toast.success { background: color-mix(in srgb, var(--success) 26%, var(--surface-3)); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 55; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.conn { text-align: center; font-size: 0.82rem; padding: 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; }
ol.rules { padding-left: 20px; margin: 0; color: var(--muted); }
ol.rules li { margin-bottom: 7px; }

/* Amharic: Ethiopic letters read larger and heavier at the same size */
:root[lang="am"] .status-title { font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
:root[lang="am"] .card h2, :root[lang="am"] .card h3, :root[lang="am"] details summary { font-size: 1rem; font-weight: 700; }
:root[lang="am"] .auth .card h2 { font-size: 1.15rem; }
:root[lang="am"] .auth-hero .muted, :root[lang="am"] .status-sub, :root[lang="am"] .small { font-size: 0.8rem; }
:root[lang="am"] .stat > span, :root[lang="am"] .hint-label { font-size: 0.7rem; }
:root[lang="am"] .bcard-head, :root[lang="am"] .greet { font-size: 0.92rem; }
:root[lang="am"] .bottom-nav a { font-size: 0.64rem; }
:root[lang="am"] label, :root[lang="am"] .switch span { font-size: 0.84rem; }
:root[lang="am"] .seg button { padding: 10px 14px; font-size: 0.88rem; }

/* Inside Telegram: Telegram shows its own title bar and the visible height is smaller */
.tg .auth { padding-top: 12px; }
.tg .auth-hero { margin-bottom: 12px; }
.tg .auth-hero .muted { display: none; }
.tg .auth-hero .brand-dot { grid-row: auto; width: 36px; height: 36px; }
.tg .auth-hero .brand-dot::before { font-size: 0.95rem; }
.tg .auth-hero h1 { font-size: 1.4rem; }
.tg .topbar { padding: 8px 16px; }

@media (max-width: 380px) {
  .picker { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .cards.two { grid-template-columns: 1fr; }
  .big-balance { font-size: 2.6rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:first-child { grid-column: span 2; }
}
/* The casino screens (game and sign-in) are always dark, even when a player picked the light theme:
   their backgrounds are dark, so the text must stay light. Wallet and Profile follow the chosen theme. */
:is(body[data-page="play"], body[data-page="login"], body[data-page="register"], body[data-page="verify"], body[data-page="forgot"], body[data-page="reset"]) {
  --bg: #0b0b0d; --surface: #17171a; --surface-2: #222226; --surface-3: #2c2c31; --border: rgb(255 255 255 / 0.07);
  --text: #f5f5f7; --muted: #8e8e96; --faint: #5c5c64; --primary: #ffffff; --on-primary: #0b0b0d;
  --called: #3a2f16; --glow: rgb(123 92 255 / 0.28); --n: #8b8b95;
  color: var(--text); color-scheme: dark;
}

/* =====================================================================
   Casino game screen. Only the Play page; Wallet and Profile stay calm.
   ===================================================================== */
body[data-page="play"] { background: #08060f; }
body[data-page="play"]::before {
  height: 100%;
  background:
    radial-gradient(70% 45% at 50% 0%, rgb(124 58 237 / 0.38), transparent 70%),
    radial-gradient(45% 35% at 0% 30%, rgb(236 72 153 / 0.16), transparent 70%),
    radial-gradient(45% 35% at 100% 45%, rgb(255 181 71 / 0.12), transparent 70%);
}
/* slowly drifting sparkles */
body[data-page="play"]::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #ffd479 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 78% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 64% 38%, #ff8fc8 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 28% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 88% 70%, #ffd479 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 42% 88%, #c4b5fd 50%, transparent 51%);
  background-size: 100% 100%;
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.25; transform: translateY(0); } to { opacity: 0.7; transform: translateY(-8px); } }

/* --- The scoreboard as a casino marquee: royal purple, gold frame, chasing lights --- */
body[data-page="play"] .status {
  --gold: #ffcf5c;
  background:
    radial-gradient(120% 80% at 50% -10%, rgb(168 85 247 / 0.55), transparent 60%),
    linear-gradient(160deg, #2a0f4d 0%, #170829 55%, #0f061c 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 2px #b8860b, 0 0 0 4px #ffcf5c, 0 0 28px rgb(255 207 92 / 0.35), inset 0 0 40px rgb(0 0 0 / 0.5);
  padding-top: 22px; padding-bottom: 20px;
}
body[data-page="play"] .status::after { /* row of marquee bulbs along the top and bottom edges */
  content: ""; position: absolute; left: 10px; right: 10px; top: 7px; bottom: 7px; width: auto; height: auto; border: 0; border-radius: 20px;
  background:
    radial-gradient(circle, #fff6d5 0 2px, #ffcf5c 2.5px 3px, transparent 3.5px) 0 0 / 18px 8px repeat-x,
    radial-gradient(circle, #fff6d5 0 2px, #ffcf5c 2.5px 3px, transparent 3.5px) 9px 100% / 18px 8px repeat-x;
  animation: chase 0.9s steps(2) infinite; opacity: 0.9;
}
@keyframes chase { to { background-position: 18px 0, -9px 100%; } }
body[data-page="play"] .status.finished { background: linear-gradient(160deg, #24212e, #121018); box-shadow: 0 0 0 2px #5b5566; }
body[data-page="play"] .status.finished::after { animation: none; opacity: 0.25; }
body[data-page="play"] .status-head .small { color: var(--gold); letter-spacing: 0.04em; }
body[data-page="play"] .status-title { text-shadow: 0 2px 14px rgb(168 85 247 / 0.7); }
body[data-page="play"] .stat { background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 207 92 / 0.18); }
/* jackpot digits: glowing gold */
body[data-page="play"] .stat:first-child { border-color: rgb(255 207 92 / 0.55); background: rgb(255 207 92 / 0.08); }
body[data-page="play"] .stat:first-child b {
  font-size: 1.8rem;
  background: linear-gradient(180deg, #fff3c4 0%, #ffcf5c 45%, #e09a10 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgb(255 207 92 / 0.45));
}
body[data-page="play"] .stat:first-child .dec, body[data-page="play"] .stat:first-child .cur { color: transparent; opacity: 0.75; }
body[data-page="play"] .stat:first-child > span { color: var(--gold); opacity: 1; }
body[data-page="play"] .stat em { color: #ffe39a; }
body[data-page="play"] .hint-item { background: rgb(255 255 255 / 0.07); }
body[data-page="play"] .mini i.on { background: var(--gold); }

/* --- Countdown: gold timer, red heartbeat in the last 5 seconds --- */
body[data-page="play"] .status-timer { color: #1a1206; background: linear-gradient(180deg, #ffe08a, #ffb547); box-shadow: 0 0 18px rgb(255 181 71 / 0.5); }
.status-timer.urgent { color: #fff !important; background: linear-gradient(180deg, #ff6b7a, #e11d48) !important; box-shadow: 0 0 22px rgb(225 29 72 / 0.7) !important; }
.status-timer.beat { animation: beat 0.5s ease-out; }
@keyframes beat { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* --- Number call: the ball drops in with a glowing ring in its letter colour --- */
.ball-stage { --c: var(--n); position: relative; flex: none; display: grid; place-items: center; }
.ball-stage.B { --c: var(--b); } .ball-stage.I { --c: var(--i); } .ball-stage.N { --c: var(--n); } .ball-stage.G { --c: var(--g); } .ball-stage.O { --c: var(--o); }
.ball-stage .ring {
  position: absolute; inset: -10px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent) 40%, transparent 70%);
  animation: halo 1.6s ease-out infinite;
}
@keyframes halo { 0% { transform: scale(0.7); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }
body[data-page="play"] .ball.big { animation: drop 0.7s cubic-bezier(.25, 1.6, .45, 1); box-shadow: 0 0 0 3px rgb(255 255 255 / 0.15), 0 14px 34px rgb(0 0 0 / 0.55); }
@keyframes drop {
  0% { transform: translateY(-120px) rotate(-200deg) scale(0.7); opacity: 0; }
  60% { transform: translateY(6px) rotate(10deg) scale(1.04); opacity: 1; }
  100% { transform: none; }
}
body[data-page="play"] .ball-row { padding: 4px 0; }
body[data-page="play"] .recent .ball { box-shadow: 0 4px 10px rgb(0 0 0 / 0.4); }

/* --- Card picker: solid arcade buttons (bold face, gold edge, 3D lip) --- */
body[data-page="play"] .picker { gap: 7px; }
body[data-page="play"] .pick {
  border-radius: 6px; position: relative; color: #f5f0ff; font-weight: 800; font-size: 0.98rem; letter-spacing: -0.04em;
  background: linear-gradient(180deg, #3a2f57 0%, #241c38 100%);
  border: 1px solid rgb(255 207 92 / 0.22);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 3px 0 #0d0916, 0 4px 8px rgb(0 0 0 / 0.35);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
body[data-page="play"] .pick:hover:not(.sold) { filter: brightness(1.18); }
body[data-page="play"] .pick:active:not(.sold) { transform: translateY(3px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 0 0 #0d0916; }
body[data-page="play"] .pick.sel {
  color: #1f1300; border-color: #fff1b8; transform: translateY(-1px);
  background: linear-gradient(180deg, #ffe08a 0%, #ffb547 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), 0 3px 0 #9a6200, 0 0 16px rgb(255 207 92 / 0.55);
}
body[data-page="play"] .pick.mine {
  color: #04261a; border-color: #a7f3d0;
  background: linear-gradient(180deg, #6ee7b7 0%, #10b981 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 3px 0 #065f46;
}
body[data-page="play"] .pick.sold {
  color: #4b4560; border-color: transparent; text-decoration: line-through;
  background: rgb(255 255 255 / 0.035); box-shadow: none;
}
body[data-page="play"] .sticky-buy .btn.primary { background: linear-gradient(180deg, #ffe08a, #ffb547); color: #2a1a00; box-shadow: 0 6px 20px -4px rgb(255 181 71 / 0.6); }

/* --- Cards: gold glow when one number away --- */
body[data-page="play"] .bcard { background: linear-gradient(180deg, #1a1426, #120d1c); border-color: rgb(167 139 250 / 0.16); }
.bcard.hot { border-color: transparent; animation: hotcard 1s ease-in-out infinite alternate; }
@keyframes hotcard {
  from { box-shadow: 0 0 0 2px #ffcf5c, 0 0 14px rgb(255 207 92 / 0.35); }
  to { box-shadow: 0 0 0 2px #ffcf5c, 0 0 30px rgb(255 207 92 / 0.7); }
}
.bcard.hot .togo.hot { background: linear-gradient(180deg, #ffe08a, #ffb547); color: #2a1a00; animation: pulse 0.6s infinite alternate; }
body[data-page="play"] .cell { background: rgb(255 255 255 / 0.06); }
body[data-page="play"] .cell.free { background: linear-gradient(135deg, #ffe08a, #ffb547 45%, #ff4f81); color: #2a1a00; }
body[data-page="play"] .cell.line { background: rgb(255 207 92 / 0.3); }
body[data-page="play"] .cell.marked::before { box-shadow: 0 0 12px rgb(255 79 129 / 0.6); animation: dabsplash 0.35s ease-out; }
@keyframes dabsplash { 0% { transform: scale(1.8); opacity: 0; } 60% { transform: scale(0.92); opacity: 1; } 100% { transform: scale(1); } }
body[data-page="play"] .bcard.win { box-shadow: 0 0 0 3px #ffcf5c, 0 0 36px rgb(255 207 92 / 0.6); }

/* --- BINGO button: shiny gold with a sweeping light when it can be pressed --- */
body[data-page="play"] .bingo-btn { background: rgb(255 255 255 / 0.06); color: #6b6480; }
body[data-page="play"] .bingo-btn.ready {
  position: relative; overflow: hidden; color: #2a1a00; text-shadow: 0 1px 0 rgb(255 255 255 / 0.5);
  background: linear-gradient(180deg, #fff1b8 0%, #ffcf5c 40%, #e09a10 100%);
  box-shadow: 0 0 0 2px #fff1b8 inset, 0 10px 30px -6px rgb(255 181 71 / 0.8);
}
body[data-page="play"] .bingo-btn.ready::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.75), transparent);
  animation: shine 1.4s ease-in-out infinite;
}
@keyframes shine { to { left: 130%; } }

/* --- Winners list and called-number board get a touch of gold --- */
body[data-page="play"] .board .n.on { background: rgb(255 207 92 / 0.16); color: #ffcf5c; }
body[data-page="play"] .board .n.last { background: linear-gradient(180deg, #ffe08a, #ffb547); color: #2a1a00; box-shadow: 0 0 10px rgb(255 207 92 / 0.6); }

/* --- Result popup on the game screen: gold-framed casino panel --- */
body[data-page="play"] .overlay .card {
  background: radial-gradient(120% 70% at 50% 0%, rgb(168 85 247 / 0.45), transparent 60%), linear-gradient(170deg, #241040, #120a1f);
  border: 0; box-shadow: 0 0 0 2px #b8860b, 0 0 0 4px #ffcf5c, 0 0 40px rgb(255 207 92 / 0.35);
}
body[data-page="play"] .overlay .card h2 {
  background: linear-gradient(180deg, #fff6d5 0%, #ffcf5c 50%, #e0880f 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #5a2d00);
}
body[data-page="play"] .overlay .list li { border-color: rgb(255 207 92 / 0.15); }
body[data-page="play"] .overlay .amount.pos { color: #ffcf5c; }

/* --- BINGO! splash and coin shower --- */
.splash { position: fixed; inset: 0; z-index: 58; display: grid; place-content: center; text-align: center; pointer-events: none; animation: splashfade 1.9s ease forwards;
  background: radial-gradient(circle at 50% 50%, rgb(8 6 15 / 0.75), rgb(8 6 15 / 0.45) 60%, transparent 85%); }
.splash-rays {
  position: absolute; left: 50%; top: 50%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; opacity: 0.35;
  background: repeating-conic-gradient(rgb(255 207 92 / 0.55) 0 8deg, transparent 8deg 20deg);
  animation: spin 6s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 0, transparent 55%); mask: radial-gradient(circle, #000 0, transparent 55%);
}
.splash-text {
  position: relative; font-size: clamp(3.5rem, 18vw, 6.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  background: linear-gradient(180deg, #fff6d5 0%, #ffcf5c 45%, #e0880f 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 #7a3e00) drop-shadow(0 0 26px rgb(255 207 92 / 0.8));
  animation: slam 0.6s cubic-bezier(.2, 1.6, .4, 1);
}
.splash-sub { background: rgb(0 0 0 / 0.45); padding: 6px 16px; border-radius: 999px; justify-self: center; position: relative; margin-top: 10px; font-weight: 700; font-size: 1.05rem; color: #fff; text-shadow: 0 2px 10px rgb(0 0 0 / 0.8); }
@keyframes slam { from { transform: scale(3) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes splashfade { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.confetti i.coin {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d5, #ffcf5c 45%, #c47f00 100%);
  box-shadow: inset 0 0 0 2px rgb(122 62 0 / 0.35);
}
.confetti i.spark { width: 6px; height: 14px; border-radius: 3px; background: linear-gradient(#ff8fc8, #a78bfa); }

/* =====================================================================
   Casino sign-in pages (login, sign-up, code, password reset)
   ===================================================================== */
:is(body[data-page="login"], body[data-page="register"], body[data-page="verify"], body[data-page="forgot"], body[data-page="reset"]) { background: #08060f; }
:is(body[data-page="login"], body[data-page="register"], body[data-page="verify"], body[data-page="forgot"], body[data-page="reset"])::before {
  height: 100%;
  background:
    radial-gradient(80% 45% at 50% 0%, rgb(124 58 237 / 0.45), transparent 70%),
    radial-gradient(50% 35% at 0% 40%, rgb(236 72 153 / 0.18), transparent 70%),
    radial-gradient(50% 35% at 100% 60%, rgb(255 181 71 / 0.14), transparent 70%);
}
:is(body[data-page="login"], body[data-page="register"], body[data-page="verify"], body[data-page="forgot"], body[data-page="reset"])::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 14%, #ffd479 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 82% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 70% 34%, #ff8fc8 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 20% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 90% 74%, #ffd479 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 38% 90%, #c4b5fd 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
/* B-I-N-G-O balls bouncing one after another */
.auth-balls { display: flex; justify-content: center; gap: 10px; margin: 2px 0 16px; }
.auth-balls .ball { width: 38px; height: 38px; animation: hop 1.6s ease-in-out infinite; box-shadow: 0 6px 12px rgb(0 0 0 / 0.45); }
.auth-balls .ball > span { font-size: 0.78rem; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-9px); } }
/* the form panel: purple with gold frame and marquee bulbs */
.auth .card {
  position: relative; overflow: hidden; border: 0; padding: 22px 18px 18px;
  background: radial-gradient(120% 70% at 50% 0%, rgb(168 85 247 / 0.32), transparent 60%), linear-gradient(170deg, #1f0e38, #110a1d);
  box-shadow: 0 0 0 2px #b8860b, 0 0 0 4px #ffcf5c, 0 0 28px rgb(255 207 92 / 0.28);
}
.auth .card::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: 6px; height: 8px; pointer-events: none;
  background: radial-gradient(circle, #fff6d5 0 2px, #ffcf5c 2.5px 3px, transparent 3.5px) 0 0 / 18px 8px repeat-x;
  animation: chase1 0.9s steps(2) infinite; opacity: 0.85;
}
@keyframes chase1 { to { background-position: 18px 0; } }
.auth label { color: #cbb8f0; }
.auth input { background: rgb(255 255 255 / 0.07); border: 1px solid rgb(167 139 250 / 0.22); color: #fff; }
.auth input::placeholder { color: #7d6f9c; }
.auth input:focus { background: rgb(255 255 255 / 0.1); border-color: #ffcf5c; box-shadow: 0 0 0 3px rgb(255 207 92 / 0.22); }
/* gold button with a sweeping shine */
.auth .btn.primary {
  position: relative; overflow: hidden; color: #2a1a00; font-weight: 800;
  background: linear-gradient(180deg, #fff1b8 0%, #ffcf5c 42%, #e09a10 100%);
  box-shadow: 0 0 0 1px #fff1b8 inset, 0 10px 26px -8px rgb(255 181 71 / 0.75);
}
.auth .btn.primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.7), transparent);
  animation: shine 2.4s ease-in-out infinite;
}
.auth .btn.link, .auth a { color: #ffcf5c; }
.auth .switch span { color: #e9e0ff; }
.auth .notice { background: rgb(255 207 92 / 0.1); border-color: rgb(255 207 92 / 0.35); color: #ffe7a8; }
.auth .muted { color: #a99cc8; }
/* Telegram / short screens: smaller balls */
.tg .auth-balls { margin-bottom: 12px; gap: 8px; }
.tg .auth-balls .ball { width: 30px; height: 30px; }
.tg .auth-balls .ball > span { font-size: 0.66rem; }
/* lite mode: no motion */
.lite .auth-balls .ball, .lite .auth .card::before, .lite .auth .btn.primary::after { animation: none !important; }

/* Live game banner on the sign-in pages */
.live-banner {
  display: block; width: 100%; margin: 0 0 14px; padding: 10px 14px; border: 0; border-radius: 16px; text-align: left; cursor: pointer; color: #fff;
  background: linear-gradient(90deg, rgb(255 207 92 / 0.16), rgb(255 79 129 / 0.12) 60%, rgb(123 92 255 / 0.16));
  box-shadow: inset 0 0 0 1px rgb(255 207 92 / 0.45), 0 6px 18px -8px rgb(255 181 71 / 0.5);
}
.lb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lb-main { font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-main b { color: #ffcf5c; font-variant-numeric: tabular-nums; }
.lb-sub { font-weight: 600; opacity: 0.85; font-size: 0.88rem; }
.lb-prize {
  flex: none; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff3c4, #ffcf5c 50%, #e09a10); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lb-meta { display: block; margin-top: 2px; font-size: 0.74rem; color: #cbb8f0; font-weight: 600; }
.lb-dot { display: inline-block; width: 8px; height: 8px; margin: 0 6px 1px 0; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 3px rgb(255 77 94 / 0.25); animation: blink 1s infinite; vertical-align: middle; }
.lb-row.live .lb-main { color: #fff; }
.tg .live-banner { margin-bottom: 10px; padding: 8px 12px; }
.lite .lb-dot { animation: none; }

/* Sign-in polish: +251 prefix, eye button, language switch, trust strip */
.phone-input { display: flex; align-items: stretch; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid transparent; transition: border-color 0.15s, box-shadow 0.15s; }
.phone-input .cc { display: grid; place-items: center; padding: 0 4px 0 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.phone-input input { background: transparent !important; border: 0 !important; box-shadow: none !important; padding-left: 8px; letter-spacing: 0.02em; }
.phone-input:focus-within { border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.pw-eye.on { color: var(--text); }
.lang-switch { display: flex; justify-content: flex-end; gap: 4px; margin: 0 0 8px auto; padding: 3px; width: max-content; border-radius: 999px; background: rgb(255 255 255 / 0.07); }
.lang-switch button { border: 0; background: none; color: var(--muted); padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 0.8rem; cursor: pointer; }
.lang-switch button.on { background: var(--primary); color: var(--on-primary); }
.trust { margin-top: 18px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.trust-label { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.trust-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; background: rgb(255 255 255 / 0.07); color: var(--text); }
.trust-pill.fair { color: #6ee7b7; background: rgb(52 211 153 / 0.1); }
.trust-license { font-size: 0.72rem; color: var(--muted); max-width: 340px; }
/* casino sign-in colours for the new pieces */
.auth .phone-input { background: rgb(255 255 255 / 0.07); border-color: rgb(167 139 250 / 0.22); }
.auth .phone-input .cc { color: #ffcf5c; }
.auth .phone-input:focus-within { border-color: #ffcf5c; box-shadow: 0 0 0 3px rgb(255 207 92 / 0.22); }
.auth .pw-eye { color: #a99cc8; }
.auth .pw-eye.on { color: #ffcf5c; }
.auth .lang-switch { background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 207 92 / 0.25); }
.auth .lang-switch button.on { background: linear-gradient(180deg, #ffe08a, #ffb547); color: #2a1a00; }
.tg .lang-switch { margin-bottom: 4px; }

/* "Get the app" banner under the header (after login) */
.appbar {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 8px 10px 10px; border-radius: 18px;
  background: linear-gradient(90deg, rgb(255 207 92 / 0.16), rgb(123 92 255 / 0.16));
  box-shadow: inset 0 0 0 1px rgb(255 207 92 / 0.4);
}
.appbar-icon { flex: none; width: 38px; height: 38px; border-radius: 11px; background: #1c1915; display: grid; place-items: center; }
.appbar-icon span { width: 26px; height: 26px; border-radius: 50%; background: #e48a00; color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 0.85rem; box-shadow: inset 0 0 0 5px #e48a00, inset 0 0 0 13px #fff; color: #e48a00; }
.appbar-text { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.appbar-text b { font-size: 0.9rem; }
.appbar-text span { font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .btn.sm { flex: none; padding: 8px 14px; font-size: 0.85rem; }
.appbar-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.appbar-x:hover { background: rgb(255 255 255 / 0.08); color: var(--text); }
body[data-page="play"] .appbar .btn.primary { background: linear-gradient(180deg, #ffe08a, #ffb547); color: #2a1a00; }

/* Get the app (sign-in page and Profile) */
.getapp h3 { margin: 0 0 10px; }
.getapp .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.getapp .btn + .btn, .getapp .getapp-hint + .btn { margin-top: 8px; }
.getapp-hint { margin: 8px 2px 0; line-height: 1.4; }
.getapp.compact { margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: rgb(255 255 255 / 0.05); box-shadow: inset 0 0 0 1px rgb(167 139 250 / 0.2); }
.getapp.compact h3 { font-size: 0.95rem; color: #ffcf5c; }
.auth .getapp .btn:not(.primary) { background: rgb(255 255 255 / 0.08); color: #fff; border: 1px solid rgb(255 207 92 / 0.35); }

/* Phone-first sign-in */
.phone-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: rgb(255 255 255 / 0.07); font-weight: 700; font-variant-numeric: tabular-nums; }
.phone-chip .btn.link { padding: 2px 4px; font-size: 0.85rem; }
.or-line { display: flex; align-items: center; gap: 10px; margin: 14px 0 12px; color: #a99cc8; font-size: 0.8rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: rgb(167 139 250 / 0.25); }
.auth .tg-continue { padding: 14px; font-size: 1.02rem; }
.auth .btn:not(.primary):not(.link) { background: rgb(255 255 255 / 0.08); color: #fff; border: 1px solid rgb(255 207 92 / 0.35); }

/* --- Lite mode (low-end phones): keep the look, drop the expensive parts --- */
.lite body::after, .lite .ball-stage .ring, .lite .splash-rays { display: none; }
.lite .status::after, .lite .bcard.hot, .lite .bingo-btn.ready::after { animation: none !important; }
.lite .topbar, .lite .bottom-nav .inner, .lite .sticky-buy, .lite .overlay, .lite .stat { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.lite body[data-page="play"] .stat:first-child b { filter: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
