/* ============================================================
   BBUTRX — assets/app/app.css   (APP layer UI)
   Install sheet, toasts, top progress bar, app-mode polish.
   Sab classes "bbx-" se shuru hoti hain — site ke kisi style se
   takrati nahi. Colors theme.css ke --brand vars se aate hain.
   ============================================================ */

@font-face{
  font-family:'Nunito';font-weight:900;font-style:normal;font-display:swap;
  src:url('/assets/fonts/nunito/nunito-latin-900-normal.woff2') format('woff2');
}

:root{
  --bbx-brand: var(--brand, #F43F5E);
  --bbx-brand-2: var(--brand-2, #FB7185);
  --bbx-brand-deep: var(--brand-deep, #BE123C);
  --bbx-rgb: var(--brand-rgb, 244,63,94);
  --bbx-ink: var(--brand-text, #4C0519);
  --bbx-font: 'Nunito','Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
}

/* splash ke dauran page scroll band */
html.bbx-splash-on, html.bbx-splash-on body{ overflow:hidden !important; }

/* ---------- Tap feedback: dabate hi halka sa asar (page aane tak "hang" na lage) ---------- */
a, button, .nav-item, .game-card, .action-item{ -webkit-tap-highlight-color:transparent; }
.bbx-tap{ opacity:.55 !important; transform:scale(.97); transition:opacity .08s ease, transform .08s ease !important; }

/* ---------- Top progress bar (page load ho raha ho) ---------- */
#bbx-progress{
  position:fixed; top:0; left:0; right:0; height:3px; z-index:2147482000;
  pointer-events:none; opacity:0; transition:opacity .25s ease;
}
#bbx-progress i{
  display:block; height:100%; width:0%;
  background:linear-gradient(90deg, var(--bbx-brand-2), var(--bbx-brand), var(--bbx-brand-deep));
  box-shadow:0 0 10px rgba(var(--bbx-rgb), .7);
  border-radius:0 3px 3px 0;
  transition:width .35s cubic-bezier(.2,.8,.2,1);
}
#bbx-progress.bbx-on{ opacity:1; }

/* ---------- Toast (online / offline / update / installed) ---------- */
#bbx-toast{
  position:fixed; left:50%; z-index:2147482500;
  top:calc(14px + env(safe-area-inset-top, 0px));
  transform:translate(-50%, -140%); opacity:0;
  max-width:min(92vw, 380px); width:max-content;
  display:flex; align-items:center; gap:10px;
  padding:11px 14px 11px 12px; border-radius:16px;
  font:800 13.5px/1.25 var(--bbx-font); color:#fff;
  background:rgba(30,10,16,.92);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  box-shadow:0 14px 34px rgba(30,10,16,.32), inset 0 1px 0 rgba(255,255,255,.08);
  transition:transform .42s cubic-bezier(.2,1.2,.3,1), opacity .25s ease;
}
#bbx-toast.bbx-show{ transform:translate(-50%, 0); opacity:1; }
#bbx-toast .bbx-t-ic{
  flex:0 0 auto; width:26px; height:26px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, var(--bbx-brand-2), var(--bbx-brand-deep));
}
#bbx-toast.bbx-ok .bbx-t-ic{ background:linear-gradient(135deg,#34D399,#059669); }
#bbx-toast .bbx-t-ic svg{ width:14px; height:14px; }
#bbx-toast button{
  appearance:none; border:0; margin-left:4px; padding:7px 12px; border-radius:10px;
  font:900 12.5px/1 var(--bbx-font); color:var(--bbx-ink); background:#fff; cursor:pointer;
}

