/* =====================================================================
   Full-screen shell: header, collapsible sidebar, wide home. Loaded last.
   ===================================================================== */
:root { --sidew: 244px; }
#top { padding-top: calc(var(--tg-top, 0px) + env(safe-area-inset-top, 0px) + 10px) !important; gap: 12px; justify-content: flex-start; }
.top-r { margin-left: auto; }
.hamb { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #aab3e6; flex: none; } .hamb:hover { background: #172043; }
.top-pills { display: none; background: #151e40; padding: 4px; border-radius: 10px; gap: 2px; margin-left: 6px; } .top-pills a { padding: 8px 18px; border-radius: 8px; color: #98a1d4; font-weight: 700; font-size: 13.5px; } .top-pills a.on { background: #3d5afe; color: #fff; }

#shell { flex: 1; display: flex; min-height: 0; position: relative; z-index: 1; }
#view { flex: 1; min-width: 0; }
#scrim { display: none; }

/* sidebar (mobile = drawer) */
#side { position: fixed; top: 0; bottom: 0; left: 0; width: 264px; z-index: 70; background: #0e152e; border-right: 1px solid #172043; transform: translateX(-102%); transition: transform .25s ease; display: flex; flex-direction: column; overflow-y: auto; padding: calc(var(--tg-top, 0px) + 18px) 10px 16px; scrollbar-width: none; }
#side::-webkit-scrollbar { display: none; }
body.side-open #side { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.6); }
body.side-open #scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.55); }
.sd-sec { font-size: 10.5px; letter-spacing: .12em; color: #5d679f; font-weight: 700; padding: 16px 12px 8px; }
.sd-sec:first-child { padding-top: 4px; }
.sd-i { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px; color: #aab3e6; font-weight: 600; font-size: 14px; cursor: pointer; position: relative; white-space: nowrap; }
.sd-i i { display: grid; place-items: center; flex: none; color: #7f89bd; } .sd-i i svg { width: 20px; height: 20px; }
.sd-i:hover { background: #151e3e; color: #fff; }
.sd-i.on { color: #fff; background: #162044; } .sd-i.on i { color: #5b7bff; } .sd-i.on::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: #3d5afe; }
.sd-i em { margin-left: auto; font-style: normal; color: #7f89bd; transition: transform .2s; }
.sd-sub { display: none; flex-direction: column; padding: 2px 0 6px 44px; } .sd-sub.open { display: flex; } .sd-sub a { padding: 9px 12px; color: #8f98cf; font-size: 13.5px; font-weight: 600; border-radius: 8px; } .sd-sub a:hover { color: #fff; background: #151e3e; }
.sd-grow { flex: 1; min-height: 20px; }
.sd-sup b { margin-left: auto; background: #3d5afe; color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 8px; }

/* wide screens */
@media (min-width: 1000px) {
  #app { max-width: none !important; }
  #side { position: static; transform: none; width: var(--sidew); flex: none; z-index: 2; box-shadow: none !important; padding-top: 14px; transition: width .2s; }
  #scrim { display: none !important; }
  #tabs { display: none !important; }
  .top-pills { display: flex; }
  body.side-min #side { width: 72px; } body.side-min .sd-sec, body.side-min .sd-i span, body.side-min .sd-i em, body.side-min .sd-sup b, body.side-min .sd-sub { display: none !important; } body.side-min .sd-i { justify-content: center; padding: 0; } body.side-min .sd-i.on::before { left: -8px; }
  #view { padding-bottom: 36px; }
  .screen { max-width: 1340px; margin: 0 auto; }
  .screen:has(#gbody), .screen:has(.arena-box), .screen:has(.pf), .screen:has(.tabs2) { max-width: 700px; }
  .poster { width: 156px; } .pgrid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
  .hrow { gap: 12px; }
  .cats button { flex: 1; justify-content: center; }
  .sp-fab { right: 24px !important; bottom: 24px !important; }
  .wd { right: 16px !important; }
  body.ingame #side { display: flex; }
}
@media (max-width: 999px) { #side .sd-i.on::before { left: -10px; } }

/* posters: RTP pill + favourite star */
.rtp { background: rgba(5,8,28,.62); color: #7ff0b4; padding: 3px 7px; font-size: 8.5px; letter-spacing: .02em; border-radius: 6px; }
.fav { position: absolute; top: 5px; right: 6px; z-index: 4; width: 26px; height: 26px; border-radius: 50%; background: rgba(5,8,28,.55); color: rgba(255,255,255,.75); font-size: 14px; line-height: 26px; text-align: center; } .fav:hover { color: #fff; } .fav.on { color: #ffc83d; }
.ptag { right: 36px !important; top: 8px !important; }

/* home top: hero + tiles */
.hm-top { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 14px 16px 0; }
@media (min-width: 1000px) { .hm-top { grid-template-columns: 1.3fr 1fr; padding-top: 16px; } }
.hm-top .hero3 { margin: 0; height: 224px; }
.hero3 .h3-s { padding: 0 26px; }
.h3-t { max-width: 56%; } .h3-t h2 { font-size: 40px; } .h3-t small { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; opacity: .85; }
.h3-b { display: inline-flex; align-items: center; gap: 12px; background: #fff; color: #131b39; padding: 9px 9px 9px 22px; border-radius: 10px; } .h3-b i { font-style: normal; width: 28px; height: 28px; border-radius: 8px; background: #3d5afe; color: #fff; display: grid; place-items: center; font-size: 18px; }
.h3-chips { margin-left: auto; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; position: relative; z-index: 2; } .h3-chips > div { background: rgba(8,12,50,.55); border-radius: 12px; padding: 10px 18px; min-width: 120px; } .h3-chips b { display: block; font-size: 15px; font-weight: 800; } .h3-chips small { font-size: 11px; opacity: .7; letter-spacing: 0; text-transform: none; font-weight: 600; }
.h3-nav { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; z-index: 5; } .h3-nav button { width: 34px; height: 34px; border-radius: 9px; background: rgba(8,12,50,.55); color: #fff; font-size: 20px; line-height: 1; }
.h3-dots { display: none; }
.hm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hm-tile { position: relative; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg, #1c2853, #151e3e); text-align: left; padding: 18px 16px; min-height: 106px; display: flex; color: #fff; border: 1px solid #1b254b; transition: transform .15s; } .hm-tile:active { transform: scale(.98); }
.hm-tile b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; } .hm-tile small { color: #8892c6; font-size: 11.5px; font-weight: 600; }
.t-art { position: absolute; right: -4px; top: 6px; bottom: 6px; width: 46%; } .t-art svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }

/* tabs + search */
.lb-tools { gap: 12px; } .cats { overflow-x: auto; }
.searchbox { height: 48px; }

/* "Not sure what to play?" */
.rand { margin: 26px 16px 0; border-radius: 16px; background: linear-gradient(105deg, #2f58ff, #1a3dd0); display: flex; align-items: center; overflow: hidden; min-height: 150px; }
.rand-t { padding: 20px 22px; flex: none; z-index: 2; } .rand-t h3 { margin: 0 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; } .rand-t p { margin: 0 0 16px; font-size: 13.5px; color: rgba(255,255,255,.8); }
.rand-b { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 10px; background: #fff; color: #131b39; font-weight: 800; font-size: 13.5px; } .rand-b svg { width: 16px; height: 16px; }
.rand-strip { display: flex; gap: 10px; margin-left: auto; padding: 14px 14px 14px 0; } .rs-c { width: 88px; height: 118px; border-radius: 10px; background: linear-gradient(165deg, var(--c1), var(--c2)); flex: none; overflow: hidden; } .rs-c svg { width: 100%; height: 100%; }
@media (max-width: 700px) { .rand-strip { opacity: .55; } .rand-t { padding-right: 6px; } }

.row-sec { padding-top: 24px; }
.rs-h h2 { font-size: 20px; }
.rs-h h2::before { content: ''; width: 4px; height: 20px; border-radius: 2px; background: #3d5afe; margin-right: 2px; }
.hrow { scroll-padding-left: 16px; scroll-snap-type: none; }

/* header menu */
.more-btn { width: 40px; height: 40px; border-radius: 10px; background: #172043; color: #aab3e6; display: grid; place-items: center; flex: none; }
.mm { position: fixed; z-index: 96; top: calc(var(--tg-top, 0px) + 58px); right: 14px; width: 250px; background: #192346; border-radius: 14px; padding: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: rowin .18s ease; } .mm[hidden] { display: none; }
.mm a, .mm button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 12px; border-radius: 10px; color: #dfe4ff; font-weight: 700; font-size: 14.5px; text-align: left; } .mm a:hover, .mm button:hover { background: #1f2a51; } .mm a svg { width: 20px; height: 20px; color: #7f89bd; } .mm em { margin-left: auto; font-style: normal; color: #7f89bd; } .mm hr { border: 0; height: 1px; background: #212d57; margin: 6px 4px; }

/* footer */
.ft { margin: 34px 16px 0; padding: 30px 0 22px; border-top: 1px solid #172043; }
.ft-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; } .ft-brand p { color: #7f89bd; font-size: 13px; line-height: 1.5; max-width: 240px; margin: 12px 0 0; }
.ft h5 { margin: 0 0 14px; font-size: 13px; color: #fff; } .ft a { display: block; color: #8f98cf; font-size: 13.5px; padding: 5px 0; cursor: pointer; } .ft a:hover { color: #fff; }
.ft-tg { display: inline-flex !important; align-items: center; gap: 10px; background: #151e3e; padding: 12px 18px !important; border-radius: 10px; color: #fff !important; font-weight: 700; } .ft-lang { margin-top: 12px; background: #151e3e; padding: 12px 16px; border-radius: 10px; color: #dfe4ff; font-weight: 700; font-size: 13.5px; }
.ft-bot { display: flex; justify-content: space-between; margin-top: 26px; padding-top: 18px; border-top: 1px solid #172043; color: #5d679f; font-size: 12px; } .ft-bot b { border: 1px solid #4b505f; border-radius: 12px; padding: 3px 8px; margin-right: 8px; }
@media (max-width: 800px) { .ft-grid { grid-template-columns: 1fr 1fr; } .ft-brand { grid-column: 1 / -1; } }

/* live bets, Raika style */
.lbt-head, .lbt-row { grid-template-columns: 1.7fr 1.2fr 1fr 1fr 1fr !important; padding: 0 16px; }
.lbt-head { height: 52px; color: #cfd6ff; font-weight: 700; font-size: 14px; background: #182245; border-radius: 12px 12px 0 0; }
.lbt-table { background: #121a35; border-radius: 12px; overflow: hidden; padding: 0 !important; }
.lbt-row { height: 60px !important; background: transparent !important; margin: 0 !important; font-weight: 600; font-size: 14px; } .lbt-row:nth-child(even) { background: #151f43 !important; }
.lbt-row .g { gap: 12px; } .lbt-row .g > i { width: 38px !important; height: 38px !important; border-radius: 9px !important; } .lbt-row .g > i svg { width: 28px !important; height: 28px !important; }
.lbt-row .g span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; } .lbt-row .g small { color: #6f79ad; font-size: 11px; font-weight: 600; } .lbt-row .g b { font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbt-row .r { color: #dfe4ff !important; } .lbt-row .pay.w { color: #5ff0a8 !important; }
@media (max-width: 600px) { .lbt-head, .lbt-row { grid-template-columns: 1.5fr 1fr 1fr .8fr 1fr !important; padding: 0 10px; } .lbt-row .g small { display: none; } .lbt-row .g > i { width: 30px !important; height: 30px !important; } .lbt-row .g > i svg { width: 22px !important; height: 22px !important; } .lbt-row .r .cn { width: 16px; height: 16px; } }
.lbt-row .id, .lbt-head .id { display: none !important; }

/* profile (Raika style) */
.pf2 { padding: 8px 16px 0; display: flex; flex-direction: column; gap: 14px; max-width: 1200px; margin: 0 auto; }
.p2-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px; border-radius: 18px; background: linear-gradient(110deg, #131f48, #0f1732 70%); }
.p2-who { display: flex; align-items: center; gap: 18px; } .p2-av { width: 96px !important; height: 96px !important; font-size: 36px; border: 3px solid rgba(255,255,255,.12); }
.p2-un { color: #8f98cf; font-weight: 700; letter-spacing: .06em; } .p2-who h2 { margin: 2px 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; } .p2-ids { display: flex; gap: 8px; flex-wrap: wrap; } .p2-ids span { background: #1a2651; color: #aab3e6; padding: 5px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 700; }
.p2-set { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: #8f98cf; font-size: 13px; cursor: pointer; } .p2-set svg { width: 16px; height: 16px; }
.p2-bal { background: #0e152f; border-radius: 14px; padding: 14px 16px; min-width: 250px; } .p2-bal small { color: #8892c6; font-size: 12px; font-weight: 600; } .p2-bal > div { display: flex; align-items: center; gap: 12px; margin-top: 8px; } .p2-bal b { font-size: 26px; letter-spacing: -.02em; flex: 1; }
.p2-acts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; } .p2-acts button { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 16px; border-radius: 14px; background: #131c3d; color: #fff; font-weight: 700; font-size: 14px; text-align: left; border: 1px solid #172145; } .p2-acts button:hover { background: #162044; } .p2-acts i { width: 38px; height: 38px; border-radius: 10px; background: #1a264e; display: grid; place-items: center; color: #6f82ff; flex: none; }
@media (max-width: 900px) { .p2-acts { grid-template-columns: 1fr 1fr; } }
.p2-two { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; } @media (max-width: 800px) { .p2-two { grid-template-columns: 1fr; } }
.p2-rank { border-radius: 18px; padding: 22px; min-height: 250px; background: radial-gradient(60% 80% at 90% 40%, #2b55ff55, transparent), linear-gradient(120deg, #16265f, #1a3fd0); display: flex; flex-direction: column; justify-content: space-between; gap: 20px; } .p2-rank h3 { margin: 0 0 4px; font-size: 32px; font-weight: 800; letter-spacing: -.03em; } .p2-rank small { color: rgba(255,255,255,.75); }
.p2-rk-b { max-width: 560px; } .p2-rk-b .row { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; }
.p2-bar { height: 8px; border-radius: 4px; background: rgba(0,0,0,.35); overflow: hidden; } .p2-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #7a8cff, #fff); } .p2-bar.sm { height: 6px; flex: 1; } .p2-bar.sm i { background: #3d5afe; }
.p2-rwd { margin: 12px 0; background: rgba(0,0,0,.3); border-radius: 10px; padding: 10px 14px; } .p2-rwd small { display: block; font-size: 11px; } .p2-rwd b { font-size: 16px; }
.p2-all { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 9px; background: rgba(0,0,0,.35); color: #fff; font-weight: 700; font-size: 13px; }
.p2-bonus { border-radius: 18px; padding: 22px; background: linear-gradient(160deg, #3a2a1a, #141a2f); display: flex; flex-direction: column; } .p2-bonus h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; } .p2-bonus h3 svg { width: 24px; height: 24px; color: #e8a050; } .p2-bn { margin: auto; text-align: center; } .p2-bn b { display: block; font-size: 19px; margin-bottom: 14px; }
.p2-card { border-radius: 18px; background: #101936; padding: 22px; border: 1px solid #162044; } .p2-card > h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; } .p2-card > p { margin: 0 0 16px; color: #8892c6; font-size: 13.5px; }
.p2-vip { background: #0e152f; border-radius: 12px; padding: 16px 18px; border: 1px solid #162044; } .p2-vip small { display: block; color: #8892c6; font-size: 12px; margin-bottom: 6px; } .p2-vip b { font-size: 20px; } .p2-vip .r { text-align: right; }
.p2-tiers { position: relative; display: flex; justify-content: space-between; margin-top: 18px; padding: 0 4%; } .p2-line { position: absolute; left: 8%; right: 8%; top: 22px; height: 3px; background: #1b254b; border-radius: 2px; } .p2-line i { display: block; height: 100%; background: #3d5afe; border-radius: 2px; }
.p2-t { position: relative; z-index: 1; opacity: .4; filter: grayscale(.6); } .p2-t.got, .p2-t:first-of-type { opacity: 1; filter: none; }
.p2-perks { margin-top: 14px; background: #0e152f; border-radius: 12px; padding: 16px 18px; border: 1px solid #162044; } .p2-perks small { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #3d8bff; } .p2-perks small.lk { color: #3d8bff; } .p2-perks h4 { margin: 6px 0 12px; font-size: 20px; } .p2-pl { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; } .p2-pl span { background: #121b3d; border-radius: 8px; padding: 10px 12px; font-size: 13px; font-weight: 600; color: #cfd6ff; } .p2-pl span::before { content: '●'; color: #3d5afe; font-size: 9px; margin-right: 10px; }
.p2-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; } @media (max-width: 800px) { .p2-stats { grid-template-columns: 1fr 1fr; } } .p2-stats > div { background: #151f43; border-radius: 12px; padding: 20px 10px; text-align: center; } .p2-stats small { display: block; color: #8892c6; font-size: 12px; font-weight: 600; margin-bottom: 10px; } .p2-stats b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.p2-qt { display: flex; gap: 8px; } .p2-qt button { padding: 9px 16px; border-radius: 10px; background: #151f43; color: #aab3e6; font-weight: 700; font-size: 13.5px; } .p2-qt button.on { background: #1d7bff; color: #fff; } .p2-qt em { font-style: normal; background: rgba(255,255,255,.14); border-radius: 6px; padding: 1px 7px; margin-left: 6px; font-size: 12px; }
.p2-qc { font-weight: 700; margin: 4px 0 14px; font-size: 14px; }
.p2-q { background: #0e152f; border: 1px solid #162044; border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; } .p2-q > .row b { font-size: 16px; } .p2-st { background: #182553; color: #8fb0ff; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 8px; } .p2-st.ok { background: rgba(63,227,160,.15); color: #5ff0a8; }
.p2-qb { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-top: 14px; } @media (max-width: 800px) { .p2-qb { grid-template-columns: 1fr; } }
.p2-qd { display: flex; align-items: flex-start; gap: 14px; font-weight: 600; font-size: 14.5px; } .p2-qd > i { width: 44px; height: 44px; border-radius: 10px; background: #151f43; display: grid; place-items: center; color: #8f98cf; flex: none; } .p2-min { display: inline-block; margin-top: 8px; margin-right: auto; padding: 5px 10px; border-radius: 6px; background: rgba(255,200,61,.1); border: 1px solid rgba(255,200,61,.35); color: #ffd36b; font-size: 12px; } .p2-min b { color: #ffc83d; }
.p2-qp { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 12.5px; font-weight: 700; }
.p2-qr { border-left: 1px solid #162044; padding-left: 20px; } .p2-qr > small { color: #8892c6; font-size: 12px; } .p2-qr > div { display: flex; align-items: center; gap: 12px; margin-top: 10px; } .p2-qr i { color: #8f98cf; } .p2-qr i svg { width: 22px; height: 22px; } .p2-qr b { font-size: 20px; display: block; } .p2-qr small { color: #8892c6; font-size: 12px; }
.p2-qf { margin-top: 12px; font-size: 12px; font-weight: 600; display: flex; justify-content: space-between; }
