@font-face { font-family: "Lilita"; src: url("../fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: block; }
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }
:root {
  --pink: #ff3fa4; --hot: #ff1f8e; --cyan: #29e6ff; --yellow: #ffd93b; --purple: #8a3dff; --deep: #1a0638; --deeper: #0d0222;
  --gold1: #fff2a8; --gold2: #ffc928; --gold3: #c77a00;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bot: env(safe-area-inset-bottom, 0px);
  --display: "Lilita", "Arial Rounded MT Bold", system-ui, sans-serif; --body: "Nunito", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--deeper); color: #fff; font-family: var(--body); overscroll-behavior: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
body { overflow: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
#root { position: fixed; inset: 0; display: flex; justify-content: center; background: radial-gradient(120% 80% at 50% 0%, #3a0f73 0%, #1a0638 55%, #0d0222 100%); }
.shell { position: relative; width: 100%; max-width: 480px; height: 100%; overflow: hidden; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; animation: screenIn .28s cubic-bezier(.2,.8,.2,1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-top)) 10px 8px; z-index: 5; }
.brand { font-family: var(--display); font-size: 22px; letter-spacing: .5px; line-height: 1; background: linear-gradient(180deg, #fff 0%, var(--gold1) 35%, var(--gold2) 70%, #ff9a1f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #7a1fb8) drop-shadow(0 0 10px rgba(255,63,164,.5)); }
.brand small { display: block; font-size: 10px; letter-spacing: 3px; color: #ffd6f0; -webkit-text-fill-color: #ffd6f0; filter: none; }
.spacer { flex: 1; }
.balance { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 4px; border-radius: 999px; background: linear-gradient(180deg, #2b0b57, #160433); box-shadow: inset 0 0 0 2px rgba(255,217,59,.55), 0 4px 14px rgba(0,0,0,.4); font-family: var(--display); font-size: 18px; }
.balance .gc { width: 28px; height: 28px; }
.balance .plus { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, #7dff6b, #18b83a); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 0 10px rgba(80,255,120,.6); font-size: 20px; line-height: 26px; text-align: center; color: #fff; text-shadow: 0 1px 0 #0a6a1c; }
.icon-btn { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); font-size: 20px; }
.icon-btn:active, .pill-btn:active, .tile:active { transform: scale(.95); }
.gc { display: inline-block; width: 18px; height: 18px; background: url("../games/gumbot-galaxy/art/coin.png") center/contain no-repeat; vertical-align: -3px; }

/* ---------- splash ---------- */
#splash { align-items: center; justify-content: center; background: radial-gradient(90% 60% at 50% 40%, #6a1fc2 0%, #2a0a5c 50%, #0d0222 100%); }
#splash .splash-logo { width: 78%; max-width: 360px; animation: splashPop 1s cubic-bezier(.2,1.6,.4,1) both; filter: drop-shadow(0 10px 30px rgba(255,63,164,.55)); }
#splash .splash-brand { margin-top: 22px; font-family: var(--display); font-size: 28px; color: var(--gold1); text-shadow: 0 3px 0 #7a1fb8, 0 0 18px rgba(255,217,59,.6); animation: fadeUp .8s .3s both; }
.loadbar { width: 62%; height: 12px; border-radius: 99px; margin-top: 28px; background: rgba(255,255,255,.12); overflow: hidden; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.2); }
.loadbar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--pink), var(--yellow), var(--cyan)); transition: width .2s; }
.splash-note { position: absolute; bottom: calc(18px + var(--safe-bot)); left: 0; right: 0; text-align: center; font-size: 11px; opacity: .7; padding: 0 24px; }
@keyframes splashPop { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- lobby ---------- */
.lobby-body { flex: 1; overflow-y: auto; padding: 4px 14px calc(90px + var(--safe-bot)); -webkit-overflow-scrolling: touch; }
.daily-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; margin: 6px 0 14px; background: linear-gradient(100deg, #ff3fa4 0%, #a23dff 55%, #29b6ff 100%); box-shadow: 0 8px 24px rgba(255,63,164,.35), inset 0 0 0 2px rgba(255,255,255,.25); }
.daily-banner .gift { font-size: 34px; animation: wobble 2.4s infinite; }
.daily-banner h3 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 400; }
.daily-banner p { margin: 2px 0 0; font-size: 12px; opacity: .9; }
.pill-btn { padding: 10px 16px; border-radius: 999px; font-family: var(--display); font-size: 16px; background: linear-gradient(180deg, #fff6a0, #ffc928 50%, #ff9a1f); color: #6a2400; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 4px 12px rgba(0,0,0,.3); white-space: nowrap; }
.pill-btn[disabled] { filter: grayscale(.8) brightness(.8); }
.pill-btn.green { background: linear-gradient(180deg, #b6ff9c, #36d14d 50%, #12962c); color: #fff; text-shadow: 0 1px 0 #0a5a1a; }
@keyframes wobble { 0%,100% { transform: rotate(0); } 10% { transform: rotate(-14deg) scale(1.1); } 20% { transform: rotate(12deg) scale(1.1); } 30% { transform: rotate(0); } }
.section-title { font-family: var(--display); font-size: 18px; margin: 4px 2px 10px; color: #ffd6f0; letter-spacing: .5px; }
.feature-tile { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.08; border-radius: 26px; overflow: hidden; box-shadow: 0 14px 36px rgba(0,0,0,.5), 0 0 0 3px rgba(255,217,59,.85), 0 0 34px rgba(255,63,164,.55); }
.feature-tile img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-tile .logo { position: absolute; left: 6%; right: 6%; bottom: 13%; width: 88%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.55)); animation: logoBob 3.2s ease-in-out infinite; }
.feature-tile .play { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); padding: 8px 34px; font-size: 20px; }
.feature-tile .tag { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 10px; font-family: var(--display); font-size: 13px; background: linear-gradient(180deg, #ff5fb8, #e0127a); box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.feature-tile .shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.35) 48%, transparent 60%); transform: translateX(-120%); animation: shine 4s 1s infinite; pointer-events: none; }
@keyframes shine { 0% { transform: translateX(-120%); } 30%,100% { transform: translateX(120%); } }
@keyframes logoBob { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
.wide-tile { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.45), 0 0 0 3px rgba(47,224,208,.9), 0 0 30px rgba(24,168,255,.5); }
.wide-tile img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.wide-tile .logo { position: absolute; left: 4%; bottom: 20%; width: 62%; filter: drop-shadow(0 5px 8px rgba(0,0,0,.55)); animation: logoBob 3.4s ease-in-out infinite; }
.wide-tile .play { position: absolute; right: 5%; bottom: 7%; padding: 7px 26px; font-size: 18px; }
.wide-tile .tag { position: absolute; top: 10px; left: 10px; padding: 5px 10px; border-radius: 10px; font-family: var(--display); font-size: 12px; background: linear-gradient(180deg, #3ff0dc, #0a9ab8); box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.wide-tile .shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.3) 48%, transparent 60%); transform: translateX(-120%); animation: shine 4.6s 2s infinite; pointer-events: none; }
.soon-row.two { grid-template-columns: repeat(2, 1fr); } .soon-row.two .soon { aspect-ratio: 1.6; }
.game-loading { display: grid; place-items: center; height: 100%; font-family: var(--display); font-size: 22px; color: #fff; }
.soon-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.soon { aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center; text-align: center; font-family: var(--display); font-size: 13px; color: rgba(255,255,255,.6); background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 10px, rgba(255,255,255,.08) 10px 20px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); }
.soon b { display: block; font-size: 26px; margin-bottom: 4px; }
.disclaimer { margin: 18px 4px 0; font-size: 11px; line-height: 1.45; opacity: .65; text-align: center; }
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 8px 10px calc(8px + var(--safe-bot)); background: linear-gradient(180deg, rgba(20,4,48,.0), rgba(20,4,48,.92) 30%); z-index: 6; }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; opacity: .75; min-width: 64px; }
.tabbar button span { font-size: 22px; }
.tabbar button.on { opacity: 1; color: var(--yellow); }

/* ---------- pages (store/settings/terms) ---------- */
.page-body { flex: 1; overflow-y: auto; padding: 4px 14px calc(30px + var(--safe-bot)); }
.page-title { font-family: var(--display); font-size: 26px; margin: 0; flex: 1; text-align: center; padding-right: 40px; }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pack { position: relative; padding: 14px 10px 12px; border-radius: 20px; text-align: center; background: linear-gradient(180deg, #3b1180, #210851); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14), 0 8px 20px rgba(0,0,0,.35); }
.pack.best { box-shadow: inset 0 0 0 2px var(--yellow), 0 0 22px rgba(255,217,59,.45); }
.pack .ribbon { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 8px; font-size: 11px; font-weight: 900; background: var(--pink); white-space: nowrap; }
.pack .coins { width: 64px; height: 64px; margin: 4px auto; background: url("../games/gumbot-galaxy/art/coin.png") center/contain no-repeat; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.pack .amt { font-family: var(--display); font-size: 22px; color: var(--gold1); }
.pack .pill-btn { margin-top: 8px; width: 100%; }
.card { padding: 14px; border-radius: 18px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.12); margin-bottom: 12px; font-size: 14px; line-height: 1.5; }
.card h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 18px; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.row:last-child { border-bottom: 0; }
.switch { width: 52px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.18); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.switch.on { background: linear-gradient(90deg, var(--pink), var(--purple)); }
.switch.on::after { transform: translateX(22px); }
a { color: var(--cyan); }

/* ---------- modal & toast ---------- */
.modal-back { position: absolute; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(8,0,24,.72); backdrop-filter: blur(4px); padding: 24px; }
.modal-back.show { display: flex; animation: fadeIn .2s; }
.modal { width: 100%; max-width: 360px; padding: 22px 18px 18px; border-radius: 26px; text-align: center; background: linear-gradient(180deg, #4a148f, #22074f); box-shadow: 0 0 0 3px rgba(255,217,59,.7), 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(255,63,164,.4); animation: modalPop .35s cubic-bezier(.2,1.5,.4,1); }
.modal h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--gold1); text-shadow: 0 3px 0 #7a1fb8; }
.modal p { margin: 0 0 16px; font-size: 14px; line-height: 1.45; opacity: .92; }
.modal .big-amt { font-family: var(--display); font-size: 40px; color: #fff; margin: 4px 0 14px; text-shadow: 0 0 18px rgba(255,217,59,.8); }
@keyframes modalPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.toast { position: absolute; left: 50%; top: calc(64px + var(--safe-top)); transform: translate(-50%, -20px); z-index: 60; padding: 10px 16px; border-radius: 14px; background: rgba(20,4,48,.95); box-shadow: 0 0 0 2px var(--pink), 0 8px 20px rgba(0,0,0,.4); font-weight: 800; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
