:root {
  --mine: #35c8ff; --theirs: #ff7a2a; --ink: #eef3f7; --dim: #9aa7b3; --bg: rgba(10, 14, 18, 0.72);
  --line: rgba(255, 255, 255, 0.12); --gold: #f0c540; --bad: #ff4a3d; --ok: #7be38a;
  --num: 'Oxanium', 'Segoe UI', sans-serif; --txt: 'Heebo', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #05070a; color: var(--ink); font-family: var(--txt); user-select: none; -webkit-user-select: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font-family: inherit; }

/* שכבות מסך מלא */
#vignette, #hurt, #flash, #scope, #fade { position: fixed; inset: 0; pointer-events: none; }
#vignette { background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.42) 100%); }
#hurt { background: radial-gradient(ellipse at center, rgba(255,0,0,0) 45%, rgba(190,10,10,0.75) 100%); opacity: 0; }
#flash { background: #fff; opacity: 0; }
#fade { background: #000; opacity: 0; transition: opacity 0.5s; }
#scope { display: none; background: radial-gradient(circle at center, rgba(0,0,0,0) 0, rgba(0,0,0,0) 34vh, rgba(0,0,0,0.6) 34.6vh, #000 36vh); }
#scope.on { display: block; }
.scope-ring { position: absolute; left: 50%; top: 50%; width: 69vh; height: 69vh; margin: -34.5vh 0 0 -34.5vh; border-radius: 50%; border: 2px solid rgba(0,0,0,0.9); box-shadow: inset 0 0 60px rgba(0,0,0,0.65); }
.scope-h, .scope-v { position: absolute; background: #050505; }
.scope-h { left: calc(50% - 35vh); right: calc(50% - 35vh); top: 50%; height: 1.5px; margin-top: -0.75px; }
.scope-v { top: calc(50% - 35vh); bottom: calc(50% - 35vh); left: 50%; width: 1.5px; margin-left: -0.75px; }

/* תצוגת משחק */
#hud { position: fixed; inset: 0; pointer-events: none; direction: rtl; }
#crosshair { position: absolute; left: 50%; top: 50%; --gap: 6px; }
#crosshair .ch { position: absolute; background: #e8fff0; box-shadow: 0 0 0 1px rgba(0,0,0,0.75); }
#crosshair .t { width: 2px; height: 8px; left: -1px; bottom: var(--gap); }
#crosshair .b { width: 2px; height: 8px; left: -1px; top: var(--gap); }
#crosshair .l { height: 2px; width: 8px; top: -1px; right: var(--gap); }
#crosshair .r { height: 2px; width: 8px; top: -1px; left: var(--gap); }
#crosshair .dot { width: 2px; height: 2px; left: -1px; top: -1px; }
#crosshair.off { display: none; }
#hitmarker { position: absolute; left: 50%; top: 50%; opacity: 0; }
#hitmarker i { position: absolute; width: 11px; height: 2px; background: #fff; box-shadow: 0 0 2px #000; transform-origin: 0 50%; }
#hitmarker i:nth-child(1) { transform: rotate(45deg) translateX(7px); }
#hitmarker i:nth-child(2) { transform: rotate(135deg) translateX(7px); }
#hitmarker i:nth-child(3) { transform: rotate(225deg) translateX(7px); }
#hitmarker i:nth-child(4) { transform: rotate(315deg) translateX(7px); }
#hitmarker.head i { background: #ff4a3d; }
#hitmarker.kill i { background: #ff4a3d; width: 15px; height: 3px; }
#dmgdir { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#dmgdir .arc { position: absolute; left: -90px; top: -150px; width: 180px; height: 46px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: radial-gradient(ellipse at 50% 100%, rgba(255,40,30,0) 55%, rgba(255,40,30,0.85) 78%, rgba(255,40,30,0) 100%); transform-origin: 90px 150px; }

#top { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; direction: ltr; }
.score { font-family: var(--num); font-weight: 800; font-size: 34px; min-width: 56px; text-align: center; padding: 2px 10px; background: var(--bg); border-bottom: 3px solid; backdrop-filter: blur(6px); }
.score.mine { color: var(--mine); border-color: var(--mine); }
.score.theirs { color: var(--theirs); border-color: var(--theirs); }
.clock { text-align: center; background: var(--bg); padding: 4px 18px 5px; min-width: 112px; backdrop-filter: blur(6px); }
#timer { font-family: var(--num); font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: 1px; }
#timer.red { color: var(--bad); }
#timer.charge { color: var(--bad); animation: pulse 0.6s infinite; }
#roundLbl { font-size: 12px; color: var(--dim); margin-top: 2px; }
.alive { display: flex; gap: 5px; }
.alive i { width: 26px; height: 30px; background: var(--bg); border: 1px solid var(--line); display: block; position: relative; }
.alive i::after { content: ''; position: absolute; inset: 5px 7px; border-radius: 50% 50% 3px 3px; }
#aliveMine i::after { background: var(--mine); }
#aliveTheirs i::after { background: var(--theirs); }
.alive i.dead::after { background: #3a4047 !important; }
.alive i.dead { opacity: 0.55; }
.alive i.me { border-color: #fff; }
.alive i.charge::before { content: ''; position: absolute; left: 50%; bottom: -7px; width: 8px; height: 4px; margin-left: -4px; background: var(--gold); }
#sideLbl { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--dim); background: var(--bg); padding: 2px 12px; white-space: nowrap; }
#sideLbl b { color: var(--mine); }
@keyframes pulse { 50% { opacity: 0.45; } }

#mapbox { position: absolute; left: 16px; top: 16px; background: var(--bg); border: 1px solid var(--line); padding: 4px; backdrop-filter: blur(6px); }
#minimap { display: block; width: 220px; height: 190px; }
#zone { font-size: 13px; text-align: center; color: var(--dim); padding: 3px 0 1px; min-height: 20px; }
#killfeed { position: absolute; right: 16px; top: 16px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; direction: ltr; }
.kf { background: var(--bg); padding: 4px 10px; font-size: 14px; display: flex; gap: 8px; align-items: center; border-right: 3px solid transparent; animation: kfin 0.2s; direction: rtl; }
.kf.me { border-right-color: #fff; background: rgba(40, 46, 54, 0.9); }
.kf .mine { color: var(--mine); font-weight: 700; } .kf .theirs { color: var(--theirs); font-weight: 700; }
.kf .w { font-family: var(--num); font-size: 12px; color: var(--dim); border: 1px solid var(--line); padding: 0 5px; direction: ltr; }
.kf .hs { color: var(--bad); font-weight: 900; font-size: 12px; }
@keyframes kfin { from { opacity: 0; transform: translateX(20px); } }

#banner { position: absolute; left: 0; right: 0; top: 19%; text-align: center; opacity: 0; transition: opacity 0.35s; }
#banner.on { opacity: 1; }
#bannerTitle { font-size: 54px; font-weight: 900; letter-spacing: 2px; text-shadow: 0 3px 22px rgba(0,0,0,0.75); }
#bannerTitle.win { color: var(--mine); } #bannerTitle.lose { color: var(--theirs); }
#bannerSub { font-size: 19px; color: #d5dde4; margin-top: 2px; text-shadow: 0 2px 10px rgba(0,0,0,0.9); }
#announce { position: absolute; left: 0; right: 0; top: 112px; text-align: center; font-size: 20px; font-weight: 700; opacity: 0; transition: opacity 0.3s; text-shadow: 0 2px 10px rgba(0,0,0,0.9); }
#announce.on { opacity: 1; }
#announce.alert { color: var(--bad); }
#killbanner { position: absolute; left: 50%; bottom: 23%; transform: translateX(-50%); text-align: center; opacity: 0; pointer-events: none; }
#killbanner.on { animation: kbpop 2.1s cubic-bezier(.2,1.4,.3,1) forwards; }
.kb-ring { width: 74px; height: 74px; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); background: linear-gradient(160deg, #ff5a3a, #b4141a); box-shadow: 0 0 30px rgba(255,60,40,0.8); }
.kb-ring span { font-family: var(--num); font-weight: 800; font-size: 38px; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
#killbanner.head .kb-ring { background: linear-gradient(160deg, #ffd84a, #e07a10); }
#kbTxt { font-weight: 900; font-size: 22px; letter-spacing: 1px; text-shadow: 0 2px 10px #000; }
@keyframes kbpop { 0% { opacity: 0; transform: translateX(-50%) scale(1.9); } 9% { opacity: 1; transform: translateX(-50%) scale(1); } 78% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) scale(0.92) translateY(8px); } }
#prompt { position: absolute; left: 0; right: 0; top: 60%; text-align: center; font-size: 17px; text-shadow: 0 2px 8px #000; }
#prompt kbd, .keys-grid kbd { font-family: var(--num); background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.35); border-radius: 4px; padding: 1px 8px; margin: 0 3px; font-size: 15px; }
#progress { position: absolute; left: 50%; top: 66%; width: 320px; margin-left: -160px; text-align: center; display: none; }
#progress.on { display: block; }
#progressLbl { font-size: 15px; margin-bottom: 6px; text-shadow: 0 2px 8px #000; }
.bar { height: 7px; background: rgba(255,255,255,0.16); overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--gold); }

#vitals { position: absolute; left: 22px; bottom: 20px; display: flex; gap: 10px; direction: ltr; }
.vit { background: var(--bg); padding: 6px 16px 4px; display: flex; align-items: baseline; gap: 9px; font-family: var(--num); font-weight: 800; font-size: 44px; line-height: 1; backdrop-filter: blur(6px); border-bottom: 3px solid #fff; }
.vit .ico { font-size: 22px; opacity: 0.85; }
.vit.ar { font-size: 30px; align-self: flex-end; border-bottom-color: #8fb8d8; color: #cfe4f5; }
.vit.hp.low { color: var(--bad); border-bottom-color: var(--bad); }
#loadout { position: absolute; right: 22px; bottom: 20px; text-align: left; direction: ltr; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#money { font-family: var(--num); font-weight: 700; font-size: 22px; color: var(--ok); background: var(--bg); padding: 2px 12px; }
#gear { display: flex; gap: 6px; }
#gear span { background: var(--bg); border: 1px solid var(--line); font-size: 12px; padding: 2px 8px; direction: rtl; }
#gear span.charge { border-color: var(--gold); color: var(--gold); font-weight: 700; }
#weaponName { font-family: var(--num); font-size: 16px; color: var(--dim); letter-spacing: 1px; }
#ammo { font-family: var(--num); font-weight: 800; background: var(--bg); padding: 4px 16px 2px; border-bottom: 3px solid #fff; backdrop-filter: blur(6px); line-height: 1; }
#mag { font-size: 50px; } #mag.low { color: var(--bad); }
#ammo .sep { font-size: 26px; opacity: 0.4; margin: 0 6px; } #reserve { font-size: 26px; color: var(--dim); }
#slots { display: flex; gap: 5px; margin-top: 2px; }
#slots span { font-family: var(--num); font-size: 12px; background: var(--bg); padding: 2px 8px; color: var(--dim); border-bottom: 2px solid transparent; }
#slots span.on { color: #fff; border-bottom-color: var(--gold); }
#spectate { position: absolute; left: 0; right: 0; bottom: 110px; text-align: center; font-size: 18px; text-shadow: 0 2px 8px #000; }
#spectate b { color: var(--mine); }
#buyhint { position: absolute; left: 0; right: 0; bottom: 96px; text-align: center; font-size: 16px; color: var(--gold); text-shadow: 0 2px 8px #000; }

/* חלונות */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4, 7, 10, 0.58); backdrop-filter: blur(3px); z-index: 20; }
#menu { justify-content: flex-start; background: linear-gradient(270deg, rgba(4,7,10,0.9) 0, rgba(4,7,10,0.62) 34%, rgba(4,7,10,0) 62%); backdrop-filter: none; }
.menu-col { width: min(520px, 92vw); margin-right: 6vw; }
.logo { display: flex; align-items: baseline; gap: 16px; direction: ltr; justify-content: flex-end; }
.logo-en { font-family: var(--num); font-weight: 800; font-size: 86px; letter-spacing: 4px; line-height: 1; background: linear-gradient(180deg, #fff 30%, #ffb46a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 40px rgba(255,140,50,0.25); }
.logo-he { font-size: 28px; font-weight: 900; color: var(--theirs); }
.logo.small .logo-en { font-size: 54px; }
.tagline { color: #cfd8df; font-size: 16px; margin: 6px 0 26px; }
.opts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.opt { display: flex; align-items: center; gap: 12px; }
.opt label, .set-row label { width: 96px; color: var(--dim); font-size: 14px; flex: none; }
.opt input { background: rgba(255,255,255,0.08); border: 1px solid var(--line); color: #fff; font: inherit; padding: 7px 12px; width: 180px; outline: none; }
.seg { display: flex; border: 1px solid var(--line); }
.seg button { background: rgba(255,255,255,0.05); color: #c6d0d8; border: 0; padding: 7px 14px; font-size: 14px; cursor: pointer; border-left: 1px solid var(--line); }
.seg button:last-child { border-left: 0; }
.seg button.on { background: #fff; color: #0b0f13; font-weight: 700; }
.menu-btns { display: flex; flex-direction: column; gap: 9px; align-items: stretch; }
.menu-btns.row { flex-direction: row; justify-content: center; margin-top: 20px; }
.btn { background: rgba(255,255,255,0.07); color: #fff; border: 1px solid var(--line); padding: 9px 20px; font-size: 15px; cursor: pointer; transition: background 0.12s, transform 0.12s; pointer-events: auto; }
.btn:hover { background: rgba(255,255,255,0.18); transform: translateX(-3px); }
.btn.big { font-size: 19px; font-weight: 700; padding: 13px 22px; text-align: right; }
.btn.primary { background: linear-gradient(90deg, #ff7a2a, #ffb23e); color: #14100a; border-color: transparent; }
.btn.primary:hover { background: linear-gradient(90deg, #ff8a40, #ffc45e); }
.credit { margin-top: 22px; color: #8795a1; font-size: 13px; }
.panel { background: rgba(13, 18, 23, 0.95); border: 1px solid var(--line); padding: 22px 26px; width: min(560px, 94vw); max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.panel.wide { width: min(980px, 96vw); } .panel.narrow { width: min(380px, 92vw); }
.panel-head { display: flex; align-items: baseline; gap: 22px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.panel-head h2 { font-size: 24px; font-weight: 900; flex: 1; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; color: var(--dim); font-size: 13px; }
.shop-money b { color: var(--ok); font-family: var(--num); font-size: 20px; } .shop-timer b { font-family: var(--num); font-size: 20px; color: var(--gold); }
#shopGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.item { background: rgba(255,255,255,0.05); border: 1px solid var(--line); padding: 10px 12px; cursor: pointer; text-align: right; color: #fff; position: relative; transition: background 0.1s; min-height: 92px; }
.item:hover { background: rgba(255,255,255,0.14); }
.item .nm { font-family: var(--num); font-weight: 700; font-size: 17px; direction: ltr; text-align: right; }
.item .kd { color: var(--dim); font-size: 13px; }
.item .pr { font-family: var(--num); color: var(--ok); font-size: 16px; margin-top: 4px; }
.item .st { display: flex; gap: 3px; margin-top: 6px; direction: ltr; }
.item .st i { height: 4px; flex: 1; background: rgba(255,255,255,0.12); position: relative; }
.item .st i b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--mine); }
.item.cant { opacity: 0.4; cursor: default; } .item.cant .pr { color: var(--bad); }
.item.own { border-color: var(--gold); } .item.own::after { content: 'בידך'; position: absolute; left: 8px; top: 8px; font-size: 11px; color: var(--gold); }
.item .key { position: absolute; left: 8px; bottom: 8px; font-family: var(--num); font-size: 11px; color: var(--dim); border: 1px solid var(--line); padding: 0 5px; }
.shop-sec { grid-column: 1 / -1; color: var(--dim); font-size: 13px; margin-top: 6px; }
.set-row { display: flex; align-items: center; gap: 14px; margin: 14px 0; }
.set-row input[type=range] { flex: 1; accent-color: #ff8a3a; }
.set-row span { font-family: var(--num); width: 52px; text-align: left; }
.keys-grid { display: grid; grid-template-columns: 1fr; gap: 9px; font-size: 15px; }
.keys-grid div { display: flex; align-items: center; gap: 4px; } .keys-grid span { margin-right: 10px; color: #d2dae1; }
table.sb { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: 14px; }
table.sb th { text-align: right; color: var(--dim); font-weight: 500; font-size: 12px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
table.sb td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.05); }
table.sb td.n { font-family: var(--num); } table.sb tr.dead td { opacity: 0.45; } table.sb tr.me td { background: rgba(255,255,255,0.08); }
table.sb caption { text-align: right; font-weight: 900; font-size: 17px; padding: 6px 8px; }
table.sb.mine caption { color: var(--mine); } table.sb.theirs caption { color: var(--theirs); }
.end-title { font-size: 64px; font-weight: 900; text-align: center; letter-spacing: 3px; }
.end-title.win { color: var(--mine); } .end-title.lose { color: var(--theirs); }
.end-score { font-family: var(--num); font-size: 40px; text-align: center; margin-bottom: 14px; direction: ltr; }
.load-box { text-align: center; width: 340px; } #loadMsg { color: var(--dim); margin: 10px 0 14px; }
#loading { background: #05070a; z-index: 50; }
body.atk { --mine: #ff8a3a; --theirs: #35c8ff; }
body.def { --mine: #35c8ff; --theirs: #ff8a3a; }

/* הסבר קצר למי שנכנס בפעם הראשונה */
.howto { margin-top: 16px; padding: 12px 14px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); font-size: 14px; color: #d2dae1; }
.howto-t { font-weight: 900; color: #fff; margin-bottom: 8px; }
.howto-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.howto-row span { margin: 0 4px 0 12px; }
.howto kbd { font-family: var(--num); background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.35); border-radius: 4px; padding: 1px 7px; font-size: 13px; }
.howto-goal { color: var(--dim); font-size: 13px; line-height: 1.5; margin-top: 4px; }
.pause-note { background: rgba(240,197,64,0.12); border: 1px solid rgba(240,197,64,0.45); color: #ffe9a8; padding: 9px 12px; margin-bottom: 12px; font-size: 14px; line-height: 1.5; }
@media (max-height: 760px) { .logo-en { font-size: 62px; } .tagline { margin-bottom: 14px; } .opts { gap: 7px; margin-bottom: 14px; } .btn.big { padding: 9px 22px; font-size: 17px; } .howto { margin-top: 10px; padding: 9px 12px; } .credit { margin-top: 10px; } }
@media (max-height: 620px) { .credit, .howto-goal { display: none; } }

/* כניסה מטלפון */
#mobile { position: fixed; inset: 0; z-index: 60; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 24px 20px; background: linear-gradient(180deg, rgba(5,7,10,0.72) 0, rgba(5,7,10,0.94) 62%), url(og.jpg) center top / cover no-repeat #05070a; user-select: text; -webkit-user-select: text; }
.mob-box { width: min(440px, 100%); text-align: center; }
.mob-box .logo { justify-content: center; }
.mob-box h1 { font-size: 30px; font-weight: 900; line-height: 1.2; margin: 18px 0 12px; }
.mob-box p { font-size: 17px; line-height: 1.6; color: #d2dae1; margin-bottom: 22px; }
.mob-btns { display: flex; flex-direction: column; gap: 10px; }
.mob-btns .btn { text-align: center; text-decoration: none; display: block; }
.mob-btns .btn:hover { transform: none; }
.mob-link { margin-top: 16px; font-family: var(--num); direction: ltr; color: var(--gold); font-size: 16px; word-break: break-all; }
