@font-face { font-family: 'Anton'; src: url(fonts/anton.ttf); font-display: block; }
@font-face { font-family: 'Barlow'; src: url(fonts/barlow-sb.ttf); font-weight: 600; font-display: block; }
@font-face { font-family: 'Barlow'; src: url(fonts/barlow-b.ttf); font-weight: 700; font-display: block; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #f2c08a; font-family: 'Barlow', sans-serif; font-weight: 600; color: #fff; user-select: none; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font-family: 'Barlow'; font-weight: 700; cursor: pointer; }
/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 2px 4px rgba(0,0,0,.45); }
#vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(60,20,0,.28) 100%); }
#hurt { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at center, rgba(255,0,0,0) 45%, rgba(220,20,10,.75) 100%); transition: opacity .08s; }
#dirs { position: absolute; left: 50%; top: 50%; }
#dirs .d { position: absolute; width: 140px; height: 26px; left: -70px; top: -13px; opacity: 0; }
#dirs .d::after { content: ''; position: absolute; left: 50%; top: 0; margin-left: -46px; width: 92px; height: 18px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; border-top: 7px solid rgba(255,60,30,.95); filter: drop-shadow(0 0 6px rgba(255,80,40,.8)); }
#objective { position: absolute; left: 28px; top: 24px; max-width: 420px; }
#objective .lbl { font: 14px 'Barlow'; font-weight: 700; letter-spacing: 3px; color: #ffd36b; }
#objText { font: 26px 'Anton'; letter-spacing: 1px; }
#objSub { font-size: 17px; opacity: .9; }
#topright { position: absolute; right: 24px; top: 20px; display: flex; gap: 18px; align-items: center; font: 22px 'Anton'; letter-spacing: 1px; }
#kills::before { content: '✖ '; color: #ffd36b; }
#muteBtn { pointer-events: auto; background: rgba(0,0,0,.25); border: 2px solid rgba(255,255,255,.5); color: #fff; font-size: 18px; border-radius: 8px; padding: 2px 8px; }
#boss { position: absolute; left: 50%; top: 22px; width: 560px; margin-left: -280px; text-align: center; }
#bossName { font: 24px 'Anton'; letter-spacing: 3px; color: #ffe28a; }
#boss .bar { height: 14px; background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.7); border-radius: 8px; overflow: hidden; margin-top: 4px; }
#bossFill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff4a2a, #ffb12a); transition: width .15s; }
#countdown { position: absolute; left: 50%; top: 80px; transform: translateX(-50%); font: 64px 'Anton'; color: #ffd36b; letter-spacing: 3px; }
#cross { position: absolute; left: 50%; top: 50%; }
#cross i { position: absolute; background: #fff; box-shadow: 0 0 2px rgba(0,0,0,.9); }
#cross .t, #cross .b { width: 2px; height: 9px; left: -1px; }
#cross .l, #cross .r { width: 9px; height: 2px; top: -1px; }
#cross .dot { position: absolute; width: 4px; height: 4px; left: -2px; top: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 2px #000; }
#hitm { position: absolute; left: 50%; top: 50%; opacity: 0; }
#hitm i { position: absolute; width: 12px; height: 3px; background: #fff; left: -6px; top: -1.5px; box-shadow: 0 0 3px rgba(0,0,0,.8); }
#hitm i:nth-child(1) { transform: rotate(45deg) translate(13px); } #hitm i:nth-child(2) { transform: rotate(135deg) translate(13px); }
#hitm i:nth-child(3) { transform: rotate(225deg) translate(13px); } #hitm i:nth-child(4) { transform: rotate(315deg) translate(13px); }
#hitm.kill i { background: #ff4a2a; } #hitm.head i { background: #ffd36b; }
#toast { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); font: 30px 'Anton'; letter-spacing: 2px; color: #ffd36b; opacity: 0; white-space: nowrap; }
#prompt { position: absolute; left: 50%; top: 64%; transform: translateX(-50%); font-size: 22px; background: rgba(0,0,0,.45); padding: 8px 18px; border-radius: 8px; }
#prompt b, #hint b { color: #ffd36b; border: 2px solid #ffd36b; border-radius: 5px; padding: 0 6px; margin: 0 2px; }
#hint { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); font-size: 21px; background: rgba(20,30,50,.55); padding: 8px 20px; border-radius: 30px; white-space: nowrap; }
#title { position: absolute; left: 0; right: 0; top: 24%; text-align: center; animation: titleIn 3.6s ease forwards; }
#titleMain { font: 64px 'Anton'; letter-spacing: 6px; color: #fff; text-shadow: 0 4px 0 rgba(160,60,10,.55), 0 0 30px rgba(255,160,60,.6); }
#titleSub { font-size: 22px; color: #ffe8c4; letter-spacing: 1px; }
@keyframes titleIn { 0% { opacity: 0; transform: translateY(16px) scale(1.05); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
#cpToast { position: absolute; right: 28px; top: 70px; font: 22px 'Anton'; letter-spacing: 2px; color: #9cff8a; animation: titleIn 2.5s forwards; }
#waypoint { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); text-align: center; }
#waypoint .dia { width: 18px; height: 18px; margin: 0 auto; border: 3px solid #ffd36b; transform: rotate(45deg); box-shadow: 0 0 8px rgba(255,200,80,.8); }
#wpDist { font-size: 15px; color: #ffd36b; }
#vitals { position: absolute; left: 28px; bottom: 26px; width: 330px; }
#vitals .row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
#vitals .ico { font-size: 26px; width: 30px; text-align: center; }
#vitals .ico.hp { color: #7dff7a; } #vitals .ico.ar { color: #79c8ff; }
#hpNum, #arNum { font: 38px 'Anton'; width: 76px; }
#arNum { font-size: 28px; }
#vitals .bar { flex: 1; height: 12px; background: rgba(0,0,0,.4); border: 2px solid rgba(255,255,255,.6); border-radius: 7px; overflow: hidden; }
#hpFill { height: 100%; width: 100%; background: linear-gradient(90deg, #4fe25a, #b6ff6a); transition: width .2s; }
#hpFill.low { background: linear-gradient(90deg, #ff3a2a, #ff9a3a); }
#arFill { height: 100%; width: 0; background: linear-gradient(90deg, #3a9bff, #8ad8ff); transition: width .2s; }
#ammo { position: absolute; right: 30px; bottom: 24px; text-align: right; }
#wName { font-size: 20px; letter-spacing: 3px; color: #ffd36b; }
#ammo .nums { font-family: 'Anton'; line-height: 1; }
#mag { font-size: 66px; } #mag.low { color: #ff6a4a; }
#ammo .sl { font-size: 36px; opacity: .6; margin: 0 6px; } #res { font-size: 34px; opacity: .85; }
#slots { margin-top: 6px; display: flex; gap: 6px; justify-content: flex-end; }
#slots span { width: 30px; height: 30px; line-height: 26px; text-align: center; border: 2px solid rgba(255,255,255,.25); border-radius: 6px; color: rgba(255,255,255,.25); font-size: 17px; }
#slots span.own { border-color: rgba(255,255,255,.7); color: #fff; }
#slots span.cur { border-color: #ffd36b; color: #222; background: #ffd36b; text-shadow: none; }
/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#menu { background: linear-gradient(90deg, rgba(25,35,60,.82) 0%, rgba(25,35,60,.55) 45%, rgba(25,35,60,0) 75%); justify-content: flex-start; }
.menuInner { width: 640px; margin-left: 6vw; }
.logo { position: relative; }
.logo .sun { position: absolute; left: -24px; top: -6px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #ffe27a 0%, #ff9a3a 60%, rgba(255,120,40,0) 72%); opacity: .9; }
.logo h1 { position: relative; margin: 0; font: 112px 'Anton'; letter-spacing: 6px; line-height: 1; background: linear-gradient(180deg, #fff6d6 0%, #ffd36b 45%, #ff8a2a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 rgba(90,30,10,.55)); }
.logo .tag, .panel .tag { position: relative; font-size: 22px; letter-spacing: 10px; color: #ffe8c4; }
.brief { font-size: 20px; line-height: 1.4; color: #f4ecdf; max-width: 600px; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.diff { display: flex; gap: 10px; margin: 18px 0; }
.diff button { flex: 1; background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.35); color: #fff; padding: 10px; font-size: 20px; border-radius: 10px; letter-spacing: 2px; }
.diff button small { display: block; font-size: 13px; letter-spacing: 1px; opacity: .7; font-weight: 600; }
.diff button.on { border-color: #ffd36b; background: rgba(255,190,80,.25); }
button.big { display: block; width: 100%; font: 38px 'Anton'; letter-spacing: 6px; padding: 12px; border: 0; border-radius: 12px; color: #2a1606; background: linear-gradient(180deg, #ffe27a, #ff9a3a); box-shadow: 0 6px 0 #b0561a, 0 10px 30px rgba(255,140,40,.4); transition: transform .08s; }
button.big:hover { transform: translateY(-2px); } button.big:active { transform: translateY(3px); box-shadow: 0 2px 0 #b0561a; }
#cont button, .panel > button:not(.big) { display: block; width: 100%; margin-top: 10px; background: rgba(0,0,0,.3); border: 2px solid rgba(255,255,255,.4); color: #fff; padding: 10px; font-size: 18px; border-radius: 10px; letter-spacing: 2px; }
.controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 10px; margin: 20px 0 12px; font-size: 15px; color: #f2e6d4; }
.controls b { color: #ffd36b; display: block; font-size: 14px; letter-spacing: 1px; }
.settings { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 16px; margin: 10px 0; }
.settings input { width: 110px; vertical-align: middle; accent-color: #ffb12a; }
.settings button { background: rgba(0,0,0,.3); border: 2px solid rgba(255,255,255,.4); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 15px; }
#best { font-size: 17px; color: #ffd36b; min-height: 20px; }
.foot { font-size: 14px; opacity: .7; margin-top: 8px; }
.panel { width: 520px; background: rgba(22,32,56,.86); border: 2px solid rgba(255,211,107,.5); border-radius: 18px; padding: 30px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.panel.wide { width: 640px; }
.panel h2 { font: 48px 'Anton'; letter-spacing: 3px; margin: 6px 0 14px; color: #ffd36b; }
.panel p { font-size: 18px; color: #f0e6d6; }
#stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
#stats div { background: rgba(0,0,0,.3); border-radius: 10px; padding: 10px; font-size: 14px; letter-spacing: 2px; color: #f0e6d6; }
#stats b { display: block; font: 32px 'Anton'; color: #fff; letter-spacing: 1px; }
#pause, #dead, #win { background: rgba(20,25,40,.45); }
#clickLock { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; font: 40px 'Anton'; letter-spacing: 4px; background: rgba(0,0,0,.35); cursor: pointer; }
#loading { position: fixed; inset: 0; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; background: linear-gradient(#5d9bd6, #ffcf9a); font: 26px 'Anton'; letter-spacing: 3px; z-index: 10; }
#loading .spin { width: 54px; height: 54px; border-radius: 50%; border: 6px solid rgba(255,255,255,.35); border-top-color: #fff; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.panel { max-height: 96vh; overflow: auto; }
@media (max-height: 760px) { .panel { transform: scale(.82); } #menu > * { zoom: .85; } }
