:root { --hud: #ffb347; --hud-dim: rgba(255, 179, 71, .55); --cyan: #4fe3ff; --bg: rgba(10, 12, 14, .55); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050607; color: #ddd;
  font-family: "Segoe UI", system-ui, sans-serif; user-select: none; }
#view canvas { display: block; }
.hidden { display: none !important; }

#hud { position: fixed; inset: 0; pointer-events: none; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#crosshair i { position: absolute; background: rgba(255, 220, 160, .85); }
#crosshair i:nth-child(1) { width: 2px; height: 7px; left: -1px; top: -12px; }
#crosshair i:nth-child(2) { width: 2px; height: 7px; left: -1px; top: 5px; }
#crosshair i:nth-child(3) { width: 7px; height: 2px; left: -12px; top: -1px; }
#crosshair i:nth-child(4) { width: 7px; height: 2px; left: 5px; top: -1px; }
#hitmarker { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; opacity: 0;
  background: linear-gradient(45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%),
              linear-gradient(-45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%); transition: opacity .15s; }
#hitmarker.head { filter: drop-shadow(0 0 3px red) sepia(1) saturate(8) hue-rotate(-40deg); }
#dmg { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(200, 0, 0, .65) 100%); }
#dmgdir { position: absolute; left: 50%; top: 50%; width: 0; height: 0; opacity: 0; }
#dmgdir b { position: absolute; left: -40px; top: -170px; width: 80px; height: 26px;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 40, 30, .9), transparent 70%); }

#objective { position: absolute; left: 22px; top: 18px; max-width: 420px; padding: 10px 14px; background: var(--bg);
  border-left: 3px solid var(--hud); color: #f2e6d4; font-size: 15px; }
#objective small, #allyPanel small, .stat small, #ammoBox small { display: block; color: var(--hud-dim); font-size: 11px; letter-spacing: 2px; }
#objNav { margin-top: 4px; color: var(--hud); font-size: 13px; }
#objArrow { display: inline-block; transition: transform .1s linear; }

#allyPanel { position: absolute; right: 22px; top: 18px; width: 210px; padding: 9px 12px; background: var(--bg);
  border-right: 3px solid var(--cyan); font-size: 13px; color: #d8f6ff; }
#allyPanel small { color: rgba(79, 227, 255, .7); }
.bar { height: 4px; background: rgba(255, 255, 255, .12); margin-top: 5px; }
.bar div { height: 100%; width: 100%; background: var(--cyan); transition: width .2s; }
.bar.en div { background: #b0ff6a; }
#minimap { position: absolute; right: 22px; top: 146px; background: rgba(5, 8, 10, .6); border: 1px solid rgba(79, 227, 255, .25); }

#vitals { position: absolute; left: 22px; bottom: 20px; display: flex; gap: 14px; }
.stat, #ammoBox { padding: 8px 16px; background: var(--bg); }
.stat span, #ammoBox span { font: 700 40px/1 Consolas, monospace; color: var(--hud); text-shadow: 0 0 10px rgba(255, 150, 40, .35); }
.stat span.low { color: #ff4a3a; animation: blink .6s infinite; }
#ammoBox { position: absolute; right: 22px; bottom: 20px; text-align: right; min-width: 200px; }
#slots { margin-top: 6px; font: 12px Consolas, monospace; color: rgba(255, 255, 255, .35); }
#slots b { color: var(--hud); font-weight: 700; }
#slots i { font-style: normal; color: rgba(255, 255, 255, .12); }
@keyframes blink { 50% { opacity: .35; } }

#prompt { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); color: #fff; font-size: 16px;
  background: rgba(0, 0, 0, .5); padding: 6px 14px; border: 1px solid var(--hud-dim); display: none; }
#progress { position: absolute; left: 50%; top: calc(60% + 42px); width: 240px; margin-left: -120px; height: 6px;
  background: rgba(255, 255, 255, .15); display: none; }
#progressBar { height: 100%; width: 0; background: var(--hud); }
#subs { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); width: min(760px, 90vw); text-align: center; }
#subs div { display: inline-block; margin: 3px 0; padding: 5px 12px; background: rgba(0, 0, 0, .6); font-size: 15px; color: #eee; transition: opacity .5s; }
#subs div b { color: var(--hud); }
#subs div.ally b { color: var(--cyan); }
#subs div.sys b { color: #ff6b5a; }
#subs div.civ b { color: #b0ff6a; }
#debug { position: absolute; left: 22px; top: 130px; margin: 0; padding: 8px 10px; background: rgba(0, 0, 0, .7);
  font: 12px/1.45 Consolas, monospace; color: #9fe8ff; white-space: pre; }

#overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20, 24, 28, .85), rgba(0, 0, 0, .95)); z-index: 5; }
.panel { width: min(640px, 92vw); padding: 34px 38px; background: rgba(14, 16, 18, .92); border: 1px solid rgba(255, 179, 71, .3);
  box-shadow: 0 0 60px rgba(255, 140, 30, .08); text-align: center; }
