:root { --ink: #2b2440; --gold: #ffe36b; --mint: #4cc76a; --pink: #ff6e9c; --cy: #4fd1ff; --card: rgba(36, 26, 60, 0.92); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1c1430; color: #fff; font-family: "Arial Black", "Segoe UI", Arial, sans-serif; user-select: none; -webkit-user-select: none; }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
[hidden] { display: none !important; }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; }
.hud-tl { position: absolute; left: 50%; transform: translateX(-50%); top: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat.big { text-align: center; min-width: 150px; }
.row { display: flex; gap: 8px; }
.stat { background: rgba(43, 36, 64, 0.84); border-radius: 12px; padding: 5px 12px 6px; min-width: 74px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); }
.stat small { display: block; font-size: 10px; letter-spacing: 1px; color: #c9bff0; font-family: Arial, sans-serif; font-weight: bold; }
.stat b { font-size: 20px; color: #fff; }
.stat.big b { font-size: 34px; color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }
#combo { display: flex; align-items: center; gap: 8px; }
#combo b { font-size: 22px; color: #ff8fb8; -webkit-text-stroke: 1px #2b2440; text-shadow: 0 2px 0 #2b2440, 0 0 6px rgba(0, 0, 0, 0.5); min-width: 38px; }
#combo i { display: block; width: 130px; height: 8px; background: rgba(0, 0, 0, 0.35); border-radius: 4px; overflow: hidden; }
#combo em { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cy), var(--pink)); }
#speedmine, #halving { font-size: 13px; padding: 4px 10px; border-radius: 10px; background: rgba(255, 228, 77, 0.92); color: var(--ink); width: max-content; }
#halving { background: rgba(255, 210, 63, 0.85); }
.hud-tr { position: absolute; right: 16px; top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#pus { display: flex; gap: 6px; }
.pu { position: relative; width: 46px; height: 46px; border-radius: 12px; background: rgba(43, 36, 64, 0.8); display: grid; place-items: center; font-size: 24px; overflow: hidden; border: 2px solid var(--c); }
.pu i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--c); }
#viewname { font-size: 12px; background: rgba(43, 36, 64, 0.7); padding: 4px 10px; border-radius: 9px; color: #d7cff7; letter-spacing: 1px; }
#fps { font: 12px monospace; color: #9f9; }
#minimap { position: absolute; left: 16px; bottom: 16px; width: 200px; height: 200px; border-radius: 50%; background: rgba(30, 50, 30, 0.55); border: 3px solid rgba(255, 255, 255, 0.55); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
#banner { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); font-size: 40px; color: var(--gold); text-shadow: 0 4px 0 var(--ink), 0 0 18px rgba(0, 0, 0, 0.4); white-space: nowrap; opacity: 0; transition: opacity 0.25s; text-align: center; }
#banner.show { opacity: 1; }
#toasts { position: absolute; inset: 0; overflow: hidden; }
.toast { position: absolute; transform: translate(-50%, -50%); font-size: 18px; text-shadow: 0 2px 0 var(--ink), 0 0 6px rgba(0, 0, 0, 0.5); white-space: nowrap; animation: rise 1.1s ease-out forwards; }
@keyframes rise { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -60px; } }
#ctrl { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
#ctrl button { pointer-events: auto; font: bold 15px Arial, sans-serif; color: #fff; background: rgba(43, 36, 64, 0.72); border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 14px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
#zoom { display: flex; gap: 8px; } #zoom button { width: 44px; height: 44px; font-size: 22px; padding: 0; }
#ctrl #boost { width: 128px; height: 64px; font-size: 18px; letter-spacing: 1px; background: linear-gradient(#ffcf3f, #ff8a2b); color: #2b2440; border-color: #fff3c4; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
#ctrl #boost.on { transform: scale(0.94); filter: brightness(1.15); box-shadow: 0 0 18px #ffcf3f; }
#hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font: bold 13px Arial, sans-serif; color: rgba(255, 255, 255, 0.85); background: rgba(43, 36, 64, 0.55); padding: 6px 14px; border-radius: 12px; transition: opacity 1s; }

