/* GiftUp — mini app */
:root {
  --bg: #17181c;
  --bg2: #1b1d21;
  --card: #1f2126;
  --card2: #262930;
  --card3: #2c3038;
  --line: rgba(255, 255, 255, .06);
  --txt: #fff;
  --sub: #8d929b;
  --dim: #5d626b;
  --blue: #1a7cff;
  --blue2: #3d8bff;
  --blue-d: #0b5bd3;
  --green: #31d158;
  --orange: #ff9f2e;
  --red: #ff3b3b;
  --ease: cubic-bezier(.22, .9, .3, 1);
  --spring: cubic-bezier(.34, 1.42, .5, 1);
  --soft: cubic-bezier(.4, 0, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--txt);
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; outline: none; }
input { font: inherit; color: inherit; outline: none; border: 0; background: none; }
img { display: block; -webkit-user-drag: none; user-select: none; }
svg { display: block; }

#app { position: relative; height: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; background: var(--bg); isolation: isolate; }
#pages { position: absolute; inset: 0; }

/* ---------- press feedback ---------- */
.tap { transition: transform .32s var(--spring), filter .2s, opacity .2s; }
.tap:active, .tap.pressed { transform: scale(.955); transition-duration: .09s; transition-timing-function: ease-out; filter: brightness(.92); }

