* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0b1830; color: #fff; user-select: none;
  font-family: "Segoe UI", "Roboto", "DejaVu Sans", sans-serif; }
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; }
.hidden { display: none !important; }
.F { font-family: "Luckiest Guy", Impact, "Arial Black", sans-serif; letter-spacing: 1px; }

#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 2px 3px rgba(0,0,0,.6); }
#fps { position: absolute; left: 8px; top: 6px; font: 12px monospace; opacity: .7; }
#scope { position: absolute; inset: 0; background: radial-gradient(circle, transparent 0 40vh, rgba(0,0,0,.75) 40.4vh, #000 41.2vh); }
#scope .ret { position: absolute; left: 50%; top: 50%; width: 81vh; height: 81vh; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden;
  box-shadow: inset 0 0 7vh rgba(0,0,0,.6), 0 0 0 3px #111; background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.07), transparent 38%), radial-gradient(circle, rgba(120,170,255,.04), rgba(0,10,30,.12)); }
#scope .ret i { position: absolute; background: #0b0b0d; }
#scope .h { left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; }
#scope .v { top: 0; bottom: 0; left: 50%; width: 1.5px; margin-left: -.75px; }
#scope .pl, #scope .pr { top: 50%; height: 7px; margin-top: -3.5px; width: 32%; }
#scope .pl { left: 0; } #scope .pr { right: 0; }
#scope .pb { left: 50%; width: 7px; margin-left: -3.5px; bottom: 0; height: 32%; }
#scope .th { left: 30%; right: 30%; top: 50%; height: 11px; margin-top: -5.5px; background: repeating-linear-gradient(90deg, #0b0b0d 0 1.5px, transparent 1.5px 4.05vh) !important; background-position: center !important; }
#scope .tv { top: 30%; bottom: 30%; left: 50%; width: 11px; margin-left: -5.5px; background: repeating-linear-gradient(180deg, #0b0b0d 0 1.5px, transparent 1.5px 4.05vh) !important; background-position: center !important; }
#scope .c { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #ff2b2b; box-shadow: 0 0 6px #ff2b2b, 0 0 0 1px rgba(0,0,0,.6); }