/* screens */
.screen { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(28, 20, 48, 0.35), rgba(20, 12, 36, 0.75)); z-index: 10; }
.card { background: var(--card); border-radius: 26px; padding: 26px 34px 22px; max-width: min(620px, calc(100vw - 32px)); text-align: center; box-shadow: 0 10px 0 rgba(0, 0, 0, 0.3), 0 20px 60px rgba(0, 0, 0, 0.5); border: 3px solid rgba(255, 255, 255, 0.12); }
.card.small { min-width: 300px; }
h1 { margin: 0; font-size: 54px; color: var(--gold); text-shadow: 0 5px 0 var(--ink); letter-spacing: 1px; }
h1 span { color: var(--mint); }
h2 { margin: 0 0 8px; font-size: 40px; color: var(--gold); text-shadow: 0 4px 0 var(--ink); }
.tag { margin: 6px 0 18px; font-size: 17px; color: #fff; }
.btn { display: inline-block; font: inherit; font-size: 20px; margin: 6px; padding: 12px 34px; border-radius: 16px; border: none; background: #5b4d8a; color: #fff; cursor: pointer; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35); }
.btn.primary { background: var(--mint); color: var(--ink); font-size: 26px; padding: 14px 56px; }
.btn:hover { filter: brightness(1.1); } .btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.how { margin: 16px 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; text-align: left; font: 13px Arial, sans-serif; color: #e6e0ff; }
.how b { color: var(--gold); font-family: "Arial Black", Arial; font-size: 12px; margin-right: 4px; }
.opts { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center; font: bold 13px Arial, sans-serif; color: #d7cff7; margin: 8px 0; }
.opts input[type=range] { vertical-align: middle; width: 110px; }
.opts select { font: inherit; border-radius: 6px; }
.credits { font: 11px Arial, sans-serif; color: rgba(255, 255, 255, 0.5); margin: 10px 0 0; }
#o-sub { font-size: 22px; color: #fff; margin-bottom: 10px; }
.score small { display: block; font: bold 12px Arial; color: #c9bff0; letter-spacing: 2px; }
.score b { font-size: 52px; color: var(--gold); text-shadow: 0 4px 0 var(--ink); }
.score em { display: block; font-style: normal; color: var(--pink); font-size: 18px; }
#o-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; margin: 12px auto; max-width: 420px; font: bold 14px Arial, sans-serif; text-align: left; }
#o-rows div { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 3px 0; }
#o-rows .rec { color: var(--gold); }
#o-achs { margin: 6px 0 12px; font-size: 14px; color: var(--gold); }
.bar { width: 280px; height: 12px; background: rgba(0, 0, 0, 0.4); border-radius: 6px; overflow: hidden; margin: 12px auto; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--gold)); transition: width 0.2s; }
#load-what { font: 13px Arial, sans-serif; color: #c9bff0; }
@media (max-width: 700px) { h1 { font-size: 36px; } .how { grid-template-columns: 1fr; } #minimap { width: 92px; height: 92px; left: 10px; right: auto; bottom: 12px; top: auto; } #ctrl { right: 10px; bottom: 12px; } #boost { width: 104px; height: 76px; } #zoom button { width: 40px; height: 40px; } #speedmine, #halving { font-size: 9px; padding: 2px 6px; } .stat.big b { font-size: 24px; } .stat { min-width: 58px; padding: 3px 8px; } .stat b { font-size: 15px; } .hud-tr { top: 116px; } #hint { display: none; } .s-best, .s-mined { display: none; } #viewname { display: none; } #combo i { width: 70px; } }

/* review stills (?shot=1): no banners, hint or toasts */
body.shot #banner, body.shot #hint, body.shot #toasts { display: none !important; }
body.clean #hud { display: none !important; }
body.film .hud-tl, body.film .hud-tr, body.film #minimap, body.film #hint, body.film #ctrl, body.shot #ctrl { display: none !important; }
body.film #banner { font-size: 64px; top: 12%; transition: none; }
body.film .toast { font-size: 30px; }