/* ---------- pages ---------- */
.page {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 15px 15px calc(96px + var(--safe-b)); scrollbar-width: none;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.992);
  transition: opacity .34s var(--soft), transform .46s var(--ease), visibility 0s .34s;
}
.page::-webkit-scrollbar { display: none; }
.page.on { opacity: 1; visibility: visible; transform: none; transition: opacity .34s var(--soft), transform .46s var(--ease), visibility 0s; }
.page.on .stg { animation: stgIn .55s var(--ease) backwards; }
@keyframes stgIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.topbar { position: relative; z-index: 3; height: 36px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.topbar .l { display: flex; gap: 8px; align-items: center; }
.online {
  height: 34px; padding: 0 11px; border-radius: 17px; display: flex; align-items: center; gap: 6px;
  background: rgba(36, 120, 58, .3); color: #34c759; font-size: 15.5px; font-weight: 400;
}
.online svg, .online span { animation: onl 2.2s ease-in-out infinite; }
@keyframes onl { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.online svg { width: 15px; height: 15px; fill: #34c759; }
.online span { min-width: 18px; display: inline-block; transition: opacity .2s; font-variant-numeric: tabular-nums; }
.circ {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #2c2e33;
}
.circ svg { width: 20px; height: 20px; fill: #d9dbe0; }
.circ.off { opacity: .45; }
.circ .flag { width: 20px; height: 20px; border-radius: 50%; overflow: hidden; }
.bal {
  height: 34px; border-radius: 17px; display: flex; align-items: center; padding: 0 4px 0 5px; gap: 9px;
  background: #26282d; font-size: 16px; font-weight: 400;
}
.bal > .ton { width: 23px; height: 23px; margin-left: 1px; }
.bal .plus { width: 23px; height: 23px; border-radius: 50%; background: #5d616a; display: grid; place-items: center; }
.bal .plus svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.4; }
.bal span { font-variant-numeric: tabular-nums; }
.ton { width: 14px; height: 14px; flex: none; }

/* ====================== CRASH ====================== */
#p-crash { display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(#000 0%, #030406 38%, #0f1013 62%, #17191d 82%, #191b1f 100%); }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#p-crash > *:not(#cv) { position: relative; z-index: 2; }
.stage { flex: 1 1 0; min-height: 150px; position: relative; display: grid; place-items: center; margin-top: -12px; }
.cr-num { position: absolute; left: -15px; right: -15px; top: 0; bottom: 0; display: grid; place-items: center; pointer-events: none; }
.cr-num .n {
  grid-area: 1 / 1; font-size: 94px; font-weight: 300; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums;
  transition: opacity .42s var(--soft), transform .55s var(--ease), filter .45s var(--soft); will-change: transform, opacity, filter;
}
.cr-num .n.red { color: var(--red); font-size: 96px; text-shadow: 0 0 30px rgba(255, 40, 40, .25); }
.cr-num .n.new { opacity: 0; transform: scale(.72); filter: blur(10px); }
.cr-num .n.old { opacity: 0; transform: scale(1.35); filter: blur(14px); }

.pills-wrap { margin: 6px 0 0; overflow: hidden; height: 33px; padding: 4px 0; }
.pills { display: flex; gap: 11px; white-space: nowrap; }
.mp {
  flex: none; height: 25px; min-width: 41px; padding: 0 9px; border-radius: 13px; font-size: 12.5px; display: grid; place-items: center;
  border: 1px solid #3f6fb8; color: #8fb4ec; background: rgba(28, 54, 96, .38); font-variant-numeric: tabular-nums;
}
.mp.live { background: var(--blue); border-color: var(--blue); color: #fff; min-width: 46px; font-weight: 400; }
.mp.p { border-color: #7d50d8; color: #b993ff; background: rgba(78, 40, 140, .32); }
.mp.g { border-color: #31b85e; color: #59e07f; background: rgba(32, 110, 54, .3); }
.mp.t { border-color: #20b384; color: #44d9a6; background: rgba(18, 104, 80, .3); }
.mp.m { border-color: #c642b7; color: #f07de0; background: rgba(126, 30, 116, .32); }
.mp.add { animation: mpIn .6s var(--spring) both; }
@keyframes mpIn { 0% { max-width: 0; min-width: 0; padding: 0; opacity: 0; transform: scale(.4); margin-right: -11px; } 55% { opacity: 1; } 100% { max-width: 80px; opacity: 1; transform: none; margin-right: 0; } }

.betbtn {
  margin-top: 12px; height: 47px; flex: none; border-radius: 24px; font-size: 15px; font-weight: 500; position: relative; overflow: hidden;
  background: var(--blue);
}
.betbtn::before, .betbtn::after { content: ''; position: absolute; top: 0; bottom: 0; width: 34%; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg fill='%2364a6ff' fill-opacity='.55'%3E%3Crect x='2' y='5' width='7' height='5' rx='1'/%3E%3Crect x='3' y='10' width='5' height='5' rx='.6'/%3E%3Crect x='13' y='13' width='6' height='4' rx='1'/%3E%3Crect x='14' y='17' width='4' height='3' rx='.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 15px 15px; }
.betbtn::before { left: 0; -webkit-mask-image: linear-gradient(90deg, #000, transparent); mask-image: linear-gradient(90deg, #000, transparent); }
.betbtn::after { right: 0; -webkit-mask-image: linear-gradient(-90deg, #000, transparent); mask-image: linear-gradient(-90deg, #000, transparent); }
.betbtn span { position: relative; z-index: 1; }
.betbtn .shine { position: absolute; top: 0; bottom: 0; width: 60px; left: 0; transform: translateX(-80px); background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .2), transparent); animation: shine 4.5s 2s infinite; will-change: transform; }
@keyframes shine { 0% { transform: translateX(-80px); } 22%, 100% { transform: translateX(420px); } }

.plist {
  margin-top: 11px; flex: 1.12 1 0; min-height: 150px; border-radius: 22px; background: rgba(31, 33, 38, .92); position: relative; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .025);
}
.plist .scroll { position: absolute; inset: 0; overflow-y: auto; padding: 5px 14px; scrollbar-width: none; }
.plist .scroll::-webkit-scrollbar { display: none; }
.plist .empty { position: absolute; inset: 0; display: grid; place-items: center; color: #4c5058; font-size: 16.5px; transition: opacity .35s; pointer-events: none; }
.prow { display: flex; align-items: center; height: 70px; gap: 0; position: relative; animation: rowIn .5s var(--ease) backwards; transition: opacity .35s, transform .35s var(--ease); }
.prow + .prow::before { content: ''; position: absolute; left: 45px; right: 0; top: 0; height: 1px; background: rgba(255, 255, 255, .07); }
.prow.out { opacity: 0; transform: translateX(-18px); }
.prow.lost { opacity: .45; }
@keyframes rowIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.av { width: 41px; height: 41px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; font-weight: 500; font-size: 17px; background: #3a3e46; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { flex: 1; min-width: 0; margin-left: 15px; }
.pname { font-size: 16px; line-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psub { display: flex; align-items: center; gap: 5px; font-size: 13.5px; color: #d7d9de; margin-top: 3px; font-variant-numeric: tabular-nums; }
.psub .au { width: 13px; height: 13px; border-radius: 4px; background: #3f8cf2; display: grid; place-items: center; margin-left: 7px; }
.psub .au svg { width: 9px; height: 9px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.psub .x { transition: color .3s; }
.ok { color: #34c759 !important; }
.pwin {
  display: flex; align-items: center; height: 40px; padding: 0 5px 0 22px; gap: 6px; border-radius: 12px; background: linear-gradient(90deg, rgba(36, 39, 45, 0), #24272d 34%); font-size: 14px;
  font-variant-numeric: tabular-nums; min-width: 98px; justify-content: flex-end; transition: background .3s;
}
.pwin .v { transition: color .3s; margin-right: 4px; }
.pwin .gi { width: 33px; height: 33px; position: relative; }
.pwin .gi img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s, transform .45s var(--spring); }
.pwin .gi img.in { animation: giIn .5s var(--spring) both; }
@keyframes giIn { from { opacity: 0; transform: scale(.3) rotate(-25deg); } to { opacity: 1; transform: none; } }
.pwin.cash { animation: cashPop .55s var(--spring); }
@keyframes cashPop { 30% { transform: scale(1.07); background: #27402f; } }

/* ====================== CASES ====================== */
.banner {
  position: relative; height: 62px; border-radius: 20px; overflow: hidden; padding: 11px 16px 0; margin-bottom: 14px;
  background: linear-gradient(90deg, #26292f 0%, #2b2e35 55%, #3a3f48 100%);
}
.banner b { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 900; letter-spacing: .1px; }
.banner b svg { width: 16px; height: 16px; fill: #9aa0aa; }
.banner p { font-size: 11px; line-height: 13.5px; color: #dfe1e6; margin-top: 3px; max-width: 80%; }
.banner img { position: absolute; right: -16px; top: -10px; width: 102px; height: 102px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(160, 230, 255, .35)); animation: floaty 5s ease-in-out infinite; }
.banner::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 120px; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .06), transparent); transform: translateX(-140px); animation: sheen 7s 1s linear infinite; will-change: transform; }
@keyframes sheen { 0% { transform: translateX(-140px); } 40%, 100% { transform: translateX(420px); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-3deg); } }

.lvbar { display: flex; align-items: center; gap: 8px; height: 48px; margin: 0 -15px 0 0; }
.lv { width: 43px; height: 43px; border-radius: 13px; background: #1f2126; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; flex: none; }
.lv span { writing-mode: vertical-rl; transform: rotate(180deg); color: #34c759; font-size: 13px; font-weight: 700; letter-spacing: .2px; }
.lv i { width: 6px; height: 6px; border-radius: 50%; background: #34c759; position: absolute; margin-left: -20px; box-shadow: 0 0 0 0 rgba(52, 199, 89, .6); animation: pulse 1.8s infinite; }
.lv { position: relative; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, .55); } 70% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); } }
.lt { display: flex; gap: 8px; overflow: hidden; flex: 1; height: 48px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.li { flex: none; width: 43px; height: 43px; margin-top: 2px; border-radius: 13px; background: #1f2126; display: grid; place-items: center; position: relative; overflow: hidden; }
.li img { width: 32px; height: 32px; object-fit: contain; }
.li.new { animation: liIn .7s var(--ease) both; }
.li.new::after { content: ''; position: absolute; inset: 0; background: #2aa752; border-radius: 14px; animation: liFlash 1.4s ease-out forwards; }
.li.new img { animation: giIn .6s .35s var(--spring) both; }
@keyframes liIn { from { width: 0; margin-right: -8px; opacity: 0; } to { width: 43px; margin-right: 0; opacity: 1; } }
@keyframes liFlash { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }

.tabs2 { display: flex; gap: 14px; margin: 14px 0 12px; font-size: 19px; font-weight: 500; position: relative; }
.tabs2 span { color: #6d727b; transition: color .3s; cursor: pointer; }
.tabs2 span.on { color: #fff; }
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.case {
  position: relative; aspect-ratio: 158 / 157; border-radius: 22px; overflow: hidden; background: #1f2126; cursor: pointer;
  animation: caseIn .55s var(--ease) backwards; box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
.case { background: linear-gradient(180deg, #1d1f24 0%, #1f2126 45%, color-mix(in srgb, var(--c, #3a3d44) 22%, #1f2126) 100%); }
.case .glow { position: absolute; left: -10%; right: -10%; bottom: -38%; height: 75%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c, #555) 85%, transparent), transparent); opacity: .85; pointer-events: none; }
.case::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c, #555); opacity: .9; box-shadow: 0 -6px 18px var(--c, #555); }
.case > img.art { position: absolute; left: 8%; top: 17%; width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); transition: transform .6s var(--ease); animation: caseFloat 5s ease-in-out infinite; }
.case:nth-child(2n) > img.art { animation-delay: -2.5s; }
@keyframes caseFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.case:active > img.art { transform: scale(1.05); }
.case .new { position: absolute; left: -26px; bottom: 16px; width: 100px; height: 20px; background: #ff2d3d; transform: rotate(45deg); display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 500; letter-spacing: .5px; z-index: 2; transform-origin: center; }
.case .new { transform: rotate(45deg) translate(0, 0); }
.case.free > img.art { top: 4%; width: 74%; left: 13%; height: 74%; }
.case .ft { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 14.5px; font-weight: 500; letter-spacing: 1.4px; z-index: 2; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.case .chips { position: absolute; left: 10px; top: 9px; display: flex; gap: 6px; z-index: 2; }
.chip { height: 24px; padding: 0 9px 0 3px; border-radius: 12px; display: flex; align-items: center; gap: 6px; font-size: 13px; background: rgba(36, 38, 44, .96); font-variant-numeric: tabular-nums; }
.chip svg { width: 19px; height: 19px; }
.case .glint { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .09) 50%, transparent 65%); background-size: 300% 100%; background-position: 150% 0; }
.case:hover .glint, .case.sh .glint { animation: glint 1.1s var(--soft); }
@keyframes glint { to { background-position: -100% 0; } }
@keyframes caseIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.case .spk { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px rgba(255, 255, 255, .6); animation: twk 2.6s ease-in-out infinite; opacity: 0; }
@keyframes twk { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: .85; transform: scale(1); } }

/* ====================== SEASON ====================== */
#p-season { padding-top: 10px; }
.s-banner { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 994 / 559; background: #2a7cf0; }
.s-banner img { width: 100%; height: 100%; object-fit: cover; animation: kb 12s ease-in-out infinite alternate; transform-origin: 50% 60%; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.045); } }
.s-banner .plane { position: absolute; width: 34px; right: 22%; top: 40%; opacity: .9; animation: plane 9s ease-in-out infinite; }
@keyframes plane { 0%, 100% { transform: translate(0, 0) rotate(-8deg); } 50% { transform: translate(-10px, -6px) rotate(-14deg); } }
.s-btn { width: 100%; margin-top: 14px; cursor: default; }
.s-list { margin-top: 14px; border-radius: 22px; background: #1f2126; padding: 0 0 4px; }
.srow { display: flex; align-items: center; height: 74px; position: relative; padding: 0 14px 0 0; }
.srow + .srow::before { content: ''; position: absolute; left: 60px; right: 14px; top: 0; height: 1px; background: rgba(255, 255, 255, .07); }
.srow .rk { width: 60px; flex: none; display: grid; place-items: center; color: #5b6069; font-size: 22px; font-weight: 300; }
.srow .rk img { width: 30px; height: 30px; }
.srow .av { width: 40px; height: 40px; }
.srow .inf { flex: 1; min-width: 0; margin-left: 14px; }
.srow .nm { font-size: 13.5px; line-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .st { display: flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; color: #dfe1e5; margin-top: 3px; }
.srow .st .sep { width: 1px; height: 13px; background: #4b5058; margin: 0 4px; }
.srow .st .lvl { display: flex; align-items: center; gap: 5px; }
.srow .st .lvl svg { width: 12px; height: 12px; border-radius: 50%; background: #3f8cf2; fill: #fff; padding: 2px; }
.srow .pz { width: 44px; height: 44px; flex: none; }
.srow .pz img { width: 100%; height: 100%; object-fit: contain; }
.srow.rv { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--soft), transform .6s var(--ease); }
.srow.rv.vis { opacity: 1; transform: none; }

/* ====================== PROFILE ====================== */
#p-profile { background-color: var(--bg); }
#p-profile .pat { position: absolute; left: 0; right: 0; top: 0; height: 1200px; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='%23fff'%3E%3Cpath transform='translate(10 8) rotate(40 12 12)' d='M12 1c3 2.5 4.5 6.5 4.5 11v5l2.5 3v3l-4-1.8h-6L5 23v-3l2.5-3v-5C7.5 7.5 9 3.5 12 1z'/%3E%3Cpath transform='translate(52 48) rotate(40 12 12)' d='M12 1c3 2.5 4.5 6.5 4.5 11v5l2.5 3v3l-4-1.8h-6L5 23v-3l2.5-3v-5C7.5 7.5 9 3.5 12 1z'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent); }
#p-profile > *:not(.pat) { position: relative; }
.pf-av { width: 114px; height: 114px; border-radius: 50%; overflow: hidden; margin: 2px auto 0; background: #2a2d33; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.pf-av img { width: 100%; height: 100%; object-fit: cover; }
.pf-name { text-align: center; font-size: 25px; font-weight: 400; margin-top: 14px; }
.pf-sub { text-align: center; color: #6e737c; font-size: 16px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.pf-bar { width: 150px; height: 3px; border-radius: 2px; background: #2a2d33; margin: 9px auto 0; overflow: hidden; }
.pf-bar i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 2px; }
.pf-btns { display: flex; gap: 15px; margin-top: 14px; }
.pf-btns button { flex: 1; height: 47px; border-radius: 24px; font-size: 15px; font-weight: 500; }
.pf-btns .a { background: var(--blue); }
.pf-btns .b { background: #16233a; border: 1.5px solid #1d6fe6; color: #3a8bff; }
.ref { margin-top: 16px; border-radius: 22px; background: #1f2126; overflow: hidden; }
.ref .top {
  position: relative; height: 99px; border-radius: 22px; overflow: hidden; padding: 13px 15px 0;
  background: radial-gradient(120% 140% at 85% 30%, #46506a 0%, #2f3850 38%, #252b3b 70%, #20242e 100%);
}
.ref .top .stars { position: absolute; inset: 0; opacity: .7; background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 60% 70%, #fff, transparent), radial-gradient(1px 1px at 75% 20%, #fff, transparent), radial-gradient(1px 1px at 40% 85%, #cfd8ff, transparent), radial-gradient(1px 1px at 52% 15%, #fff, transparent), radial-gradient(1px 1px at 10% 80%, #fff, transparent); }
.ref h3 { font-size: 19px; font-weight: 400; letter-spacing: 2px; line-height: 24px; position: relative; }
.ref p { font-size: 11px; line-height: 14px; margin-top: 3px; color: #e9ebef; position: relative; max-width: 72%; }
.ref .chips2 { display: flex; gap: 6px; margin-top: 7px; position: relative; z-index: 2; }
.ref .chips2 span { height: 20px; border-radius: 10px; padding: 0 8px 0 3px; background: rgba(20, 24, 33, .78); display: flex; align-items: center; gap: 4px; font-size: 9.5px; white-space: nowrap; }
.ref .chips2 span svg { width: 13px; height: 13px; }
.ref .chips2 #terms { cursor: pointer; }
.ref .peach { position: absolute; right: -36px; top: -26px; width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(-4px 6px 14px rgba(0, 0, 0, .45)); animation: floaty 6s ease-in-out infinite; }
.ref .bt { display: flex; height: 33px; align-items: center; }
.ref .bt button { flex: 1; height: 100%; color: #3a8bff; font-size: 14.5px; }
.ref .bt i { width: 1px; height: 100%; background: rgba(255, 255, 255, .08); }
.inv { margin-top: 16px; height: 128px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .06); background: rgba(31, 33, 38, .55); display: grid; place-items: center; color: #4f535b; font-size: 16.5px; }

/* ====================== NAV ====================== */
#nav {
  position: absolute; z-index: 20; left: 23px; right: 23px; bottom: calc(16px + var(--safe-b)); height: 54px; border-radius: 27px;
  display: flex; padding: 3px; background: rgba(31, 33, 39, .72); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .035);
  transition: transform .5s var(--ease), opacity .4s;
}
#nav .it { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #7c818a; font-size: 10.5px; position: relative; z-index: 1; transition: color .3s; }
#nav .it svg { width: 25px; height: 25px; fill: currentColor; transition: transform .45s var(--spring); }
#nav .it.on { color: #3d8bff; }
#nav .it.on svg { transform: translateY(-1px) scale(1.06); }
#nav .it:active svg { transform: scale(.86); transition-duration: .1s; }
.nav-hl { position: absolute; top: 3px; bottom: 3px; left: 3px; width: 64px; border-radius: 24px; background: rgba(36, 72, 128, .42); transition: transform .5s var(--spring); }

/* ====================== MODALS ====================== */
#modals { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.ov { position: absolute; inset: 0; pointer-events: auto; }
.ov .scrim { position: absolute; inset: 0; background: rgba(8, 9, 12, .4); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); opacity: 0; transition: opacity .4s var(--soft); will-change: opacity; }
.ov.in .scrim { opacity: 1; }
.ov.stack .scrim { opacity: 0 !important; }
.ov.hid .sheet { transform: translateY(calc(100% + 110px)) !important; }
.ov.hid .sbtn { transform: translateY(150%) !important; opacity: 0 !important; }
.ov.hid > * { pointer-events: none; }
.sheet {
  position: absolute; left: 11px; right: 11px; bottom: calc(83px + var(--safe-b)); max-height: calc(100% - 120px);
  border-radius: 30px; background: #1d1f24; border: 1px solid rgba(255, 255, 255, .06); padding: 0 10px 14px;
  display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(0, 0, 0, .35);
  transform: translateY(calc(100% + 110px)); transition: transform .55s var(--ease), height .45s var(--ease); will-change: transform;
  touch-action: none;
}
.ov.in .sheet { transform: none; }
.sheet.drag { transition: none !important; }
.sheet .grab { flex: none; width: 38px; height: 4px; border-radius: 2px; background: #3b3f46; margin: 15px auto 10px; }
.sheet .hd { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 40px; }
.hd .t { height: 37px; border-radius: 19px; padding: 0 15px; background: #282b31; display: flex; align-items: center; font-size: 14.5px; white-space: nowrap; }
.hd .t.c { margin: 0 auto; }
.hd .t.multi { height: auto; white-space: normal; text-align: center; padding: 9px 22px; line-height: 20px; font-size: 14.5px; color: #d3d6dc; width: 100%; border-radius: 22px; }
.hd .r { height: 34px; border-radius: 17px; padding: 0 13px; background: #24272c; display: flex; align-items: center; font-size: 14px; color: #80858e; transition: background .3s, color .3s; }
.hd .r.act { background: #2d3036; color: #fff; }
.hd .r.btn { cursor: pointer; }
.sheet .body { touch-action: pan-y; position: relative; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; flex: 1 1 auto; min-height: 0; }
.sheet .body::-webkit-scrollbar { display: none; }
.sbtn {
  position: absolute; left: 26px; right: 26px; bottom: calc(14px + var(--safe-b)); height: 48px; border-radius: 24px; background: var(--blue);
  font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 10px; overflow: hidden;
  transform: translateY(150%); opacity: 0; transition: transform .55s .04s var(--ease), opacity .3s, background .3s, left .4s var(--ease), right .4s var(--ease);
}
.ov.in .sbtn { transform: none; opacity: 1; }
.sbtn.dim { background: var(--blue-d); color: #d8e6ff; }
.sbtn.wide { left: 40px; right: 40px; }
.sbtn.two { background: none; gap: 12px; }
.sbtn.two button { flex: 1; height: 48px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 15.5px; font-weight: 500; line-height: 17px; }
.sbtn.two button small { font-size: 14px; font-weight: 400; opacity: .7; }
.sbtn.two .a { background: var(--blue); }
.sbtn.two .o { background: var(--orange); }
.sbtn .bl { display: inline-flex; align-items: center; gap: 8px; animation: lblIn .35s var(--ease); }
@keyframes lblIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sbtn svg.spin { width: 22px; height: 22px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* segmented */
.seg { position: relative; flex: none; display: flex; height: 44px; padding: 4px; border-radius: 24px; background: #26292e; margin-bottom: 12px; }
.seg > i { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 20px; background: #3b82f0; transition: left .45s var(--spring), width .45s var(--spring); }
.seg button { position: relative; z-index: 1; flex: 1; font-size: 14px; color: #e9eaee; padding: 0 2px; white-space: nowrap; transition: color .3s; }
.seg.sm { height: 36px; padding: 3px; border-radius: 18px; margin: 0; }
.seg.sm > i { top: 3px; bottom: 3px; border-radius: 15px; background: #34383f; box-shadow: none; }
.seg.sm button { padding: 0 14px; font-size: 14.5px; }

.tabv { animation: tabIn .38s var(--ease) backwards; }
body.noanim .stg, body.noanim .case, body.noanim .prow { animation: none !important; }
@keyframes tabIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.info { border-radius: 22px; background: #26292e; padding: 8px 12px; }
.info .r { display: flex; align-items: center; gap: 14px; min-height: 52px; font-size: 14.5px; line-height: 19px; color: #e0e2e6; padding: 5px 0; }
.info .r .ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; }
.info .r .ic img { width: 34px; height: 34px; object-fit: contain; }
.info a { color: #3d8bff; }
.relay { border-radius: 50%; background: radial-gradient(circle at 40% 35%, #8fe36b, #47b32c); overflow: hidden; }
.relay img { width: 30px !important; height: 30px !important; margin-top: 4px; }

.wcard { position: relative; min-height: 82px; padding-bottom: 10px !important; border-radius: 20px; background: linear-gradient(90deg, #2c2f36, #30343c); overflow: hidden; padding: 14px 14px 0; }
.wcard b { font-size: 13px; font-weight: 500; display: block; position: relative; z-index: 1; }
.wcard p { font-size: 11px; line-height: 17px; color: #c8cbd1; margin-top: 2px; max-width: 64%; position: relative; z-index: 1; }
.wcard img { position: absolute; right: 0; top: 0; height: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
.wcard .sp { position: absolute; inset: 0; opacity: .6; background-image: radial-gradient(1px 1px at 55% 25%, #fff, transparent), radial-gradient(1px 1px at 46% 70%, #cfd8ff, transparent), radial-gradient(1px 1px at 63% 55%, #fff, transparent); }

.lbl { font-size: 14px; color: #5f646d; margin: 2px 14px 7px; display: flex; justify-content: space-between; }
.lbl a { color: #3d8bff; font-size: 14.5px; }
.inp { height: 44px; border-radius: 22px; background: #26292e; display: flex; align-items: center; padding: 0 15px; margin-bottom: 12px; transition: box-shadow .25s; }
.inp:focus-within { box-shadow: 0 0 0 1.5px #3b82f0 inset; }
.inp input { width: 100%; font-size: 15px; }
.inp input::placeholder { color: #8a8f98; }
.coins { margin-bottom: 12px; }

.auto { display: flex; gap: 12px; }
.auto .tg { flex: 1; height: 40px; border-radius: 20px; background: #26292e; display: flex; align-items: center; justify-content: space-between; padding: 0 5px 0 12px; font-size: 15px; cursor: pointer; }
.sw { width: 36px; height: 24px; border-radius: 12px; background: #fff; position: relative; transition: background .3s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .4s var(--spring), background .3s; }
.sw.on { background: #3b82f0; }
.sw.on::after { transform: translateX(12px); background: #3b82f0; box-shadow: none; }
.auto .step { flex: 1; height: 40px; border-radius: 20px; background: #26292e; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; font-size: 16px; letter-spacing: 1.5px; }
.auto .step button { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; transition: background .2s; }
.auto .step button:active { background: #353840; }
.auto .step button svg { width: 15px; height: 15px; stroke: #e6e8ec; stroke-width: 1.8; fill: none; stroke-linecap: round; }
.auto .step span { font-variant-numeric: tabular-nums; }

/* settings */
.set-hd { flex: none; display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 6px; }
.set-hd .t { height: 37px; border-radius: 19px; padding: 0 14px; background: #282b31; display: flex; align-items: center; font-size: 14.5px; }
.set-hd .vib { width: 36px; height: 36px; border-radius: 50%; background: #2a2d33; display: grid; place-items: center; transition: opacity .3s; }
.set-hd .vib svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.8; }
.set-hd .vib.off { opacity: .4; }
.skins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.skins > div { aspect-ratio: 1; border-radius: 16px; background: #262930; display: grid; place-items: center; border: 1px solid transparent; transition: border-color .3s, background .3s; position: relative; }
.skins > div.sel { border-color: #2d7ff5; background: #252a33; }
.skins > div img { width: 66%; }
.skins > div svg { width: 28px; height: 28px; fill: #3a3e45; }
.bgs { display: flex; flex-direction: column; gap: 16px; }
.bgs > div { height: 172px; border-radius: 16px; overflow: hidden; border: 1px solid transparent; position: relative; cursor: pointer; transition: border-color .3s, transform .3s var(--spring); background: #0a0b0e; }
.bgs > div canvas { width: 100%; height: 100%; display: block; }
.bgs > div.sel { border-color: #2d7ff5; box-shadow: 0 0 0 1px #2d7ff5; }

/* rewards */
.rew { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.rew > div { aspect-ratio: 1; border-radius: 16px; background: #262930; position: relative; overflow: hidden; }
.rew span { position: absolute; left: 10px; top: 8px; font-size: 12.5px; color: #e6e8ec; z-index: 1; }
.rew img { position: absolute; left: 50%; top: 56%; width: 58%; height: 58%; object-fit: contain; transform: translate(-50%, -50%); }
.rew .lk img { filter: blur(7px) saturate(1.2); opacity: .7; }
.rew .got img { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); }

/* tasks */
.tk { display: flex; align-items: center; gap: 16px; min-height: 64px; font-size: 16.5px; line-height: 21px; color: #f0f1f4; }
.tk .ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden; }
.tk .ic img { width: 38px; height: 38px; }
.tk .ic svg { width: 20px; height: 20px; }
.tk .ic svg.ev { width: 38px; height: 38px; }
.tk .ck { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #464a52; flex: none; transition: all .3s; }

/* case modal */
.reels { flex: none; margin: 0 -10px; position: relative; }
.rrow { position: relative; height: 113px; overflow: hidden; margin-bottom: 0; }
.rrow + .rrow { margin-top: 0; }
.rtrack { position: absolute; left: 0; top: 4px; display: flex; gap: 8px; will-change: transform; }
.rt { width: 106px; height: 105px; border-radius: 16px; background: #262930; position: relative; flex: none; transition: background .4s; }
.rt.win { background: #3a3e46; animation: winTile .8s var(--spring); }
@keyframes winTile { 0% { transform: scale(1); } 35% { transform: scale(1.08); } 100% { transform: scale(1); } }
.rt img { position: absolute; left: 50%; top: 58%; width: 66px; height: 66px; object-fit: contain; transform: translate(-50%, -50%); }
.vch { position: absolute; left: 6px; top: 8px; height: 22px; padding: 0 7px 0 2px; border-radius: 11px; background: rgba(28, 30, 35, .92); display: flex; align-items: center; gap: 5px; font-size: 14px; white-space: nowrap; z-index: 2; font-variant-numeric: tabular-nums; }
.vch svg { width: 18px; height: 18px; }
.ptr { position: absolute; left: 50%; width: 0; height: 0; z-index: 3; transform: translateX(-50%); border-left: 9px solid transparent; border-right: 9px solid transparent; filter: drop-shadow(0 0 6px rgba(45, 125, 255, .5)); }
.ptr.t { top: 0; border-top: 14px solid #3a86ff; }
.ptr.b { bottom: 0; border-bottom: 14px solid #3a86ff; }
.rrow .fade { position: absolute; top: 0; bottom: 0; width: 26px; z-index: 2; pointer-events: none; }
.rrow .fade.l { left: 0; background: linear-gradient(90deg, #1d1f24, transparent); }
.rrow .fade.r { right: 0; background: linear-gradient(-90deg, #1d1f24, transparent); }
.cnt { margin: 10px 0 2px; }
.cnt > i { background: #3b82f0; }
.sect { font-size: 14px; color: #5f646d; margin: 16px 0 9px 2px; letter-spacing: .3px; }
.cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cell { height: 92px; border-radius: 16px; background: #262930; position: relative; overflow: hidden; }
.cell .vch { left: 6px; top: 7px; }
.cell img { position: absolute; left: 50%; top: 60%; width: 52px; height: 52px; object-fit: contain; transform: translate(-50%, -50%); }

/* win */
.got { border-radius: 20px; background: #26292e; padding: 8px 10px; }
.got .it { display: flex; align-items: center; gap: 14px; height: 70px; animation: rowIn .5s var(--ease) backwards; }
.got .ic { width: 54px; height: 54px; border-radius: 13px; background: #3b82f0; display: grid; place-items: center; overflow: hidden; flex: none; }
.got .ic img, .got .ic .lot { width: 46px; height: 46px; }
.got .nm { font-size: 15.5px; font-weight: 500; }
.got .sb { font-size: 14px; color: #a7abb3; margin-top: 2px; }

/* toasts */
#toasts { position: absolute; top: 8px; left: 10px; right: 10px; z-index: 70; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  height: 50px; border-radius: 25px; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 8px; font-size: 14px;
  background: linear-gradient(90deg, rgba(38, 30, 34, .92), rgba(96, 32, 40, .82)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); animation: tIn .5s var(--spring) both; transition: opacity .3s, transform .35s var(--ease);
}
.toast i { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #1b1c20; font-style: normal; font-weight: 900; display: grid; place-items: center; font-size: 17px; flex: none; }
.toast.okk { background: linear-gradient(90deg, rgba(30, 38, 34, .92), rgba(28, 92, 52, .82)); }
.toast.out { opacity: 0; transform: translateY(-14px) scale(.96); }
@keyframes tIn { from { opacity: 0; transform: translateY(-22px) scale(.92); } to { opacity: 1; transform: none; } }

#fxc { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }

/* ====================== LOADER ====================== */
#loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; transition: opacity .55s var(--soft), visibility 0s .55s; } /* same position and background as the inline loader styles in index.html: no jump when this file arrives */
#loader.out { opacity: 0; visibility: hidden; }
#loader.out .ld-wrap { transform: scale(1.08); filter: blur(4px); }
.ld-wrap { width: 264px; transition: transform .6s var(--ease), filter .5s; margin-top: -40px; }
.ld-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.ld-cell { aspect-ratio: 1; border-radius: 13px; position: relative; overflow: hidden; transform: scale(.5); opacity: 0; transition: transform .7s var(--spring), opacity .35s; }
.ld-cell.on { transform: none; opacity: 1; }
.ld-cell img { position: absolute; left: 17%; top: 17%; width: 66%; height: 66%; object-fit: contain; opacity: 0; transform: scale(.3) rotate(-20deg); transition: transform .65s var(--spring), opacity .3s; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25)); }
.ld-cell img.on { opacity: 1; transform: none; }
.ld-cell img.gone { opacity: 0; transform: scale(1.3) rotate(12deg); }
.ld-cell .rk { left: 10%; top: 10%; width: 80%; height: 80%; transform: translate(-60%, 60%) scale(.6); }
.ld-cell .rk.on { transform: none; }
.ld-bar { height: 6px; border-radius: 3px; background: #3a3d44; margin-top: 15px; overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; }
.ld-txt { text-align: center; font-size: 12px; letter-spacing: 1.6px; margin-top: 14px; color: #e9eaee; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