/* ---------- Install bottom sheet ---------- */
#bbx-install{
  position:fixed; inset:0; z-index:2147482800; display:none;
  font-family:var(--bbx-font); -webkit-tap-highlight-color:transparent;
}
#bbx-install.bbx-open{ display:block; }
#bbx-install .bbx-i-back{
  position:absolute; inset:0; background:rgba(40,6,18,.46);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
  opacity:0; transition:opacity .3s ease;
}
#bbx-install .bbx-i-sheet{
  position:absolute; left:0; right:0; bottom:0; margin:0 auto; max-width:480px;
  background:#fff; border-radius:26px 26px 0 0;
  padding:10px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow:0 -18px 50px rgba(76,5,25,.28);
  transform:translateY(105%); transition:transform .46s cubic-bezier(.2,1,.3,1);
  max-height:92vh; max-height:92dvh; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; box-sizing:border-box;
}
#bbx-install.bbx-in .bbx-i-back{ opacity:1; }
#bbx-install.bbx-in .bbx-i-sheet{ transform:none; }
.bbx-i-grip{ width:42px; height:5px; border-radius:5px; background:#F1D5DA; margin:0 auto 16px; }
.bbx-i-head{ display:flex; align-items:center; gap:14px; }
.bbx-i-head img{
  width:62px; height:62px; border-radius:16px; flex:0 0 auto;
  box-shadow:0 10px 22px rgba(var(--bbx-rgb), .34);
}
.bbx-i-title{ font-size:19px; font-weight:900; color:var(--bbx-ink); line-height:1.15; }
.bbx-i-sub{ margin-top:3px; font-size:13px; font-weight:700; color:#9F1239; opacity:.75; }
.bbx-i-feats{ display:flex; gap:8px; margin:18px 0 18px; }
.bbx-i-feat{
  flex:1; padding:12px 6px 10px; border-radius:16px; text-align:center;
  background:var(--brand-soft, #FFF1F2); border:1px solid var(--brand-border, #FECDD3);
  font-size:11.5px; font-weight:800; color:var(--bbx-ink); line-height:1.2;
}
.bbx-i-feat svg{ display:block; width:22px; height:22px; margin:0 auto 6px; color:var(--bbx-brand); }
.bbx-i-btn{
  appearance:none; border:0; width:100%; padding:15px 18px; border-radius:16px; cursor:pointer;
  font:900 15.5px/1 var(--bbx-font); letter-spacing:.3px; color:#fff !important;
  background:linear-gradient(135deg, var(--bbx-brand-2) 0%, var(--bbx-brand) 45%, var(--bbx-brand-deep) 100%);
  box-shadow:0 10px 24px rgba(var(--bbx-rgb), .36);
  display:flex; align-items:center; justify-content:center; gap:9px;
  position:relative; overflow:hidden;
}
.bbx-i-btn svg{ width:18px; height:18px; }
.bbx-i-btn::after{
  content:''; position:absolute; top:0; bottom:0; left:-60%; width:40%; transform:skewX(-20deg);
  background:linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.35), rgba(255,255,255,0));
  animation:bbx-btn-shine 2.8s ease-in-out 1s infinite;
}
@keyframes bbx-btn-shine{ 0%{left:-60%} 45%,100%{left:130%} }
.bbx-i-note{
  margin:16px 0 4px; padding:12px 14px; border-radius:14px;
  background:#FFFBEB; border:1px solid #FDE68A;
  font-size:13px; font-weight:700; line-height:1.45; color:#92400E;
}
a.bbx-i-btn{ text-decoration:none; margin-top:6px; }
.bbx-i-btn{ box-sizing:border-box; }
.bbx-i-later{
  appearance:none; border:0; background:none; width:100%; margin-top:6px; padding:12px; cursor:pointer;
  font:800 13.5px/1 var(--bbx-font); color:#9F1239; opacity:.7; box-shadow:none !important;
}
a.bbx-i-later{ display:block; text-align:center; text-decoration:none; box-sizing:border-box; }
.bbx-i-note.bbx-i-must{ background:#FEF2F2; border-color:#FECACA; color:#991B1B; }
.bbx-i-hint{
  display:flex; gap:10px; align-items:flex-start; margin:16px 0 12px; padding:12px 14px; border-radius:14px;
  background:#ECFDF5; border:1px solid #A7F3D0; font-size:13px; font-weight:700; line-height:1.45; color:#065F46;
}
.bbx-i-hint svg{ flex:0 0 auto; width:20px; height:20px; margin-top:1px; color:#059669; }
.bbx-hide{ display:none !important; }
.bbx-i-dl{ display:none; margin-top:12px; }
.bbx-i-dl.on{ display:block; animation:bbx-g-in .3s ease both; }
.bbx-i-track{ height:10px; border-radius:10px; background:var(--brand-soft, #FFF1F2); border:1px solid var(--brand-border, #FECDD3); overflow:hidden; }
.bbx-i-track i{ display:block; height:100%; width:0; border-radius:10px; background:linear-gradient(90deg, var(--bbx-brand-2), var(--bbx-brand-deep)); transition:width .25s ease; }
.bbx-i-track i.bbx-i-ind{ animation:bbx-i-slide 1.1s ease-in-out infinite; }
.bbx-i-dl span{ display:block; margin-top:7px; text-align:center; font-size:12.5px; font-weight:800; color:#9F1239; }
.bbx-i-dlerr .bbx-i-track i{ background:#DC2626; }
.bbx-i-dlerr span{ color:#B91C1C; }
@keyframes bbx-i-slide{ 0%{ transform:translateX(-110%) } 100%{ transform:translateX(300%) } }
.bbx-i-stage2{ animation:bbx-g-in .35s ease both; }
.bbx-i-stage2 .bbx-i-btn{ margin-top:14px; }
.bbx-i-stage2 .bbx-i-btn::after{ display:none; }

/* ---------- Install guide (Play Protect steps) ---------- */
.bbx-g{ margin-top:16px; font-family:var(--bbx-font); }
.bbx-g-step{ display:flex; gap:12px; align-items:flex-start; padding:9px 0; }
.bbx-g-step>i{
  flex:0 0 auto; width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-style:normal; font-size:12.5px; font-weight:900; color:#fff;
  background:linear-gradient(135deg, var(--bbx-brand-2), var(--bbx-brand-deep));
}
.bbx-g-step b{ display:block; font-size:13.5px; font-weight:900; color:var(--bbx-ink); line-height:1.3; }
.bbx-g-step span{ display:block; margin-top:2px; font-size:12.5px; font-weight:700; color:#7a6268; line-height:1.4; }
.bbx-g-step span b{ display:inline; font-size:inherit; color:var(--bbx-ink); }
.bbx-g-mocks{ display:flex; align-items:center; gap:6px; margin:10px 0 4px; }
.bbx-g-arrow{ flex:0 0 auto; width:22px; height:22px; border-radius:50%; background:var(--bbx-brand); display:flex; align-items:center; justify-content:center; transform:rotate(90deg); }
.bbx-g-arrow svg{ width:12px; height:12px; }
.bbx-g-mock{
  flex:1; min-width:0; padding:10px 8px 9px; border-radius:16px; text-align:center;
  background:#F7E4E1; border:1px solid #EBCFCB; box-shadow:0 6px 16px rgba(76,5,25,.10);
}
.bbx-g-pp{ display:flex; align-items:center; justify-content:center; gap:4px; font-size:8.5px; font-weight:800; color:#6B4A45; }
.bbx-g-pp svg{ width:12px; height:12px; color:#8E4A42; }
.bbx-g-mt{ margin-top:5px; font-size:12px; font-weight:900; color:#2B1512; line-height:1.15; }
.bbx-g-ms{ margin:4px 0 8px; font-size:8.5px; font-weight:700; color:#6B4A45; line-height:1.3; min-height:22px; }
.bbx-g-ok{ width:20px; height:20px; margin:5px auto 0; border-radius:50%; background:#16A34A; color:#fff; display:flex; align-items:center; justify-content:center; }
.bbx-g-ok svg{ width:12px; height:12px; }
.bbx-g-safe .bbx-g-ms{ min-height:0; }
.bbx-g-mb{ position:relative; padding:7px 4px; border-radius:999px; font-size:10px; font-weight:800; color:#fff; background:#8E4A42; }
.bbx-g-mb+.bbx-g-mb{ margin-top:5px; }
.bbx-g-no{ opacity:.38; }
.bbx-g-tap{ box-shadow:0 0 0 2px #fff, 0 0 0 4px #16A34A; animation:bbx-g-pulse 1.5s ease-in-out infinite; }
.bbx-g-tap i{
  position:absolute; right:8px; top:50%; width:16px; height:16px; margin-top:-2px; border-radius:50%;
  background:rgba(255,255,255,.95); box-shadow:0 2px 6px rgba(0,0,0,.35); animation:bbx-g-finger 1.5s ease-in-out infinite;
}
@keyframes bbx-g-pulse{ 50%{ box-shadow:0 0 0 2px #fff, 0 0 0 7px rgba(22,163,74,.35); } }
@keyframes bbx-g-finger{ 0%,100%{ transform:translateY(6px) scale(1); opacity:.9; } 50%{ transform:translateY(0) scale(.82); opacity:1; } }
@keyframes bbx-g-in{ from{ opacity:0; transform:translateY(10px); } }
@media (prefers-reduced-motion:reduce){ .bbx-g-tap, .bbx-g-tap i, .bbx-i-stage2{ animation:none; } }

/* iPhone steps */
.bbx-i-steps{ margin:18px 0 6px; padding:0; list-style:none; counter-reset:bbx; }
.bbx-i-steps li{
  counter-increment:bbx; display:flex; align-items:center; gap:12px;
  padding:12px 14px; margin-bottom:8px; border-radius:14px;
  background:var(--brand-soft, #FFF1F2); border:1px solid var(--brand-border, #FECDD3);
  font-size:13.5px; font-weight:800; color:var(--bbx-ink);
}
.bbx-i-steps li::before{
  content:counter(bbx); flex:0 0 auto; width:24px; height:24px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:12.5px; font-weight:900; color:#fff;
  background:linear-gradient(135deg, var(--bbx-brand-2), var(--bbx-brand-deep));
}
.bbx-i-steps svg{ width:18px; height:18px; vertical-align:-4px; color:var(--bbx-brand); }

/* ---------- App mode (home screen se khuli ho) ---------- */
html.bbx-standalone{ -webkit-tap-highlight-color:transparent; }
/* NOTE: yahan body par overscroll-behavior MAT lagana — site ke html,body dono par
   overflow-x:hidden hai, is liye wo rule poore page ka scroll rok deta hai. */
html.bbx-standalone body{ -webkit-touch-callout:none; }
html.bbx-standalone a, html.bbx-standalone button, html.bbx-standalone .nav-item{
  -webkit-user-select:none; user-select:none; -webkit-user-drag:none;
}
html.bbx-standalone img{ -webkit-user-drag:none; }
/* iPhone notch / home-bar ke liye bottom nav ko upar rakho */
html.bbx-standalone .bottom-nav{ padding-bottom:env(safe-area-inset-bottom, 0px); box-sizing:content-box; }

@media (prefers-reduced-motion: reduce){
  #bbx-toast, #bbx-install .bbx-i-sheet, #bbx-install .bbx-i-back{ transition:none; }
  .bbx-i-btn::after{ animation:none; display:none; }
}
