/* Goat Cannon HUD styles (kept out of index.html so a style-src 'self' CSP, as on zupkit.com, allows them). */
@font-face { font-family: 'Lilita'; src: url('./assets/font/LilitaOne-Regular.ttf') format('truetype'); font-display: swap; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8fd0ff; touch-action: none; -webkit-user-select: none; user-select: none; font-family: 'Lilita', 'Arial Black', sans-serif; }
canvas { display: block; width: 100%; height: 100%; }
#ui { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.meter { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); text-align: center; color: #fff;
  text-shadow: 0 3px 0 #7a4b1d, 0 0 14px rgba(0,0,0,.25); line-height: 1; transition: opacity .2s; }
#nudges { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 10px; }
#nudges i { display: block; width: clamp(34px, 6.5vmin, 52px); height: clamp(34px, 6.5vmin, 52px); border-radius: 50%; background: rgba(60,30,10,.45) url("./assets/ui/hoof.svg") center/78% no-repeat;
  border: 3px solid #5a3414; box-shadow: 0 3px 0 #3d230e; transition: transform .15s, opacity .2s, background-color .15s, box-shadow .15s; position: relative; }
#nudges i.used { opacity: .3; transform: scale(.78); filter: grayscale(1); }
#nudges i.armed { background-color: rgba(255,230,109,.35); }
#nudges i.hot { background-color: #fff; transform: scale(1.4); box-shadow: 0 0 0 6px rgba(255,210,63,.55), 0 0 28px #ffd23f, 0 3px 0 #3d230e; animation: hot .35s ease-in-out infinite alternate; }
@keyframes hot { from { transform: scale(1.3); } to { transform: scale(1.5); } }
#nudges i.perfect { animation: perfect .5s ease-out; }
#nudges i.rearm { animation: rearm .45s ease-out; }
@keyframes perfect { 0% { transform: scale(1.8); background-color: #ffd23f; } 100% { transform: scale(.78); } }
@keyframes rearm { 0% { transform: scale(1.7); background-color: #fff; } 100% { transform: scale(1); } }
#floater { position: absolute; transform: translate(-50%, -50%); font-size: clamp(28px, 7vmin, 72px); color: #fff; opacity: 0; white-space: nowrap; pointer-events: none;
  text-shadow: 0 4px 0 #7a4b1d, 0 0 16px rgba(0,0,0,.3); }
#floater.perfect { color: #ffe66d; text-shadow: 0 4px 0 #b9770e, 0 0 22px rgba(255,200,0,.7); }
#floater.weak { color: #cfd8e3; font-size: clamp(22px, 5vmin, 48px); }
#floater.go { animation: floatup .9s ease-out forwards; }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -70%) scale(1.25); } 35% { transform: translate(-50%, -80%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -170%) scale(1); } }
.meter .big { font-size: clamp(42px, 9vmin, 84px); letter-spacing: 1px; }
.meter .big small { font-size: 55%; margin-left: 4px; }
.meter .best { font-size: clamp(14px, 3vmin, 22px); color: #ffe66d; margin-top: 4px; opacity: .95; }
#mute { position: absolute; right: max(10px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.28);
  border: 0; padding: 8px; pointer-events: auto; cursor: pointer; }
#mute img { width: 100%; height: 100%; opacity: .9; }
#pop { position: absolute; left: 50%; top: 34%; transform: translate(-50%,-50%) scale(0); color: #fff; font-size: clamp(36px, 10vmin, 110px); text-align: center; white-space: nowrap;
  text-shadow: 0 4px 0 #c0392b, 0 0 20px rgba(0,0,0,.3); transition: transform .25s cubic-bezier(.2,1.6,.4,1); }
#pop.show { transform: translate(-50%,-50%) scale(1); }
#pop.best { color: #ffe66d; text-shadow: 0 4px 0 #b9770e, 0 0 24px rgba(255,200,0,.6); }
#hand { position: absolute; width: 96px; height: 96px; left: 0; top: 0; opacity: 0; transition: opacity .3s; will-change: transform; }
#tapicon { position: absolute; width: 84px; height: 84px; left: 50%; top: 50%; transform: translate(-50%,-50%); opacity: 0; transition: opacity .25s; }
.pulse { animation: pulse .5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.35); } }
#fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .18s; }
#loader { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(#8fd0ff, #d8f0ff); transition: opacity .4s; }
#loader .bar { width: min(60vw, 320px); height: 14px; border-radius: 8px; background: rgba(0,0,0,.18); overflow: hidden; }
#loader .bar i { display: block; height: 100%; width: 0; background: #ffd040; border-radius: 8px; transition: width .2s; }
