* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d0f10; color: #e6e2d6; font: 14px/1.35 "Segoe UI", Roboto, Arial, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
canvas#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { background: #3b3f36; color: #e6e2d6; border: 1px solid #6d6a55; padding: 6px 12px; border-radius: 3px; cursor: pointer; font: inherit; }
button:hover { background: #4d5245; }
button.big { font-size: 18px; padding: 10px 26px; background: #6b4b1f; border-color: #c99a4b; }
button.big:hover { background: #855d27; }
button.sm { font-size: 11px; padding: 2px 8px; }
button:disabled { opacity: .45; cursor: default; }
input { background: #1a1c1b; color: #eee; border: 1px solid #555; padding: 6px 8px; border-radius: 3px; font: inherit; }
.muted { color: #9b9787; } .small { font-size: 12px; } .err { color: #ff7a6a; min-height: 18px; }
.good { color: #8fd18b; } .warn { color: #f0c060; } .bad { color: #ff7a6a; }

.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(20,24,22,.75), rgba(5,6,6,.95)); z-index: 50; }
.menu-box { width: min(720px, 94vw); max-height: 94vh; overflow: auto; background: rgba(22,24,22,.92); border: 1px solid #5b5844; padding: 22px 26px; border-radius: 4px; box-shadow: 0 10px 40px #000; }
.menu-box h1 { margin: 0; letter-spacing: 6px; font-size: 34px; color: #d9cfae; } .menu-box h1 span { color: #c9883b; }
.menu-box h2 { margin-top: 0; color: #e6795f; letter-spacing: 3px; }
.menu-box .sub { margin-top: 2px; color: #9b9787; }
.menu-box label { display: block; margin: 10px 0; } .menu-box label input { margin-left: 8px; width: 240px; }
.menu-box .chk { display: inline-block; margin-right: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.row input { flex: 1; min-width: 180px; }
.servers { border: 1px solid #3c3b31; max-height: 220px; overflow: auto; }
.srv { display: grid; grid-template-columns: 1fr 90px 80px 70px; padding: 7px 10px; border-bottom: 1px solid #2b2a23; cursor: pointer; }
.srv:hover { background: #2b2d27; } .srv.sel { background: #3d3a28; } .srv .n { font-weight: 600; } .srv .d { color: #9b9787; font-size: 12px; grid-column: 1 / -1; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#cross { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; background: #fff; border-radius: 50%; box-shadow: 0 0 2px #000; }
#cross.spread { width: 26px; height: 26px; margin: -13px; background: none; border: 1px solid rgba(255,255,255,.55); }
#hitmark { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; opacity: 0; transition: opacity .25s; background:
  linear-gradient(45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%); }
#hitmark.on { opacity: 1; transition: none; } #hitmark.kill { filter: hue-rotate(-50deg) saturate(8); }
#scope { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0 32vh, #000 32.3vh); }
#scope::before, #scope::after { content: ""; position: absolute; background: #000; }
#scope::before { left: 0; right: 0; top: 50%; height: 1px; } #scope::after { top: 0; bottom: 0; left: 50%; width: 1px; }
#vitals { position: absolute; left: 14px; bottom: 14px; width: 210px; }
.bar { position: relative; height: 16px; margin-top: 4px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.12); }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; } .bar b { position: relative; font-size: 11px; font-weight: 500; padding-left: 6px; text-shadow: 0 1px 2px #000; }
.bar.hp i { background: #9a2f25; } .bar.food i { background: #a07a2a; } .bar.water i { background: #2b6a9a; } .bar.stam i { background: #6e8f3a; }
#status { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
#status span { background: rgba(0,0,0,.6); padding: 1px 6px; border-radius: 2px; font-size: 12px; border-left: 3px solid #f0c060; }
#status span.bad { border-color: #ff5a4a; color: #ffb3a9; } #status span.good { border-color: #8fd18b; color: #cfe; }
#topinfo { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.45); padding: 3px 12px; font-size: 12px; border-radius: 2px; }
#zoneinfo { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); font-size: 13px; text-shadow: 0 1px 3px #000; text-align: center; }
#compass { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); font: 600 13px monospace; letter-spacing: 2px; color: #ddd; text-shadow: 0 1px 2px #000; }
#wallet { position: absolute; right: 14px; bottom: 96px; font-size: 15px; color: #e8c66b; text-shadow: 0 1px 2px #000; }
#hotbar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 4px; pointer-events: auto; }
.slot { position: relative; width: 62px; height: 62px; background: rgba(15,17,16,.75); border: 1px solid rgba(255,255,255,.18); font-size: 10.5px; padding: 3px; overflow: hidden; cursor: pointer; }
.slot.act { border: 2px solid #e6b45a; } .slot .k { position: absolute; left: 3px; top: 1px; color: #888; }
.slot .nm { position: absolute; left: 3px; right: 3px; top: 15px; line-height: 1.1; max-height: 34px; overflow: hidden; }
.slot .cnt { position: absolute; right: 3px; bottom: 2px; font-weight: 700; } .slot .dur { position: absolute; left: 0; bottom: 0; height: 3px; background: #6fc36b; }
.slot .q { position: absolute; right: 3px; top: 2px; width: 7px; height: 7px; border-radius: 50%; }
.slot.empty { opacity: .65; } .slot.drag { opacity: .4; } .slot.over { outline: 2px dashed #e6b45a; }
#ammo { position: absolute; right: 14px; bottom: 14px; font: 700 26px monospace; text-shadow: 0 1px 3px #000; text-align: right; }
#ammo small { display: block; font: 12px "Segoe UI", sans-serif; color: #bbb; }
#prompt { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); background: rgba(0,0,0,.6); padding: 4px 12px; font-size: 13px; border-radius: 2px; white-space: pre; text-align: center; }
#prompt:empty { display: none; }
#progress { position: absolute; left: 50%; top: 64%; width: 260px; height: 14px; transform: translateX(-50%); background: rgba(0,0,0,.6); border: 1px solid #777; }
#progress i { position: absolute; left: 0; top: 0; bottom: 0; background: #c9883b; } #progress b { position: relative; font-size: 11px; padding-left: 6px; }
#vehhud { position: absolute; right: 14px; bottom: 150px; background: rgba(0,0,0,.55); padding: 6px 10px; font: 13px monospace; white-space: pre; }
#feed { position: absolute; right: 12px; top: 10px; width: 320px; text-align: right; font-size: 12.5px; }
#feed div { background: rgba(0,0,0,.5); margin-bottom: 3px; padding: 2px 8px; display: inline-block; float: right; clear: both; }
#msgs { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); text-align: center; width: 80vw; }
#msgs div { font-size: 15px; text-shadow: 0 1px 3px #000, 0 0 8px #000; margin: 3px; }
#chat { position: absolute; left: 14px; bottom: 150px; width: 380px; pointer-events: auto; }
#chatlog { max-height: 200px; overflow: hidden; font-size: 12.5px; display: flex; flex-direction: column; justify-content: flex-end; }
#chatlog div { background: rgba(0,0,0,.35); padding: 1px 6px; margin-top: 1px; text-shadow: 0 1px 1px #000; }
#chatlog .ch-l { color: #cfe8ff; } #chatlog .ch-s { color: #9bf09b; } #chatlog .ch-f { color: #f0d08b; } #chatlog .ch-sys { color: #f0c060; }
#chatin { width: 100%; margin-top: 4px; }
#buildhud { position: absolute; right: 14px; top: 40%; background: rgba(0,0,0,.6); padding: 8px 12px; font-size: 13px; white-space: pre; }
#minimap { position: absolute; right: 12px; top: 120px; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; overflow: hidden; background: #000; opacity: .85; }
#minimap canvas { width: 100%; height: 100%; }
#camtag { position: absolute; left: 14px; top: 10px; font-size: 12px; background: rgba(0,0,0,.4); padding: 2px 8px; }

#win { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(980px, 96vw); max-height: 88vh; display: flex; flex-direction: column; background: rgba(20,22,20,.96); border: 1px solid #5b5844; z-index: 30; box-shadow: 0 10px 50px #000; }
.win-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #2a2b24; border-bottom: 1px solid #5b5844; }
#winBody { overflow: auto; padding: 10px 14px; }
.cols { display: flex; gap: 18px; flex-wrap: wrap; } .cols > div { flex: 1; min-width: 280px; }
.grid { display: grid; grid-template-columns: repeat(6, 62px); gap: 4px; } .grid.g8 { grid-template-columns: repeat(6, 62px); }
.eqrow { display: flex; gap: 4px; margin: 6px 0; } .eqrow .slot .k { color: #b9a77c; }
h4 { margin: 10px 0 6px; color: #d9cfae; font-weight: 600; }
.list { display: flex; flex-direction: column; gap: 3px; }
.li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 8px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.li.lock { opacity: .5; } .li .cost { color: #9b9787; font-size: 12px; } .li.cant .cost { color: #c9786a; }
.tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; } .tabs button.on { background: #6b4b1f; border-color: #c99a4b; }
#tip { position: fixed; z-index: 40; pointer-events: none; background: rgba(10,10,10,.95); border: 1px solid #666; padding: 6px 9px; font-size: 12px; max-width: 280px; white-space: pre-line; }
.mapwrap { position: relative; } .mapwrap canvas { width: min(80vh, 90vw); height: min(80vh, 90vw); display: block; margin: auto; background: #111; }

#touch { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#stick { position: absolute; left: 4vw; bottom: 6vh; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.2); pointer-events: auto; }
#stick i { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; background: rgba(255,255,255,.3); }
#tbtns { position: absolute; right: 2vw; bottom: 4vh; display: grid; grid-template-columns: repeat(4, 58px); gap: 8px; pointer-events: auto; }
#tbtns button { width: 58px; height: 58px; border-radius: 50%; background: rgba(30,30,30,.55); border: 2px solid rgba(255,255,255,.3); font-size: 20px; padding: 0; }
#tbtns button.on { background: rgba(200,140,60,.6); } #tbtns .t-fire { background: rgba(150,40,30,.6); }
body.mobile #hotbar { bottom: auto; top: 8px; transform: translateX(-50%) scale(.8); } body.mobile #vitals { left: auto; right: 2vw; bottom: auto; top: 90px; width: 150px; }
body.mobile #minimap, body.mobile #chat { display: none; } body.mobile #ammo { bottom: auto; top: 270px; }
