/* ================= Premium Play/home styling (v20261014q) ================= */
.view[data-view="play"] { position: relative; isolation: isolate; }
/* Aurora background */
.view[data-view="play"]::before {
  content: ""; position: absolute; inset: -40px -16px auto; height: 720px; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 30% at 20% 12%, rgba(124, 92, 255, .45), transparent 70%),
    radial-gradient(35% 28% at 85% 22%, rgba(0, 198, 255, .35), transparent 70%),
    radial-gradient(45% 30% at 50% 58%, rgba(255, 92, 200, .18), transparent 72%);
  filter: blur(18px); animation: auroraDrift 18s ease-in-out infinite alternate; will-change: transform;
}
@keyframes auroraDrift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(12px,-10px,0) scale(1.06); } 100% { transform: translate3d(-10px,8px,0) scale(1.02); } }

/* Glass balance card + shimmer */
.home-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.03)) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 18px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.18) !important;
  border-radius: 24px !important;
}
.home-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.13) 45%, transparent 60%);
  background-size: 250% 100%; animation: heroShimmer 5.5s ease-in-out infinite;
}
@keyframes heroShimmer { 0% { background-position: 150% 0; } 60%, 100% { background-position: -100% 0; } }
.hero-label { letter-spacing: .14em; text-transform: uppercase; font-size: .7rem !important; color: #b9c2ea !important; }
.hero-balance #heroPoints {
  background: linear-gradient(90deg, #fff 0%, #ffe9a8 40%, #8fe9ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 2px 12px rgba(124,108,255,.45));
}

/* Stat chips */
.hero-chip {
  background: rgba(255,255,255,.07) !important; border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1); border-radius: 999px !important;
  transition: transform .15s ease, background .2s;
}
.hero-chip b { color: #fff; }
.hero-chip.vip { background: linear-gradient(135deg, rgba(255,200,80,.25), rgba(255,140,60,.15)) !important; border-color: rgba(255,200,80,.45) !important; }

/* Progress bar */
.hero-progress { height: 10px !important; border-radius: 999px !important; background: rgba(255,255,255,.08) !important; box-shadow: inset 0 1px 3px rgba(0,0,0,.4); overflow: hidden; }
.hero-progress-fill {
  position: relative; border-radius: inherit;
  background: linear-gradient(90deg, #7c5cff, #00c6ff, #3ef2c0) !important;
  box-shadow: 0 0 12px rgba(0,198,255,.6);
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.hero-progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 8px, transparent 8px 16px);
  background-size: 32px 100%; animation: barStripes 1.2s linear infinite;
}
@keyframes barStripes { to { background-position: 32px 0; } }
.ring-fg { filter: drop-shadow(0 0 4px currentColor); transition: stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1); }
.ring-wrap, .spark-wrap { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); border-radius: 16px; padding: 6px 8px; }

/* Daily button */
.play-daily-btn { position: relative; overflow: hidden; }
.play-daily-btn::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); animation: btnSweep 3.8s ease-in-out infinite; }
@keyframes btnSweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }

