*{box-sizing:border-box}
:root{--navy:#10152f;--panel:#1a2144;--panel2:#242d59;--cyan:#55e5ff;--pink:#ff5fa2;--gold:#ffd66b;--white:#f7f8ff}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:radial-gradient(ellipse at 50% 0%,#27366c 0%,#141a39 46%,#0c1025 100%);color:var(--white);font-family:Inter,ui-rounded,system-ui,-apple-system,"Segoe UI",sans-serif;touch-action:pan-y}
body{display:flex;justify-content:center;align-items:stretch}
.app{width:min(100%,560px);height:100dvh;min-height:520px;padding:env(safe-area-inset-top) 14px env(safe-area-inset-bottom);display:flex;flex-direction:column;gap:10px}
.topbar{height:54px;flex:0 0 54px;display:flex;align-items:center;justify-content:space-between}
.brand{font-weight:1000;letter-spacing:3px;font-size:23px;text-shadow:0 3px 0 #080d24,0 0 18px #58dfff66;display:flex;align-items:center;gap:8px}
.brand-mark{font-size:20px;color:var(--pink);text-shadow:0 0 12px var(--pink)}
.icon-btn{width:42px;height:42px;border:1px solid #ffffff22;border-radius:14px;background:#ffffff12;color:white;font-size:19px;cursor:pointer}
.stats{display:flex;gap:8px;flex:0 0 56px}
.stat{flex:1;background:linear-gradient(145deg,#242d59,#171e40);border:1px solid #ffffff16;border-radius:14px;padding:7px 11px;display:flex;flex-direction:column;justify-content:center;box-shadow:0 5px 12px #0002}
.stat small,.shots-box span,.next-box span{font-size:9px;letter-spacing:1.4px;color:#aab7e8;font-weight:800}
.stat strong{font-size:17px;line-height:22px;font-weight:900}
.score-stat strong{color:var(--gold)}
.game-shell{position:relative;flex:1;min-height:250px;background:linear-gradient(180deg,#151e42,#101733);border:1px solid #ffffff20;border-radius:23px;overflow:hidden;box-shadow:0 14px 30px #0004,inset 0 1px 0 #ffffff12}
.progress-track{position:absolute;z-index:2;top:0;left:0;width:100%;height:5px;background:#ffffff14}
#progressFill{height:100%;width:0;background:linear-gradient(90deg,var(--cyan),#9bffb1);transition:width .25s}
#game{width:100%;height:100%;display:block;touch-action:none}
.hud-row{position:absolute;left:14px;right:14px;bottom:42px;display:flex;justify-content:space-between;align-items:flex-end;pointer-events:none}
.shots-box,.next-box{background:#121a3bd9;border:1px solid #ffffff24;border-radius:13px;padding:7px 11px;display:flex;flex-direction:column;align-items:center;min-width:82px;box-shadow:0 4px 12px #0003}
.shots-box b{font-size:20px;color:var(--gold)}
.next-box{padding:5px 8px;min-width:68px}
.next-box canvas{width:38px;height:38px}
.hint{position:absolute;bottom:58px;width:100%;text-align:center;font-size:10px;color:#9eacd9;letter-spacing:.3px;pointer-events:none}
.bottom-actions{height:62px;flex:0 0 62px;display:flex;gap:9px;padding-bottom:3px}
.action-btn{border:1px solid #ffffff20;border-radius:16px;color:white;font-weight:800;font-size:14px;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;box-shadow:0 5px 12px #0003}
.action-btn span{font-size:12px}
.secondary{flex:1;background:linear-gradient(145deg,#29345f,#1a2246)}
.primary{flex:1.25;background:linear-gradient(135deg,#ff5fa2,#ec4387);border:0;box-shadow:0 6px 18px #ff438744}
.overlay{position:fixed;inset:0;z-index:10;background:#080d20d9;backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;padding:22px}
.hidden{display:none!important}
.dialog{position:relative;width:min(100%,380px);background:linear-gradient(150deg,#29345f,#171e40);border:1px solid #ffffff2a;border-radius:25px;padding:27px 22px;text-align:center;box-shadow:0 20px 60px #0008}
.dialog-icon{font-size:38px;margin-bottom:8px}
.dialog h1{margin:5px 0 8px;font-size:27px;font-weight:1000}
.dialog p{color:#bdc8eb;line-height:1.5;font-size:14px;margin:0 0 20px}
.dialog-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.wide-btn,.dialog-actions button{border:0;border-radius:13px;padding:13px 19px;background:linear-gradient(135deg,#ff5fa2,#e94287);color:white;font-weight:900;font-size:14px;cursor:pointer;min-width:125px}
.dialog-actions .soft{background:#ffffff18;border:1px solid #ffffff20}
.close-btn{position:absolute;right:14px;top:12px;border:0;background:#ffffff15;color:white;border-radius:10px;width:32px;height:32px;font-size:16px}
.level-dialog{width:min(100%,420px);max-height:85dvh;display:flex;flex-direction:column}
.level-dialog h1{margin-top:8px}
.level-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;overflow:auto;padding:4px 2px 8px}
.level-tile{aspect-ratio:1;border:1px solid #ffffff20;border-radius:12px;background:#ffffff12;color:white;font-weight:900;font-size:15px}
.level-tile.unlocked{background:linear-gradient(145deg,#334b80,#24345f);border-color:#69dffb88}
.level-tile.done{background:linear-gradient(145deg,#159f91,#126c72)}
.level-tile:disabled{opacity:.35}
.help-copy{text-align:left}
@media(max-height:650px){.app{gap:6px}.topbar{height:45px;flex-basis:45px}.stats{flex-basis:48px}.bottom-actions{height:52px;flex-basis:52px}.hud-row{bottom:36px}.hint{bottom:50px}.brand{font-size:20px}}
@media(min-width:500px){.app{padding-left:20px;padding-right:20px}.game-shell{border-radius:27px}}

.reward-game-btn{pointer-events:auto;border:1px solid #ffd66b88;border-radius:13px;padding:10px 13px;background:linear-gradient(135deg,#b97822,#80501b);color:#fff;font-weight:1000;letter-spacing:.7px;font-size:12px;min-width:112px;box-shadow:0 4px 14px #0005;cursor:pointer;display:flex;align-items:center;gap:7px}.reward-game-btn span{font-size:11px}.reward-game-btn:disabled{opacity:.6}

/* Reserved banner position below the danger line. Native AdMob banner can replace this slot. */
.ad-banner-slot{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);width:min(320px,calc(100% - 34px));height:50px;z-index:3;display:flex;align-items:center;justify-content:center;pointer-events:none}
.ad-label{position:absolute;top:-12px;right:2px;font-size:7px;letter-spacing:1px;color:#9eacd9}
.ad-banner-placeholder{width:100%;height:50px;border:1px dashed #ffffff38;border-radius:6px;background:#0a1027aa;color:#8492bc;display:flex;align-items:center;justify-content:center;font-size:10px;letter-spacing:.5px}
.ad-banner-slot.admob-ready .ad-banner-placeholder{display:none}
.hud-row{bottom:62px}
@media(max-height:650px){.ad-banner-slot{bottom:6px;height:42px}.ad-banner-placeholder{height:46px}.hud-row{bottom:54px}}

.legal-footer{flex:0 0 auto;display:flex;justify-content:center;gap:16px;padding:0 0 5px;font-size:10px;line-height:14px}
.legal-footer a{color:#aebce6;text-decoration:none}
.legal-footer a:hover{text-decoration:underline;color:#7ce8ff}