#topright { position: absolute; right: 16px; top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#map { width: 220px; height: 220px; border: 3px solid rgba(255,255,255,.85); border-radius: 6px; background: #1a5f8a; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
#counts { display: flex; gap: 14px; font-family: "Luckiest Guy", Impact, sans-serif; font-size: 22px; }
#storminfo { font-size: 14px; font-weight: 700; background: rgba(60,20,110,.65); padding: 4px 10px; border-radius: 4px; }
#feed { position: absolute; left: 16px; top: 40%; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
#feed div { background: rgba(0,0,0,.45); padding: 3px 10px; border-radius: 3px; animation: fin .2s; }
#feed b.you { color: #ffd34d; }
@keyframes fin { from { opacity: 0; transform: translateX(-20px); } }
#nums { position: absolute; inset: 0; overflow: hidden; }
.num { position: absolute; transform: translate(-50%, -50%); font-family: "Luckiest Guy", Impact, sans-serif; font-size: 26px; color: #fff; -webkit-text-stroke: 1.5px #000; }
.num.head { color: #ffd34d; font-size: 32px; } .num.shield { color: #6ec8ff; }
#prompt { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); font-size: 18px; font-weight: 700; background: rgba(0,0,0,.5); padding: 6px 14px; border-radius: 4px; display: none; }
#prompt b { background: #fff; color: #000; padding: 0 6px; border-radius: 3px; margin-right: 6px; }
#center { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); font-family: "Luckiest Guy", Impact, sans-serif; font-size: 34px; text-align: center; -webkit-text-stroke: 1px rgba(0,0,0,.6); }

#bars { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 360px; display: flex; flex-direction: column; gap: 4px; }
.bar { position: relative; height: 18px; background: rgba(0,0,0,.45); border-radius: 3px; overflow: hidden; transform: skewX(-12deg); }
.bar div { height: 100%; transition: width .15s; }
#hpfill { background: linear-gradient(90deg, #3fd15b, #8cf06f); }
#shfill { background: linear-gradient(90deg, #2d8cff, #7fd2ff); }
.bar span { position: absolute; left: 8px; top: -1px; font-family: "Luckiest Guy", Impact, sans-serif; font-size: 16px; transform: skewX(12deg); }
#inv { position: absolute; right: 16px; bottom: 18px; display: flex; gap: 6px; }
.slot { width: 66px; height: 66px; border-radius: 6px; background: rgba(0,0,0,.45); border: 3px solid rgba(255,255,255,.25); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; text-align: center; line-height: 1.1; }
.slot.sel { border-color: #fff; transform: translateY(-6px); }
.slot .ic { font-size: 22px; }
#mats { position: absolute; right: 16px; bottom: 98px; font-family: "Luckiest Guy", Impact, sans-serif; font-size: 22px; background: rgba(0,0,0,.4); padding: 2px 10px; border-radius: 4px; }
#ammo { position: absolute; right: 120px; bottom: 98px; font-family: "Luckiest Guy", Impact, sans-serif; font-size: 26px; }
#buildui { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); background: rgba(20,80,180,.6); padding: 6px 14px; border-radius: 4px; font-size: 14px; }
#stormfx { position: absolute; inset: 0; background: radial-gradient(circle, rgba(140,40,220,0) 40%, rgba(140,40,220,.55)); opacity: 0; transition: opacity .4s; }

#endscreen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10;
  background: radial-gradient(ellipse at center, rgba(40,90,190,.55), rgba(10,20,50,.92)); }
.title, #endtitle { font-family: "Luckiest Guy", Impact, sans-serif; font-size: 96px; color: #ffd34d; -webkit-text-stroke: 3px #3a1d6e; text-shadow: 0 8px 0 #3a1d6e, 0 14px 30px rgba(0,0,0,.5); transform: rotate(-3deg); }
.sub, #endsub { font-size: 20px; margin-top: 18px; font-weight: 700; }
#play, #again { margin-top: 28px; font-family: "Luckiest Guy", Impact, sans-serif; font-size: 34px; padding: 14px 70px; border: 0; border-radius: 6px; cursor: pointer;
  background: linear-gradient(180deg, #ffe066, #ffb400); color: #3a1d6e; box-shadow: 0 6px 0 #b36b00; }
#play:hover, #again:hover { filter: brightness(1.08); }
#play:disabled { filter: grayscale(1); opacity: .6; }
.keys { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; max-width: 900px; font-size: 15px; }
.keys b { color: #ffd34d; }
#ltext { margin-top: 18px; color: #cde; font-size: 14px; }

/* ---------- Lobby ---------- */
#menu { position: fixed; inset: 0; z-index: 10; display: flex; justify-content: space-between; align-items: stretch; pointer-events: none;
  background: linear-gradient(90deg, rgba(14,10,48,.92) 0%, rgba(30,20,90,.7) 30%, rgba(30,20,90,0) 55%), linear-gradient(0deg, rgba(10,8,40,.6), rgba(0,0,0,0) 35%); }
#menu > * { pointer-events: auto; }
.lobby-left { width: min(480px, 92vw); padding: 48px 0 32px 56px; display: flex; flex-direction: column; gap: 14px; }
.lobby-left .title { font-size: 78px; transform: rotate(-3deg); transform-origin: left; text-align: left; animation: pop .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: rotate(-3deg) scale(.6); opacity: 0; } }
.season { font-family: "Luckiest Guy", Impact, sans-serif; font-size: 18px; letter-spacing: 3px; color: #8fe3ff; margin-top: -6px; }
.party { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 6px; }
.pslot { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.15); border-radius: 8px; padding: 8px 12px; transform: skewX(-6deg); }
.pslot > * { transform: skewX(6deg); }
.pslot.me { border-color: #ffd34d; background: rgba(255,211,77,.15); }
.pslot.on { border-color: #37c8ff; background: rgba(55,200,255,.18); animation: glow 1.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 18px rgba(55,200,255,.6); } }
.pav { width: 42px; height: 42px; border-radius: 6px; display: grid; place-items: center; font-size: 24px; background: rgba(0,0,0,.35); }
.pslot b { font-family: "Luckiest Guy", Impact, sans-serif; font-size: 20px; letter-spacing: 1px; display: block; }
.pslot small { font-size: 13px; color: #cfe; }
.btn { font-family: "Luckiest Guy", Impact, sans-serif; border: 0; border-radius: 6px; cursor: pointer; text-align: left; padding: 14px 22px; transition: transform .12s, filter .12s; }
.btn:hover:not(:disabled) { transform: translateX(6px) scale(1.02); filter: brightness(1.1); }
.btn:disabled { filter: grayscale(1); opacity: .55; cursor: default; }
.btn.main { font-size: 36px; background: linear-gradient(180deg, #ffe066, #ffb400); color: #3a1d6e; box-shadow: 0 6px 0 #b36b00; }
.btn.alt { font-size: 26px; background: linear-gradient(180deg, #5fd2ff, #2a8ff0); color: #fff; box-shadow: 0 5px 0 #1a5fb0; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
#ltext { font-size: 14px; color: #dfe9ff; min-height: 18px; }
details.keys { margin-top: 4px; background: rgba(0,0,0,.3); border-radius: 6px; padding: 8px 12px; display: block; max-width: none; }
details.keys summary { cursor: pointer; font-weight: 700; color: #ffd34d; }
details.keys span { display: inline-block; margin: 4px 12px 0 0; font-size: 13px; }
.lobby-info { align-self: flex-end; text-align: right; padding: 0 40px 36px 0; }
.lobby-info .mode { font-family: "Luckiest Guy", Impact, sans-serif; font-size: 16px; letter-spacing: 3px; color: #8fe3ff; }
.lobby-info .modename { font-family: "Luckiest Guy", Impact, sans-serif; font-size: 30px; }
.lobby-info .mapname { font-size: 15px; margin-top: 4px; color: #e8e8ff; }

.pav { font-family: 'Luckiest Guy', Impact, sans-serif; color: #ffd34d; }
#counts span { font-size: 16px; } #counts b { font-size: 24px; }
.slot .ic { font-family: 'Luckiest Guy', Impact, sans-serif; font-size: 18px; }

/* Fadenkreuz im Fortnite-Stil: zeigt die aktuelle Streuung */
#cross { position: absolute; left: 50%; top: 50%; width: 0; height: 0; --gap: 6px; }
#cross i, #cross b { position: absolute; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 0 4px rgba(0,0,0,.4); transition: transform .05s; }
#cross .t, #cross .b { width: 2px; height: 9px; left: -1px; }
#cross .l, #cross .r { width: 9px; height: 2px; top: -1px; }
#cross .t { top: calc(-1 * var(--gap) - 9px); } #cross .b { top: var(--gap); }
#cross .l { left: calc(-1 * var(--gap) - 9px); } #cross .r { left: var(--gap); }
#cross .dot { width: 4px; height: 4px; left: -2px; top: -2px; border-radius: 50%; }
#cross .ring { display: none; background: transparent; border: 2px solid #fff; border-radius: 50%; width: calc(var(--gap) * 2); height: calc(var(--gap) * 2); left: calc(-1 * var(--gap)); top: calc(-1 * var(--gap)); box-shadow: 0 0 0 1px rgba(0,0,0,.4), inset 0 0 0 1px rgba(0,0,0,.4); }
#cross[data-mode="circle"] .ring { display: block; }
#cross[data-mode="circle"] i, #cross[data-mode="dot"] i { display: none; }
#hitx { position: absolute; left: 50%; top: 50%; width: 0; height: 0; opacity: 0; }
#hitx.show { opacity: 1; }
#hitx i { position: absolute; width: 10px; height: 2.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.5); left: -5px; top: -1px; }
#hitx i:nth-child(1) { transform: rotate(45deg) translateX(-12px); } #hitx i:nth-child(2) { transform: rotate(45deg) translateX(12px); }
#hitx i:nth-child(3) { transform: rotate(-45deg) translateX(-12px); } #hitx i:nth-child(4) { transform: rotate(-45deg) translateX(12px); }
#hitx.head i { background: #ffd34d; }

.party { gap: 6px; } .pslot { padding: 5px 12px; } .pslot .pav { width: 34px; height: 34px; font-size: 20px; }
