/* TrueGem shared UI for every game page: same colours, fonts, top bar, gems card, bottom bar and loader as index.html */
:root{
  --bg:#0F0C16; --surface:#181322; --surface-2:#1F1A2C; --line:#2B2438;
  --text:#F2EEF9; --text-dim:#9A93AD; --gold:#E8B95C;
  /* aliases used by the individual game stylesheets */
  --card-bg:#181322; --card-border:#2B2438; --border:#2B2438; --muted:#9A93AD;
}
html, body{ background:var(--bg); color:var(--text); font-family:'Inter', system-ui, sans-serif; overflow:visible; overflow-x:clip; }
html{ -webkit-overflow-scrolling:touch; }
body{ padding-bottom:calc(96px + env(safe-area-inset-bottom, 0px)); }

/* ---- top bar: Back + title (same on all games) ---- */
.top-bar{ display:flex; align-items:center; justify-content:space-between; margin:2px 0 12px; }
.top-bar .back-btn{ border:1px solid var(--line); background:var(--surface); color:var(--text-dim); border-radius:12px; padding:8px 13px; margin:0;
  font:inherit; font-size:13px; font-weight:700; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:4px; touch-action:manipulation; }
.top-bar .back-btn:active{ opacity:.8; }
.top-bar .title-tag{ font-family:'Fraunces', 'Noto Serif', Georgia, serif; font-size:18px; font-weight:700; color:var(--gold); display:flex; align-items:center; gap:6px; }
.top-bar .top-spacer{ width:62px; }

/* ---- gems card (same as the home gems pill) ---- */
.gems-card{ background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:14px 18px; box-shadow:none; }
.gems-card small{ font-size:11px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.5px; font-weight:600; }
.gems-card .val{ font-family:'Fraunces', 'Noto Serif', Georgia, serif; font-size:26px; font-weight:700; color:var(--gold); letter-spacing:0; }

/* ---- bottom bar (copy of the app's bottom bar) ---- */
.bottom-nav{ position:fixed; left:0; right:0; bottom:0; z-index:40; display:flex; gap:4px;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px)); background:rgba(15,12,22,.94);
  border-top:1px solid var(--line); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
.nav-item{ flex:1; border:none; background:transparent; color:var(--text-dim); border-radius:14px; padding:8px 0 6px; text-decoration:none;
  display:flex; flex-direction:column; align-items:center; gap:3px; font-family:'Inter', sans-serif; font-size:11px; font-weight:600; }
.nav-item svg{ width:22px; height:22px; }
.nav-item.active{ color:var(--gold); background:rgba(232,185,92,.08); }
.nav-item span{ max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:0 2px; }

/* ---- not-in-telegram / banned / maintenance gate ---- */
#tgGate{ position:fixed; inset:0; z-index:9999; background:rgba(15,12,22,.97); display:none; align-items:center; justify-content:center; padding:28px; text-align:center; }
#tgGate.show{ display:flex; }
#tgGate h3{ margin:0 0 8px; font-family:'Fraunces', serif; font-size:21px; color:var(--gold); }
#tgGate p{ margin:0 0 18px; color:var(--text-dim); font-size:14px; line-height:1.5; }
#tgGate button{ border:0; border-radius:14px; padding:12px 22px; font:inherit; font-weight:700; background:var(--gold); color:#241a08; }
.next-in{ text-align:center; margin-top:12px; font-size:12.5px; font-weight:700; color:var(--text-dim); }

/* ---- TrueGem loader: the real TrueGem icon (1:1), fully visible from the first frame ---- */
#tgSplash{ position:fixed; inset:0; z-index:9000; background:var(--bg); display:flex; align-items:center; justify-content:center; transition:opacity .25s ease; }
#tgSplash.out{ opacity:0; pointer-events:none; }
.tgl{ display:flex; flex-direction:column; align-items:center; gap:14px; }
.tgl-gem{ width:84px; height:84px; position:relative; animation:tgl-float 2.2s ease-in-out infinite; }
.tgl-gem::before{ content:""; position:absolute; inset:-22px; border-radius:50%; background:radial-gradient(circle, rgba(232,185,92,.35) 0%, rgba(232,185,92,0) 68%); animation:tgl-glow 2.2s ease-in-out infinite; }
.tgl-gem img, .tgl-gem svg{ position:relative; width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 6px 14px rgba(232,185,92,.35)); }
.tgl-gem img{ opacity:0; transition:opacity .15s ease; }
.tgl-gem img.ready{ opacity:1; }
.tgl-name{ font-family:'Fraunces', 'Noto Serif', Georgia, serif; font-weight:700; font-size:20px; letter-spacing:.4px; color:var(--text); }
.tgl-name b{ color:var(--gold); font-weight:700; }
.tgl-dots{ display:flex; gap:6px; }
.tgl-dots i{ width:6px; height:6px; border-radius:50%; background:var(--gold); opacity:.25; animation:tgl-dot 1.2s ease-in-out infinite; }
.tgl-dots i:nth-child(2){ animation-delay:.2s; } .tgl-dots i:nth-child(3){ animation-delay:.4s; }
@keyframes tgl-float{ 0%,100%{ transform:translateY(0) } 50%{ transform:translateY(-7px) } }
@keyframes tgl-glow{ 0%,100%{ opacity:.55; transform:scale(.94) } 50%{ opacity:1; transform:scale(1.06) } }
@keyframes tgl-dot{ 0%,100%{ opacity:.25; transform:scale(1) } 50%{ opacity:1; transform:scale(1.35) } }

/* ---- Gem Hunt: tile shows it is being checked the moment you tap ---- */
.hunt-tile.pending{ border-color:var(--gold); transform:scale(.94); animation:tg-pend .5s ease-in-out infinite alternate; pointer-events:none; }
@keyframes tg-pend{ from{ box-shadow:0 0 0 rgba(232,185,92,0) } to{ box-shadow:0 0 16px rgba(232,185,92,.55) } }

/* ---- Tap Gem: bigger gem and a quiet second button ---- */
.tap-btn-wrap{ width:236px !important; height:236px !important; }
.tap-gem-img{ width:186px !important; height:186px !important; }
.start-btn.secondary{ background:transparent; border:1px solid var(--line); color:var(--text-dim); margin-top:10px; }