.panel h1 { margin: 0; font: 800 72px/1 Consolas, monospace; letter-spacing: 18px; color: var(--hud); text-shadow: 0 0 24px rgba(255, 150, 40, .4); }
.panel h2 { margin: 6px 0 18px; font-size: 14px; letter-spacing: 6px; color: #9aa3ab; font-weight: 500; }
.panel .story { line-height: 1.55; color: #c9c9c9; font-size: 15px; text-align: left; }
.panel em { color: #ff8a70; } .panel b { color: var(--cyan); }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 18px 0; text-align: left; font-size: 13px; color: #aaa; }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid #555; border-bottom-width: 2px; border-radius: 3px;
  background: #1b1d20; color: #eee; font: 12px Consolas, monospace; text-align: center; }
button { margin-top: 8px; padding: 12px 38px; font: 700 16px Consolas, monospace; letter-spacing: 4px; color: #111;
  background: var(--hud); border: 0; cursor: pointer; }
button:hover { filter: brightness(1.15); }
.note { font-size: 12px; color: #777; margin-top: 16px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 18px auto; max-width: 360px; text-align: left; font: 14px Consolas, monospace; color: #bbb; }
.stats b { color: var(--hud); text-align: right; }

#visor { position: absolute; inset: 0; background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 62%, rgba(0, 0, 0, .55) 100%); }
#nades { margin-top: 4px; font: 12px Consolas, monospace; color: var(--hud); letter-spacing: 1px; }
#nadeWarn { position: absolute; left: 50%; top: 50%; width: 0; height: 0; opacity: 0; transition: opacity .15s; }
#nadeWarn span { position: absolute; left: -18px; top: -120px; width: 36px; text-align: center; font-size: 30px; color: #ff5a2a;
  text-shadow: 0 0 10px #ff2a00; animation: blink .3s infinite; }
#objText.crit { color: #ff5a4a; font-weight: 700; animation: blink .8s infinite; }
.lvl { color: var(--cyan); font: 13px Consolas, monospace; letter-spacing: 3px; margin: -8px 0 12px; }
button.ghost { background: transparent; color: var(--hud-dim); border: 1px solid rgba(255, 179, 71, .3); padding: 7px 18px; font-size: 12px; letter-spacing: 2px; }
button:disabled { opacity: .55; cursor: wait; }

.credits { margin-top: 14px; font: 10px Consolas, monospace; color: #7d8794; max-width: 520px; line-height: 1.5; }

/* Oyun içi tuş listesi (H / F1) */
#keysHelp { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); padding: 18px 24px 8px;
  background: rgba(10, 12, 14, .86); border: 1px solid rgba(255, 179, 71, .35); z-index: 20; pointer-events: none; }
#keysHelp.hidden { display: none; }
#keysHelp .kh-title { font: 700 14px Consolas, monospace; letter-spacing: 5px; color: var(--hud); }
#keysHelp .kh-title small { float: right; letter-spacing: 1px; font-weight: 400; color: #7d8794; }
#keysHelp .controls { margin: 12px 0; }

/* Robot tim paneli */
.allyRow { margin-top: 6px; }
.allyRow .ar-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.allyRow .ar-head b { color: var(--cyan); font-weight: 700; }
.allyRow .ar-text { color: #d8f6ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.allyRow .bar { height: 3px; margin-top: 3px; }
.allyRow.down .ar-head b, .allyRow.down .ar-text { color: #ff5a40; }

/* Çevrim içi lobi ve takım satırları */
#lobby { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4, 6, 8, .9); z-index: 50; overflow: auto; }
.lb h3 { margin: 0 0 8px; font: 700 13px Consolas, monospace; letter-spacing: 3px; color: var(--cyan); }
.lb label { display: block; margin: 8px 0; text-align: left; font-size: 13px; color: #c9c9c9; }
.lb input[type=text], .lb input:not([type]) { background: #0c0f12; border: 1px solid #3a4046; color: #fff; padding: 7px 9px; font: 15px Consolas, monospace; width: 150px; margin-left: 6px; }
.lb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 14px 0; text-align: left; }
.lb-rule small { color: #8a939b; } .lb-rule b { color: #e8e8e8; }
.lb-code { color: var(--hud); font-size: 26px; letter-spacing: 8px; }
.lb-list div { display: flex; justify-content: space-between; padding: 7px 10px; margin: 4px 0; background: rgba(255, 255, 255, .05); font-size: 14px; }
.lb-list span { color: #8a939b; font-size: 12px; }
.lb-err { color: #ff6a55; font-size: 14px; } .lb-wait { color: var(--cyan); font-size: 14px; }
.mateRow { display: flex; justify-content: space-between; margin-top: 5px; font-size: 12px; } .mateRow b { color: #9dff8a; } .mateRow.down b, .mateRow.down span { color: #ff5a40; }
