/* DUSKFALL PROTOCOL — tactical-map HUD: amber stencil on dusk dark */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --amber: #ffb454;
  --amber-dim: rgba(255,180,84,.45);
  --olive: #a8c06a;
  --red: #ff5240;
  --cyan: #7ad0c8;
  --bg: rgba(14,11,8,.72);
  --line: rgba(255,180,84,.28);
  --mono: 'SF Mono', 'Cascadia Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}
html, body { width: 100%; height: 100%; overflow: hidden; background: #120d09; font-family: var(--mono); }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

/* ============ HUD ============ */
#hud { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; z-index: 5; }
body.in-game #hud { opacity: 1; }
#hud > div { position: absolute; }

/* crosshair */
#crosshair { left: 50%; top: 50%; --gap: 10px; }
#crosshair i { position: absolute; background: var(--amber); box-shadow: 0 0 4px rgba(0,0,0,.8); }
#crosshair .l { width: 9px; height: 2px; left: calc(-9px - var(--gap)); top: -1px; }
#crosshair .r { width: 9px; height: 2px; left: var(--gap); top: -1px; }
#crosshair .t { width: 2px; height: 9px; left: -1px; top: calc(-9px - var(--gap)); }
#crosshair .b { width: 2px; height: 9px; left: -1px; top: var(--gap); }
#crosshair .dot { width: 2px; height: 2px; left: -1px; top: -1px; }

/* hitmarker */
#hitmarker { left: 50%; top: 50%; opacity: 0; }
#hitmarker i { position: absolute; width: 11px; height: 2px; background: #fff; }
#hitmarker i:nth-child(1) { transform: rotate(45deg); left: -14px; top: -7px; }
#hitmarker i:nth-child(2) { transform: rotate(-45deg); left: 4px; top: -7px; }
#hitmarker i:nth-child(3) { transform: rotate(-45deg); left: -14px; top: 5px; }
#hitmarker i:nth-child(4) { transform: rotate(45deg); left: 4px; top: 5px; }
#hitmarker.show { opacity: 1; }
#hitmarker.show.head i { background: var(--amber); }
#hitmarker.show.kill i { background: var(--red); width: 13px; }

/* sniper scope */
#scope-overlay { inset: 0; display: none; background: radial-gradient(circle at 50% 50%, transparent 26%, rgba(5,4,3,.97) 27%); }
#scope-overlay.show { display: block; }
#scope-overlay .ring { position: absolute; left: 50%; top: 50%; width: 54vmin; height: 54vmin; transform: translate(-50%,-50%); border: 2px solid rgba(255,180,84,.5); border-radius: 50%; }
#scope-overlay .h { position: absolute; left: 50%; top: 50%; width: 52vmin; height: 1px; transform: translate(-50%,-50%); background: rgba(255,180,84,.65); }
#scope-overlay .v { position: absolute; left: 50%; top: 50%; width: 1px; height: 52vmin; transform: translate(-50%,-50%); background: rgba(255,180,84,.65); }
#scope-overlay .rangef { position: absolute; left: 50%; top: 72%; transform: translateX(-50%); color: var(--amber); font-size: 11px; letter-spacing: 2px; }

/* damage feedback */
#dmg-vignette { inset: 0; opacity: 0; background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(200,20,10,.55) 100%); transition: opacity .12s; }
#lowhp { inset: 0; opacity: 0; background: radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(160,10,5,.7) 100%); animation: lowpulse 1.1s infinite; }
@keyframes lowpulse { 50% { filter: brightness(1.5); } }
#dmg-dir { left: 50%; top: 50%; width: 120px; height: 120px; opacity: 0; transform: translate(-50%,-50%); }
#dmg-dir::before { content: ''; position: absolute; left: 50%; top: -8px; transform: translateX(-50%); border: 12px solid transparent; border-bottom: 18px solid rgba(255,60,40,.85); }

/* minimap */
#mm-wrap { left: 16px; top: 16px; }
#minimap { border-radius: 50%; box-shadow: 0 0 0 2px var(--line), 0 0 22px rgba(0,0,0,.6); background: var(--bg); display: block; }
#uav-tag, #gunship-tag { margin-top: 6px; color: var(--cyan); font-size: 10px; letter-spacing: 2px; opacity: 0; transition: opacity .3s; text-shadow: 0 0 6px #000; }
#gunship-tag { color: var(--amber); }

/* top center */
#tc-wrap { left: 50%; top: 12px; transform: translateX(-50%); text-align: center; width: 400px; }
#compass { display: block; margin: 0 auto; box-shadow: 0 0 0 1px var(--line); }
#match-meta { margin-top: 6px; display: flex; justify-content: center; gap: 18px; font-size: 11px; letter-spacing: 1.5px; color: var(--amber); text-shadow: 0 0 6px #000; }
#match-timer { color: #e8d8c0; }
#objective { color: var(--olive); }
#announce { margin-top: 26px; font-size: 34px; font-weight: 700; letter-spacing: 8px; color: var(--amber); text-shadow: 0 0 18px rgba(255,140,50,.5), 0 2px 0 #000; opacity: 0; transform: scale(.92); transition: all .25s; }
#announce.show { opacity: 1; transform: scale(1); }
#announce.danger { color: var(--red); }
#announce.good { color: var(--olive); }
#announce-sub { margin-top: 4px; font-size: 12px; letter-spacing: 3px; color: #d8c8b0; text-shadow: 0 0 6px #000; }

/* killfeed */
#killfeed { right: 16px; top: 16px; width: 300px; text-align: right; font-size: 11px; }
.kf-row { background: var(--bg); border-right: 3px solid var(--amber); padding: 4px 8px; margin-bottom: 4px; letter-spacing: 1px; transition: opacity .5s; }
.kf-row.fade { opacity: 0; }
.kf-you { color: var(--amber); font-weight: 700; }
.kf-foe { color: var(--red); font-weight: 700; }
.kf-wpn { color: #cbb; }
.kf-sys { color: var(--cyan); }

/* bottom left: health */
#bl-wrap { left: 18px; bottom: 18px; }
#health-box { background: var(--bg); border-left: 3px solid var(--olive); padding: 8px 14px 10px; min-width: 190px; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.hb-label { font-size: 9px; letter-spacing: 3px; color: var(--amber-dim); margin-bottom: 4px; }
#health-bar { width: 160px; height: 8px; background: rgba(255,255,255,.08); display: inline-block; vertical-align: middle; }
#health-fill { height: 100%; width: 100%; background: var(--olive); transition: width .15s, background .3s; }
#health-num { display: inline-block; margin-left: 10px; font-size: 20px; font-weight: 700; color: #e8d8c0; vertical-align: middle; }
#tickets-box { margin-top: 6px; font-size: 10px; letter-spacing: 2px; color: var(--amber-dim); }
#tickets { color: var(--amber); letter-spacing: 4px; margin-left: 6px; }
#hitdir { display: none; }

/* bottom right: weapon */
#br-wrap { right: 18px; bottom: 18px; text-align: right; }
#streak-row { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 6px; }
.streak { background: var(--bg); border: 1px solid var(--line); padding: 4px 8px; font-size: 9px; letter-spacing: 1px; color: var(--amber-dim); text-align: center; min-width: 64px; }
.streak b { display: block; font-size: 13px; color: inherit; }
.streak em { display: block; font-style: normal; color: #765; margin-top: 2px; }
.streak em::before { content: '[ '; } .streak em::after { content: ' ]'; }
.streak.ready { border-color: var(--amber); color: var(--amber); animation: streakpulse 1s infinite; }
.streak.used { opacity: .35; }
@keyframes streakpulse { 50% { box-shadow: 0 0 12px rgba(255,180,84,.5); } }
#streak-meter { position: relative; height: 14px; background: var(--bg); margin-bottom: 8px; border: 1px solid var(--line); }
#streak-fill { height: 100%; background: linear-gradient(90deg, rgba(255,180,84,.25), rgba(255,180,84,.6)); width: 0%; transition: width .3s; }
#streak-next { position: absolute; right: 4px; top: 1px; font-size: 9px; letter-spacing: 1px; color: var(--amber); }
#weapon-box { background: var(--bg); border-right: 3px solid var(--amber); padding: 8px 14px 10px; display: inline-block; clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%); }
#wpn-name { font-size: 11px; letter-spacing: 2px; color: var(--amber); }
#wpn-mode { font-size: 9px; letter-spacing: 2px; color: var(--amber-dim); }
#ammo { margin-top: 2px; }
#ammo-mag { font-size: 34px; font-weight: 700; color: #f0e2cc; }
#ammo-mag.low { color: var(--red); animation: lowpulse 1s infinite; }
#ammo-sep { color: var(--amber-dim); margin: 0 6px; font-size: 20px; }
#ammo-res { font-size: 16px; color: #b09a80; }
#nade-box { font-size: 10px; letter-spacing: 2px; color: var(--olive); margin-top: 2px; }
#nade-box.empty { opacity: .35; }
#reload-ind { margin-top: 6px; font-size: 10px; letter-spacing: 3px; color: var(--amber); opacity: 0; animation: lowpulse .8s infinite; }

/* score popups */
#score-pops { left: 0; top: 0; width: 100%; height: 100%; }
.score-pop { position: absolute; top: 58%; font-size: 20px; font-weight: 700; color: var(--amber); letter-spacing: 2px; text-shadow: 0 0 8px #000, 0 2px 0 #000; animation: scorefloat 1.4s ease-out forwards; }
.score-pop.head { color: var(--red); }
@keyframes scorefloat { 0% { opacity: 0; transform: translateY(10px); } 12% { opacity: 1; } 100% { opacity: 0; transform: translateY(-46px); } }

#interact-hint { left: 50%; top: 62%; transform: translateX(-50%); font-size: 12px; letter-spacing: 2px; color: var(--amber); opacity: 0; transition: opacity .2s; text-shadow: 0 0 6px #000; }

/* respawn overlay */
#respawn-overlay { inset: 0; display: none; background: radial-gradient(ellipse at center, rgba(60,8,4,.55), rgba(10,4,2,.9)); text-align: center; padding-top: 32vh; }
#respawn-overlay.show { display: block; }
.kia { font-size: 64px; letter-spacing: 20px; color: var(--red); font-weight: 700; text-shadow: 0 0 30px rgba(255,40,20,.6); }
#respawn-timer { font-size: 46px; color: #f0e2cc; margin-top: 18px; }
#respawn-info { margin-top: 10px; font-size: 12px; letter-spacing: 3px; color: var(--amber); }

/* ============ MENUS ============ */
.menu { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 20; background: linear-gradient(180deg, rgba(20,10,6,.82), rgba(10,6,4,.9)); backdrop-filter: blur(3px); }
.menu.show { display: flex; }
.panel { background: rgba(16,12,8,.9); border: 1px solid var(--line); padding: 34px 44px; text-align: center; max-width: 640px; width: min(94vw, 640px); max-height: 92vh; overflow-y: auto; clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); box-shadow: 0 0 60px rgba(0,0,0,.7), inset 0 0 60px rgba(255,120,40,.04); }
.panel.slim { max-width: 420px; }
.brand-top { font-size: 10px; letter-spacing: 5px; color: var(--amber-dim); margin-bottom: 14px; }
h1 { font-size: 54px; line-height: .95; letter-spacing: 10px; color: var(--amber); text-shadow: 0 0 24px rgba(255,140,50,.45), 0 3px 0 #000; }
h2 { font-size: 26px; letter-spacing: 6px; color: var(--amber); margin-bottom: 18px; }
h2.win { color: var(--olive); } h2.lose { color: var(--red); }
.tagline { font-size: 10px; letter-spacing: 4px; color: #b09a80; margin: 12px 0 18px; }
#best-line { font-size: 12px; letter-spacing: 2px; color: var(--olive); margin-bottom: 20px; }
.mbtn { display: block; width: 100%; margin: 8px 0; padding: 12px; background: rgba(255,180,84,.08); border: 1px solid var(--line); color: var(--amber); font-family: var(--mono); font-size: 14px; letter-spacing: 4px; cursor: pointer; transition: all .15s; }
.mbtn:hover { background: rgba(255,180,84,.22); box-shadow: 0 0 16px rgba(255,180,84,.3); }
.mbtn.big { font-size: 18px; padding: 14px; background: rgba(255,180,84,.14); }
.mbtn.ghost { opacity: .6; }
.ctrl-hint { margin-top: 18px; font-size: 10px; line-height: 1.9; letter-spacing: 1.5px; color: #9a8468; }
.ctrl-hint b { color: var(--amber-dim); }
.ctrl-hint.small { font-size: 9px; }
.opts-row { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center; font-size: 9px; letter-spacing: 1.5px; color: var(--amber-dim); }
.opts-row label { display: flex; align-items: center; gap: 6px; }
.opts-row input[type=range] { width: 80px; accent-color: var(--amber); }
.opts-row input[type=checkbox] { accent-color: var(--amber); }
.menu-foot { position: absolute; bottom: 14px; width: 100%; text-align: center; font-size: 9px; letter-spacing: 3px; color: #6a5a48; }

/* loadout */
.lo-sec { font-size: 10px; letter-spacing: 4px; color: var(--amber-dim); margin: 14px 0 6px; text-align: left; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.opt-grid .opt { border: 1px solid var(--line); padding: 8px 6px; font-size: 10px; letter-spacing: 1px; color: #c8b094; cursor: pointer; transition: all .12s; background: rgba(255,255,255,.02); }
.opt-grid .opt:hover { border-color: var(--amber); color: var(--amber); }
.opt-grid .opt.sel { background: rgba(255,180,84,.18); border-color: var(--amber); color: var(--amber); box-shadow: 0 0 10px rgba(255,180,84,.25); }
.opt-grid .opt .sub { display: block; font-size: 8px; color: #8a7460; margin-top: 3px; }
.lo-brief { margin: 14px 0; font-size: 10px; line-height: 1.8; letter-spacing: 1px; color: #9a8468; text-align: left; border-left: 2px solid var(--line); padding-left: 10px; }

/* end stats */
#end-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
#end-stats div { background: rgba(255,255,255,.03); border: 1px solid var(--line); padding: 10px 4px; }
#end-stats b { display: block; font-size: 22px; color: #f0e2cc; }
#end-stats span { font-size: 8px; letter-spacing: 2px; color: var(--amber-dim); }
#end-best { font-size: 11px; letter-spacing: 2px; color: var(--olive); margin-bottom: 14px; }

/* boot + touch note */
#boot-note { position: fixed; bottom: 20px; width: 100%; text-align: center; font-size: 11px; letter-spacing: 3px; color: var(--amber-dim); z-index: 15; animation: lowpulse 1.6s infinite; pointer-events: none; }
body.in-game #boot-note, body.menu-done #boot-note { display: none; }
#touch-note { display: none; position: fixed; top: 0; left: 0; right: 0; padding: 8px 12px; background: rgba(60,20,8,.92); color: var(--amber); font-size: 10px; letter-spacing: 2px; text-align: center; z-index: 40; }
#touch-note-x { display: inline-block; margin-left: 14px; padding: 2px 10px; border: 1px solid var(--amber); }
.touch-device #touch-note { display: block; }

/* ============ touch controls ============ */
#touch-ui { display: none; position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#touch-ui > div { position: absolute; pointer-events: auto; }
#stick-zone { left: 0; bottom: 0; width: 45%; height: 55%; }
#look-zone { right: 0; bottom: 0; width: 55%; height: 72%; }
#stick-base { position: absolute; width: 140px; height: 140px; border: 2px solid var(--amber-dim); border-radius: 50%; background: rgba(255,180,84,.06); opacity: .55; left: 30px; bottom: 40px; top: auto !important; }
#stick-nub { position: absolute; left: 45px; top: 45px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,180,84,.35); }
.tbtn { position: absolute; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--amber-dim); background: rgba(14,11,8,.5); color: var(--amber); font-size: 10px; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; }
.tbtn.on { background: rgba(255,180,84,.35); }
#tb-fire { right: 30px; bottom: 120px; width: 84px; height: 84px; }
#tb-ads { right: 130px; bottom: 96px; }
#tb-jump { right: 36px; bottom: 224px; }
#tb-crouch { right: 130px; bottom: 190px; }
#tb-reload { right: 226px; bottom: 90px; width: 54px; height: 54px; }
#tb-swap { right: 226px; bottom: 160px; width: 54px; height: 54px; }
#tb-nade { right: 116px; bottom: 272px; width: 54px; height: 54px; }
#tb-pause { right: 16px; top: 90px; width: 44px; height: 44px; }

@media (max-width: 760px) {
  #killfeed { width: 190px; font-size: 9px; }
  #minimap { width: 104px; height: 104px; }
  #tc-wrap { width: 300px; }
  #compass { width: 240px; }
  h1 { font-size: 36px; }
  #announce { font-size: 22px; letter-spacing: 4px; }
  .panel { padding: 22px 18px; }
  #ammo-mag { font-size: 26px; }
  #bl-wrap { bottom: 120px; }
  #br-wrap { bottom: 240px; right: 12px; }
  #end-stats { grid-template-columns: repeat(2, 1fr); }
}
