/* Football Bingo v2 — premium layout. Mobile first. Colours come from the site tokens in style.css. */
.bb { --gold: #f5c542; --gold-2: #ffdf7a; --card: #171717; --card-line: rgba(245,245,245,.14); max-width: 520px; margin: 0 auto; padding: 0 0 28px; user-select: none; -webkit-user-select: none; }
.bb button { font-family: inherit; }
.bb-h1 { font-family: var(--font-display); font-size: 26px; line-height: 1; margin: 10px 0 0; letter-spacing: .01em; }
.bb-sub { display: none; }

.bb-preview { background: rgba(255,122,46,.12); border: 1px dashed rgba(255,122,46,.6); color: #ffd2b5; border-radius: 8px; padding: 6px 10px; font-size: 11px; line-height: 1.35; margin: 6px 0 8px; }
.bb-h2h { display: none; background: rgba(56,201,119,.15); border: 1.5px solid var(--correct); padding: 10px 12px; border-radius: 8px; text-align: center; margin: 0 0 10px; font-size: 13px; font-weight: 600; }

/* ---------- Top bar: date, sound ---------- */
.bb-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.bb-date { display: flex; align-items: center; gap: 8px; }
.bb-arrow, .bb-fx { background: var(--surface); border: 1.5px solid var(--surface-line); color: var(--white); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.bb-arrow:disabled { opacity: .3; cursor: not-allowed; }
.bb-arrow:not(:disabled):hover, .bb-fx:hover { border-color: var(--flame-orange); }
.bb-fx[aria-pressed="true"] { border-color: var(--flame-orange); color: var(--flame-orange); }
.bb-datelabel { font-family: var(--font-display); font-size: 17px; color: var(--flame-orange); min-width: 96px; text-align: center; }

/* ---------- HUD: moves left, time, squares, lines ---------- */
.bb-hud { background: var(--surface); border: 1.5px solid var(--surface-line); border-radius: 14px; padding: 8px 12px 9px; margin-bottom: 8px; }
.bb-hudrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.bb-stat { display: flex; flex-direction: column; min-width: 0; }
.bb-stat.r { text-align: right; align-items: flex-end; }
.bb-lab { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.bb-num { font-family: var(--font-display); font-size: 34px; line-height: .95; color: var(--white); transition: color .2s; }
.bb-num.sm { font-size: 24px; }
.bb-num.warn { color: var(--gold); }
.bb-num.low { color: var(--flame-red); animation: bb-pulse 1s ease-in-out infinite; }
.bb-num.bump { animation: bb-bump .35s ease; }
.bb-timer { color: var(--flame-blue); }
.bb-meter { height: 6px; background: rgba(245,245,245,.1); border-radius: 99px; margin-top: 9px; overflow: hidden; }
.bb-meter > i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--flame-green), var(--gold)); border-radius: 99px; transform-origin: left; transition: width .35s cubic-bezier(.3,.8,.3,1), background .3s; }
.bb-meter.low > i { background: linear-gradient(90deg, var(--flame-red), var(--flame-orange)); }
.bb-cost { position: absolute; font-family: var(--font-display); font-size: 22px; pointer-events: none; z-index: 40; animation: bb-float .9s ease-out forwards; }
.bb-cost.minus { color: #ff6b6b; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.bb-cost.plus { color: var(--flame-green); }

/* ---------- The player card ---------- */
.bb-stage { position: relative; margin: 4px 0 14px; }
.bb-pile { position: absolute; left: 10px; right: 10px; top: 8px; height: 100%; background: #101010; border: 1.5px solid var(--card-line); border-radius: 18px; z-index: 0; }
.bb-pile.p2 { left: 20px; right: 20px; top: 15px; opacity: .6; }
.bb-pile.gone { display: none; }
.bb-card { position: relative; z-index: 1; background: linear-gradient(160deg, #1d1d1d, #121212); border: 2px solid var(--card-line); border-radius: 18px; padding: 22px 12px 8px; text-align: center; min-height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden; }
.bb-card.deal { animation: bb-deal .38s cubic-bezier(.2,.9,.3,1.1); }
.bb-card .idx { position: absolute; top: 9px; left: 12px; font-size: 10px; letter-spacing: .08em; color: var(--dim); font-weight: 700; text-transform: uppercase; }
.bb-card .tag { position: absolute; top: 8px; right: 10px; font-size: 10px; letter-spacing: .08em; font-weight: 800; text-transform: uppercase; color: #1a1305; background: linear-gradient(90deg, var(--gold), var(--gold-2)); padding: 3px 8px; border-radius: 99px; display: none; }
.bb-card.legend { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245,197,66,.35), 0 8px 30px rgba(245,197,66,.12); }
.bb-card.legend .tag { display: inline-block; }
.bb-card.legend::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,223,122,.18) 50%, transparent 65%); transform: translateX(-120%); animation: bb-foil 3.2s ease-in-out infinite; pointer-events: none; }
.bb-name { font-family: var(--font-display); font-size: clamp(28px, 8.6vw, 42px); line-height: 1; text-transform: uppercase; letter-spacing: .01em; word-break: break-word; }
.bb-hintrow { min-height: 26px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--flame-blue); }
.bb-hintrow .fl { width: 24px; height: 17px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.bb-hintrow .fl-x { display: inline-flex; width: 26px; height: 18px; border-radius: 3px; background: #444; color: #fff; font-size: 10px; font-weight: 800; align-items: center; justify-content: center; }
.bb-card.done { opacity: .5; }

/* ---------- Actions ---------- */
.bb-actions { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px; margin-bottom: 8px; }
.bb-btn { border: 1.5px solid rgba(245,245,245,.25); background: var(--surface); color: var(--white); font-weight: 700; font-size: 13px; padding: 8px 6px; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.15; transition: transform .08s, border-color .15s, opacity .15s; }
.bb-btn small { font-size: 10px; font-weight: 600; color: var(--dim); }
.bb-btn:not(:disabled):active { transform: scale(.96); }
.bb-btn:not(:disabled):hover { border-color: var(--flame-orange); }
.bb-btn:disabled { opacity: .38; cursor: not-allowed; }
.bb-btn.multi { background: linear-gradient(90deg, var(--flame-blue), var(--flame-green)); border: 0; color: #050505; }
.bb-btn.multi small { color: rgba(0,0,0,.65); }
.bb-btn.multi:disabled { background: var(--surface); color: var(--dim); border: 1.5px solid var(--surface-line); }
.bb-btn.multi:disabled small { color: var(--dim); }

/* ---------- Grid ---------- */
.bb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; position: relative; }
.bb-cell { position: relative; aspect-ratio: 1 / 1.02; border-radius: 12px; border: 1.5px solid var(--card-line); background: var(--card); color: var(--white); padding: 5px 3px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; text-align: center; overflow: hidden; transition: transform .12s, border-color .15s, background .2s; -webkit-tap-highlight-color: transparent; }
.bb-cell:not(:disabled):hover { border-color: rgba(245,245,245,.5); }
.bb-cell:not(:disabled):active { transform: scale(.94); }
.bb-cell:focus-visible { outline: 2px solid var(--flame-blue); outline-offset: 2px; }
.bb-cell .ico { height: 30px; display: flex; align-items: center; justify-content: center; flex: none; }
.bb-cell .lab { font-size: 10px; font-weight: 800; line-height: 1.08; text-transform: uppercase; letter-spacing: .01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding: 0 1px; }
.bb-cell .who { display: none; font-family: var(--font-display); font-size: 16px; line-height: 1; text-transform: uppercase; color: #06140b; padding: 0 1px; overflow-wrap: normal; word-break: keep-all; max-width: 100%; }
.bb-cell .st { position: absolute; top: 3px; right: 4px; font-size: 10px; color: #06140b; display: none; }
.bb-cell.t-trophy { border-color: rgba(245,197,66,.45); background: linear-gradient(180deg, #211b0a, #171717); }
.bb-cell.t-with { border-color: rgba(53,179,224,.45); background: linear-gradient(180deg, #0c1c24, #171717); }
.bb-cell.t-cont { border-color: rgba(56,201,119,.4); background: linear-gradient(180deg, #0d1f15, #171717); }
.bb-cell.filled { background: linear-gradient(160deg, #46dc88, #2fb86b); border-color: #5df0a1; cursor: default; }
.bb-cell.filled .ico { display: none; }
.bb-cell.filled .lab { color: #06140b; opacity: .72; font-size: 7px; -webkit-line-clamp: 2; }
.bb-cell.filled .who { display: block; }
.bb-cell.filled .st { display: block; }
.bb-cell.pop { animation: bb-pop .45s cubic-bezier(.2,.9,.3,1.3); }
.bb-cell.wrong { animation: bb-shake .42s ease; border-color: var(--flame-red); background: #3a1313; }
.bb-cell.inline { box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(245,197,66,.55); border-color: var(--gold); }
.bb-cell.glow { animation: bb-glow .9s ease 1; }
.bb-cell:disabled { cursor: default; }
.bb-fly { position: fixed; z-index: 90; pointer-events: none; font-family: var(--font-display); text-transform: uppercase; color: #06140b; background: linear-gradient(160deg, #46dc88, #2fb86b); border-radius: 12px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 22px; line-height: 1; padding: 6px; }
.bb-tip { position: fixed; z-index: 95; max-width: 240px; background: #fff; color: #111; font-size: 12px; font-weight: 600; padding: 8px 10px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.5); pointer-events: none; opacity: 0; transition: opacity .12s; }
.bb-tip.on { opacity: 1; }
.bb-toast { min-height: 18px; text-align: center; font-size: 13px; font-weight: 700; margin: 2px 0 6px; color: var(--gold); transition: opacity .25s; }
.bb-toast.bad { color: var(--flame-red); }
.bb-linesbar { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--dim); margin-bottom: 10px; }
.bb-linesbar b { color: var(--gold); font-family: var(--font-display); font-size: 18px; font-weight: 400; }
.bb-hold { font-size: 11px; color: var(--dim); text-align: center; margin: 0 0 6px; }

/* ---------- Result ---------- */
.bb-result { display: none; background: linear-gradient(180deg, #181818, #101010); border: 1.5px solid var(--card-line); border-radius: 18px; padding: 18px 16px; text-align: center; margin-top: 10px; }
.bb-result.show { display: block; animation: bb-deal .45s ease; }
.bb-medal { font-size: 44px; line-height: 1; margin-bottom: 4px; }
.bb-rscore { font-family: var(--font-display); font-size: 44px; color: var(--flame-orange); line-height: 1; }
.bb-rline { font-size: 13px; color: var(--dim); margin: 6px 0 10px; }
.bb-rstats { display: flex; justify-content: center; gap: 18px; margin: 8px 0 14px; }
.bb-rstats div { text-align: center; }
.bb-rstats b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 400; color: var(--white); line-height: 1; }
.bb-rstats span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.bb-mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; max-width: 300px; margin: 0 auto 14px; }
.bb-mosaic i { aspect-ratio: 1; border-radius: 8px; background: #222; border: 1px solid var(--card-line); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 9px; font-weight: 800; text-transform: uppercase; color: #06140b; line-height: 1; padding: 2px; overflow: hidden; word-break: break-all; }
.bb-mosaic i.on { background: linear-gradient(160deg, #46dc88, #2fb86b); border-color: #5df0a1; }
.bb-mosaic i.ln { background: linear-gradient(160deg, var(--gold-2), var(--gold)); border-color: var(--gold-2); }
.bb-mosaic i.off { color: #555; font-size: 8px; }
.bb-rbtns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.bb-rbtns .btn { font-family: inherit; font-weight: 700; font-size: 14px; padding: 12px 22px; border-radius: 10px; border: 0; cursor: pointer; }
.bb-rbtns .primary { background: var(--flame-orange); color: #050505; }
.bb-rbtns .ghost { background: transparent; border: 1.5px solid rgba(245,245,245,.35); color: var(--white); }
.bb-copied { font-size: 12px; color: var(--correct); min-height: 16px; margin-top: 8px; }
.bb-answers { margin-top: 14px; text-align: left; border-top: 1px solid var(--surface-line); padding-top: 10px; display: none; }
.bb-answers.show { display: block; }
.bb-answers h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 0 0 6px; }
.bb-answers p { font-size: 12px; color: #cfcfcf; margin: 0 0 4px; line-height: 1.35; }
.bb-answers p b { color: var(--white); }

/* ---------- Animations ---------- */
@keyframes bb-deal { 0% { transform: translateY(18px) scale(.96); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes bb-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes bb-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes bb-glow { 0% { filter: brightness(1); } 40% { filter: brightness(1.6); } 100% { filter: brightness(1); } }
@keyframes bb-foil { 0% { transform: translateX(-120%); } 60%,100% { transform: translateX(120%); } }
@keyframes bb-bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes bb-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes bb-float { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-34px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .bb *, .bb *::after { animation: none !important; transition: none !important; }
}

/* chips and flags (same look as Football Grid) */
.bb-chip { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 30px; border-radius: 9px; font-family: var(--font-display); font-size: 15px; letter-spacing: .02em; box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset; }
.bb-flag { width: 34px; height: 24px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.bb-flag-x { display: inline-flex; width: 34px; height: 24px; border-radius: 4px; background: #333; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.bb-svg { width: 30px; height: 30px; }

@media (min-width: 440px) {
  .bb-cell .lab { font-size: 11px; }
  .bb-cell .who { font-size: 18px; }
  .bb-cell .ico { height: 34px; }
}

.bb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bb-faq { margin-top: 26px; }