/* Glowing 3D coin */
.tap-btn { position: relative; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); }
.tap-btn::before {
  content: ""; position: absolute; inset: -8%; border-radius: 50%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, #7c5cff, #00c6ff, #3ef2c0, #ffcf5c, #ff5cc8, #7c5cff);
  filter: blur(22px); opacity: .55; animation: coinHalo 8s linear infinite;
}
@keyframes coinHalo { to { transform: rotate(360deg); } }
.tap-core { box-shadow: inset 0 -10px 24px rgba(0,0,0,.35), inset 0 8px 18px rgba(255,255,255,.25), 0 0 0 3px rgba(255,255,255,.08); }
.tap-ripple {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(143,233,255,.9); box-shadow: 0 0 18px rgba(0,198,255,.7);
  animation: tapRipple .65s ease-out forwards;
}
@keyframes tapRipple { from { transform: scale(1); opacity: .95; } to { transform: scale(14); opacity: 0; } }
.float-point {
  font-weight: 800 !important; font-size: 1.35rem !important;
  background: linear-gradient(180deg, #fff, #ffe08a); -webkit-background-clip: text; background-clip: text; color: transparent !important;
  filter: drop-shadow(0 2px 6px rgba(255,190,60,.7));
}

/* Quick actions */
.qa-card {
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)) !important;
  border: 1px solid rgba(255,255,255,.12) !important; border-radius: 16px !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .15s ease, box-shadow .2s ease;
}
.qa-card:active { transform: translateY(1px) scale(.96); }
.qa-ico { filter: drop-shadow(0 2px 6px rgba(124,108,255,.55)); }
.play-jetton, .play-actions .ghost-btn { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.play-actions .ghost-btn { border-color: rgba(255,255,255,.14) !important; background: rgba(255,255,255,.05) !important; }

/* Cleaner bottom nav (keeps 2 x 5 grid, no overflow) */
.tabbar { background: linear-gradient(180deg, rgba(22,28,52,.82), rgba(10,13,24,.95)) !important; backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border-top: 1px solid rgba(255,255,255,.12) !important; }
.tab { position: relative; }
.tab.active::after { content: ""; position: absolute; bottom: 3px; left: 35%; right: 35%; height: 2px; border-radius: 2px; background: #8fe9ff; box-shadow: 0 0 8px #00c6ff; }

/* Section entrance */
.view.active[data-view="play"] > .home-hero,
.view.active[data-view="play"] > .tap-btn,
.view.active[data-view="play"] > .quick-actions { animation: riseIn .45s cubic-bezier(.2,.8,.2,1) both; }
.view.active[data-view="play"] > .tap-btn { animation-delay: .06s; }
.view.active[data-view="play"] > .quick-actions { animation-delay: .12s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Support FAB must not cover the Profile Save button */
.view[data-view="profile"] { padding-bottom: 96px; }
.profile-edit-form { scroll-margin-bottom: 96px; }
body:has(.view[data-view="profile"].active) .support-fab:not(.dragging) { bottom: calc(var(--tab-h) + var(--safe-bottom) + 72px) !important; top: auto !important; }
body:has(.view[data-view="profile"].active) .wa-fab { bottom: calc(var(--tab-h) + var(--safe-bottom) + 132px) !important; }

@media (prefers-reduced-motion: reduce) {
  .view[data-view="play"]::before, .home-hero::after, .hero-progress-fill::after, .play-daily-btn::after,
  .tap-btn::before, .tap-ripple, .view.active[data-view="play"] > * { animation: none !important; }
  .hero-progress-fill, .ring-fg { transition: none !important; }
}
/* Keep Save clear of the FAB column (FAB sits ~10-58px from the right edge) */
.view[data-view="profile"] .profile-edit-actions { padding-right: 40px; }

/* ================= USDT next to GMO on the balance card ================= */
.hero-bal-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hero-bal-row .hero-balance { margin: 0; min-width: 0; }
.hero-usdt {
  margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(38,161,123,.28), rgba(38,161,123,.10)); border: 1px solid rgba(38,161,123,.55);
  box-shadow: 0 4px 14px rgba(38,161,123,.25), inset 0 1px 0 rgba(255,255,255,.15);
  font-weight: 800; font-variant-numeric: tabular-nums; color: #eafff6; white-space: nowrap;
}
.hero-usdt small { font-weight: 600; color: #9de8cc; font-size: .72rem; }
.hero-usdt-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #26a17b; color: #fff; font-size: .9rem; box-shadow: 0 0 10px rgba(38,161,123,.7); }

/* ================= 3D bottom dock ================= */
:root { --tab-h: 136px; }
.tabbar {
  grid-auto-rows: 54px !important; gap: 8px 6px !important;
  padding: 10px 10px calc(10px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
  padding-bottom: max(10px, calc(10px + env(safe-area-inset-bottom, 0px))) !important;
  height: auto !important; max-height: none !important; overflow: visible !important;
  border-radius: 24px 24px 0 0 !important; border-top: 0 !important;
  background: linear-gradient(180deg, rgba(28,34,66,.92), rgba(9,12,24,.98)) !important;
  box-shadow: 0 -1px 0 rgba(143,233,255,.55), 0 -6px 22px rgba(0,198,255,.22), 0 -14px 40px rgba(124,92,255,.25), inset 0 1px 0 rgba(255,255,255,.12) !important;
}
.tabbar::before { /* neon rim */
  content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #7c5cff, #00c6ff, #3ef2c0, #ff5cc8, transparent);
  box-shadow: 0 0 12px rgba(0,198,255,.8);
}
.tab {
  height: 54px !important; padding: 5px 2px 6px !important; gap: 3px !important; overflow: visible !important;
  font-size: 10.5px !important; line-height: 1.15 !important; color: #b4bedf !important; text-overflow: clip !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 4px 0 rgba(0,0,0,.45), 0 8px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.18) !important;
  transform: translateY(-2px); transition: transform .12s ease, box-shadow .12s ease, background .2s, color .2s !important;
}
.tab span { font-size: 19px !important; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)) drop-shadow(0 0 6px rgba(124,108,255,.45)); transition: transform .2s ease; }
.tab:active { transform: translateY(2px) !important; box-shadow: 0 0 0 rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.35), inset 0 2px 6px rgba(0,0,0,.35) !important; }
.tab.active {
  transform: translateY(-5px) !important; color: #fff !important;
  background: linear-gradient(160deg, #8a6cff 0%, #3a8dff 55%, #00c6ff 100%) !important;
  border-color: rgba(255,255,255,.35) !important;
  box-shadow: 0 5px 0 #2b2a8a, 0 10px 22px rgba(0,198,255,.45), 0 0 18px rgba(124,108,255,.6), inset 0 1px 0 rgba(255,255,255,.45) !important;
}
.tab.active span { transform: scale(1.12); filter: drop-shadow(0 0 8px rgba(255,255,255,.8)); }
.tab.active::after { display: none; }
@media (max-width: 374px) { .tabbar { gap: 7px 4px !important; padding-left: 6px !important; padding-right: 6px !important; } .tab { font-size: 9.6px !important; } .tab span { font-size: 17px !important; } }
@media (prefers-reduced-motion: reduce) { .tab, .tab span { transition: none !important; } }

/* ================= Website sign-in ================= */
html.web-login-open, html.web-login-open body { overflow: hidden; }
html.web-login-open #missingInitBanner, html.web-login-open .onboarding { display: none !important; }
.web-login {
  position: fixed; inset: 0; z-index: 200; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; justify-content: center; align-items: flex-start;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(45% 30% at 15% 10%, rgba(124,92,255,.55), transparent 70%),
    radial-gradient(40% 30% at 90% 25%, rgba(0,198,255,.40), transparent 70%),
    radial-gradient(50% 35% at 50% 95%, rgba(255,92,200,.25), transparent 72%), #080b16;
}
.web-login[hidden] { display: none !important; }
.wl-card {
  width: 100%; max-width: 420px; margin: auto 0; padding: 24px 20px 20px; border-radius: 26px;
  background: linear-gradient(150deg, rgba(255,255,255,.11), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.18); color: #eef1ff;
  animation: riseIn .45s cubic-bezier(.2,.8,.2,1) both;
}
.wl-brand { text-align: center; margin-bottom: 16px; }
.wl-logo { border-radius: 20px; filter: drop-shadow(0 8px 24px rgba(124,108,255,.6)); }
.wl-brand h1 { margin: 8px 0 2px; font-size: 1.7rem; background: linear-gradient(90deg,#fff,#ffe9a8,#8fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wl-sub { margin: 0; color: #aab4da; font-size: .85rem; }
.wl-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08); margin-bottom: 16px; }
.wl-tab { border: 0; border-radius: 12px; padding: 10px 6px; font: inherit; font-weight: 700; font-size: .9rem; color: #aab4da; background: transparent; cursor: pointer; transition: background .2s, color .2s; }
.wl-tab.active { color: #fff; background: linear-gradient(135deg,#8a6cff,#00c6ff); box-shadow: 0 6px 16px rgba(0,198,255,.35); }
.wl-tg { text-align: center; padding: 14px 12px; border-radius: 18px; background: rgba(42,171,238,.10); border: 1px solid rgba(42,171,238,.35); }
.wl-label { margin: 0 0 10px; font-size: .82rem; color: #cfe9ff; }
.wl-tg-widget { min-height: 44px; display: flex; justify-content: center; }
.wl-tg-open { display: inline-block; margin-top: 8px; font-size: .8rem; color: #8fd6ff; text-decoration: none; }
.wl-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: #7f89ad; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.wl-or::before, .wl-or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.12); }
.wl-form { display: flex; flex-direction: column; gap: 10px; }
.wl-form label { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; font-weight: 600; color: #b9c2ea; }
.wl-form input {
  font: inherit; font-size: 16px; color: #fff; padding: 12px 14px; border-radius: 14px; outline: none;
  background: rgba(0,0,0,.30); border: 1px solid rgba(255,255,255,.14); transition: border-color .2s, box-shadow .2s;
}
.wl-form input:focus { border-color: #00c6ff; box-shadow: 0 0 0 3px rgba(0,198,255,.25); }
.wl-submit { padding: 13px; font-size: 1rem; font-weight: 800; margin-top: 4px; }
.wl-msg { margin: 0; padding: 9px 12px; border-radius: 12px; font-size: .85rem; font-weight: 600; }
.wl-msg.no { background: rgba(255,71,87,.14); border: 1px solid rgba(255,71,87,.4); color: #ffb3bb; }
.wl-msg.ok { background: rgba(46,204,113,.12); border: 1px solid rgba(46,204,113,.35); color: #9df0bf; }
.wl-hint, .wl-foot { margin: 4px 0 0; font-size: .75rem; color: #8e98bd; line-height: 1.4; }
.wl-foot { margin-top: 16px; text-align: center; }
#profilePasswordForm[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .wl-card { animation: none !important; } .wl-tab, .wl-form input { transition: none !important; } }
/* Google sign-in button (Google brand guidelines: white, Roboto-like, multicolor G) */
.wl-google { margin-top: 12px; display: flex; flex-direction: column; align-items: stretch; }
.gsi-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; height: 44px; padding: 0 12px;
  background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 22px; text-decoration: none;
  font-family: Roboto, "Google Sans", Arial, sans-serif; font-size: 14px; font-weight: 500; letter-spacing: .25px;
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); transition: background .15s, box-shadow .15s;
}
.gsi-btn[hidden] { display: none; }
.gsi-btn:hover { background: #f8f9fa; } .gsi-btn:active { background: #eceef1; }
.gsi-btn:focus-visible { outline: 2px solid #00c6ff; outline-offset: 2px; }
.gsi-icon { display: flex; width: 20px; height: 20px; }
.wl-google-off { text-align: center; }
@media (prefers-reduced-motion: reduce) { .gsi-btn { transition: none; } }
.profile-link-google { width: 100%; margin-top: 10px; cursor: pointer; }

/* ===== Website gate: nothing of the app (or its ads/popups) shows until signed in ===== */
html.web-gate-pending #app, html.web-login-open #app { visibility: hidden !important; }
html.web-gate-pending .popup-ad-modal, html.web-login-open .popup-ad-modal,
html.web-gate-pending .tap-ad-modal, html.web-login-open .tap-ad-modal,
html.web-gate-pending .tap-ad-modal, html.web-login-open .tap-ad-modal { display: none !important; }
/* FABs keep their layout (their drag position is measured) — only invisible while gated. */
html.web-gate-pending .support-fab, html.web-login-open .support-fab,
html.web-gate-pending .wa-fab, html.web-login-open .wa-fab { visibility: hidden !important; pointer-events: none !important; }
html.web-gate-pending body {
  background: radial-gradient(45% 30% at 15% 10%, rgba(124,92,255,.45), transparent 70%), radial-gradient(40% 30% at 90% 25%, rgba(0,198,255,.32), transparent 70%), #080b16;
}
html.web-gate-pending body::after {
  content: ""; position: fixed; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15); border-top-color: #00c6ff; animation: coinHalo .8s linear infinite; z-index: 2147483000;
}
.web-login { z-index: 2147483600 !important; visibility: visible !important; }
@media (prefers-reduced-motion: reduce) { html.web-gate-pending body::after { animation: none; } }
/* Branded "Login with Telegram" card (official widget iframe stays untouched inside) */
.wl-tg { background: linear-gradient(160deg, rgba(42,171,238,.22), rgba(34,158,217,.08)) !important; border: 1px solid rgba(42,171,238,.55) !important; box-shadow: 0 8px 24px rgba(34,158,217,.2), inset 0 1px 0 rgba(255,255,255,.12); }
.wl-tg-head { display: flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 12px; }
.wl-tg-logo { flex: 0 0 44px; filter: drop-shadow(0 4px 12px rgba(42,171,238,.55)); }
.wl-tg-title { margin: 0 0 2px; font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: .01em; }
.wl-tg-head .wl-label { margin: 0; }
/* "Tap again in" countdown */
.tap-timer {
  display: flex; align-items: center; gap: 12px; margin: 10px auto 4px; max-width: 360px; padding: 12px 16px; border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.03)); border: 1px solid rgba(143,233,255,.35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 26px rgba(0,0,0,.35), 0 0 18px rgba(0,198,255,.18), inset 0 1px 0 rgba(255,255,255,.15);
}
.tap-timer[hidden] { display: none; }
.tap-timer-ico { font-size: 1.6rem; filter: drop-shadow(0 0 8px rgba(255,200,80,.6)); animation: timerPulse 2s ease-in-out infinite; }
.tap-timer-txt p { margin: 0; }
.tap-timer-main { font-size: .95rem; color: #dfe6ff; font-weight: 600; }
.tap-timer-main b { font-variant-numeric: tabular-nums; font-size: 1.25rem; font-weight: 800; letter-spacing: .03em; background: linear-gradient(90deg, #fff, #8fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tap-timer-sub { font-size: .78rem; color: #9fb0d8; margin-top: 2px !important; }
.tap-btn.tap-locked { filter: grayscale(.55) brightness(.75) drop-shadow(0 18px 30px rgba(0,0,0,.45)); }
@keyframes timerPulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .tap-timer-ico { animation: none; } }
