/* Ekran śmierci, powalenie, znacznik plecaka, stos powiadomień o łupie, odkrycie rzadkiej karty */

/* powalony: czerwony puls krawędzi ekranu (tempo rośnie, gdy czas się kończy) */
#dpulse { position: fixed; inset: 0; z-index: 12; pointer-events: none; opacity: 0; }
#dpulse.on { opacity: 1; animation: dPulse var(--per, 1.1s) ease-in-out infinite; }
@keyframes dPulse {
  0%, 100% { box-shadow: inset 0 0 120px 20px rgba(150,12,8,.28); }
  10% { box-shadow: inset 0 0 230px 70px rgba(210,22,12,.72); }
  22% { box-shadow: inset 0 0 150px 30px rgba(170,14,8,.38); }
  34% { box-shadow: inset 0 0 200px 55px rgba(200,20,10,.58); }
}

/* ekran śmierci */
#death { position: fixed; inset: 0; z-index: 90; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(20,4,4,.62) 0%, rgba(4,2,2,.9) 100%); font-family: Bahnschrift, 'Segoe UI', sans-serif; text-align: center; }
#death.on { display: flex; animation: dFade 1.2s ease-out both; }
@keyframes dFade { from { opacity: 0; } to { opacity: 1; } }
#death h1 { margin: 0; font: 800 clamp(46px, 8vw, 96px)/1 Bahnschrift, sans-serif; letter-spacing: .3em; text-indent: .3em; color: #c9402e; text-shadow: 0 0 40px rgba(220,40,20,.5), 0 4px 0 #1a0605; animation: dTitle 1.4s cubic-bezier(.2,1,.3,1) both; }
@keyframes dTitle { from { letter-spacing: .7em; opacity: 0; filter: blur(10px); } to { filter: none; } }
#death .by { font: 700 20px Bahnschrift, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #cfc9ac; }
#death .by b { color: #e6e0c4; }
#death .resp { margin-top: 18px; font: 800 30px Bahnschrift, sans-serif; letter-spacing: .2em; color: #e6e0c4; }
#death .resp i { font-style: normal; color: #e0743a; }
#death .pack { margin-top: 6px; font: 600 14px Bahnschrift, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #9a967e; }

/* znacznik własnego plecaka po odrodzeniu: strzałka i odległość nad paskiem */
#ctag { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 9; display: none; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; pointer-events: none;
  background: rgba(15,17,11,.82); border: 1px solid #e0743a; box-shadow: 0 0 14px rgba(224,116,58,.35); font: 700 13px Bahnschrift, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #e6e0c4; }
#ctag.on { display: flex; animation: ctPop .4s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes ctPop { from { opacity: 0; transform: translateX(-50%) translateY(14px); } }
#ctag svg { width: 26px; height: 26px; transition: transform .1s linear; filter: drop-shadow(0 0 4px rgba(224,116,58,.7)); }
#ctag b { color: #e0743a; font-size: 16px; }
#ctag .cl, #ctag.lost .cm, #ctag.lost svg { display: none; }
#ctag.lost .cl { display: inline; color: #c9c4a6; }
#ctag.lost { border-color: #6e6a56; box-shadow: none; }

/* stos powiadomień o łupie (nad liczbą amunicji, po prawej) */
#feed { position: fixed; right: 24px; bottom: 150px; z-index: 8; display: flex; flex-direction: column-reverse; gap: 5px; align-items: flex-end; pointer-events: none; }
.fd { display: flex; align-items: center; gap: 8px; padding: 3px 12px 3px 4px; background: linear-gradient(90deg, rgba(15,17,11,0), rgba(15,17,11,.78) 24%); border-right: 3px solid var(--rc, #a4a49a); font: 600 15px Bahnschrift, sans-serif; letter-spacing: .04em; color: #e6e0c4; text-shadow: 0 1px 2px #000; animation: fdIn .3s cubic-bezier(.2,1.3,.4,1) both; transition: opacity .35s, transform .35s; }
.fd img { width: 28px; height: 28px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.fd b { color: var(--rc, #e6e0c4); font-weight: 800; }
.fd.bump { animation: fdBump .22s ease-out; } .fd.out { opacity: 0; transform: translateX(30px); }
@keyframes fdIn { from { opacity: 0; transform: translateX(40px); } }
@keyframes fdBump { 0% { transform: scale(1.12); filter: brightness(1.6); } 100% { transform: none; filter: none; } }

/* odkrycie rzadkiej karty łupu: rozbłysk przy wjeździe, mityczna dodatkowo z drobinami światła po krawędziach */
.lc-card.rv::before { content: ''; position: absolute; inset: -2px; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rc) 85%, #fff) 0%, transparent 70%); mix-blend-mode: screen; animation: rvFlash .5s ease-out .45s both; }
.lc-card.rv4::before, .lc-card.rv5::before { animation-duration: .7s; }
@keyframes rvFlash { 0% { opacity: .95; } 100% { opacity: 0; } }
.lc-card.rv5 { box-shadow: 0 0 26px var(--rc), inset 0 0 22px rgba(0,0,0,.4); }
.lc-spark { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffd0cc; box-shadow: 0 0 8px 2px var(--rc); pointer-events: none; opacity: 0;
  left: calc(var(--k) * 8.7%); top: calc(6% + var(--k) * 7.4%); animation: sparkUp 1.6s ease-out var(--d) infinite; }
.lc-spark:nth-child(odd) { left: auto; right: calc(var(--k) * 4%); }
@keyframes sparkUp { 0% { opacity: 0; transform: translateY(8px) scale(.4); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-34px) scale(1.2); } }
#loot .lc-row { padding: 10px 6px; }   /* bez przewijania: najwyżej cztery karty (MAX_CARDS) */
#death .kl { font: 700 14px Bahnschrift, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8e8a72; }


/* ekran śmierci: tylko napis i odliczanie do odrodzenia (przyczyna, statystyki, plecak i raport ukryte — decyzja Topka 2026-10-10) */
#death .by, #death .kl, #death .pack, #death .rpt { display: none !important; }
