/* Tomato Cannon — party game UI (desktop fókusz) */

:root {
  --tomato: #e63928;
  --tomato-dark: #b32215;
  --sauce: #ff6b4a;
  --leaf: #3fa34d;
  --gold: #ffc93c;
  --ink: #22150f;
  --panel-bg: rgba(28, 16, 10, 0.88);
  --hud-bg: rgba(20, 12, 8, 0.62);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a2e1a;
  font-family: 'Trebuchet MS', 'Segoe UI', Verdana, sans-serif;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}

/* iOS Safari: a body-szintű user-select:none blokkolja az input fókuszát */
input,
textarea {
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}

.hidden {
  display: none !important;
}

/* --- Canvas: teljes képernyő --- */

#game-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: default; /* FPS: a célkereszt HUD-elem, nem kurzor */
}

/* --- Képernyők (join / lobby / end) --- */

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(230, 57, 40, 0.18), transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(63, 163, 77, 0.16), transparent 55%),
    rgba(12, 8, 5, 0.72);
  animation: screenFade 0.35s ease-out;
}

@keyframes screenFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.panel {
  background: var(--panel-bg);
  border: 4px solid var(--tomato);
  border-radius: 24px;
  padding: 42px 56px;
  text-align: center;
  min-width: 380px;
  max-width: 560px;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.35),
    0 18px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 40px rgba(230, 57, 40, 0.08);
  animation: panelPop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes panelPop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.title {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.05;
  color: var(--tomato);
  text-shadow:
    0 3px 0 var(--tomato-dark),
    0 8px 24px rgba(230, 57, 40, 0.5);
  transform: rotate(-2deg);
  margin-bottom: 6px;
}

.title-accent {
  display: block;
  color: var(--gold);
  text-shadow:
    0 3px 0 #b8860b,
    0 8px 24px rgba(255, 201, 60, 0.45);
}

.tagline {
  font-size: 16px;
  color: #f0d9c8;
  margin-bottom: 28px;
  font-style: italic;
}

.panel-title {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--gold);
  text-shadow: 0 3px 0 #7a5a00, 0 6px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 22px;
}

#name-input {
  display: block;
  width: 100%;
  padding: 14px 18px;
  font-size: 22px;
  font-family: inherit;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  background: #fff6ec;
  border: 3px solid var(--tomato-dark);
  border-radius: 14px;
  outline: none;
  margin-bottom: 18px;
  transition: box-shadow 0.15s, transform 0.15s;
}

#name-input:focus {
  box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.55);
}

#name-input.input-error {
  animation: shakeX 0.4s;
  box-shadow: 0 0 0 4px rgba(230, 57, 40, 0.7);
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.btn {
  font-family: inherit;
  font-weight: 900;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, var(--sauce), var(--tomato) 55%, var(--tomato-dark));
  border-radius: 16px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  box-shadow: 0 5px 0 var(--tomato-dark), 0 10px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--tomato-dark), 0 14px 28px rgba(0, 0, 0, 0.5);
}

.btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--tomato-dark), 0 6px 14px rgba(0, 0, 0, 0.4);
}

.btn:disabled {
  cursor: default;
  filter: grayscale(0.5) brightness(0.8);
  animation: waitPulse 1.2s ease-in-out infinite;
}

@keyframes waitPulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

.btn-big {
  display: block;
  width: 100%;
  padding: 16px 24px;
  font-size: 26px;
  letter-spacing: 3px;
}

.hint {
  margin-top: 18px;
  font-size: 14px;
  color: #cdb8a6;
}

/* --- Lobby játékoslista --- */

#player-list {
  list-style: none;
  margin-bottom: 24px;
  max-height: 320px;
  overflow-y: auto;
}

#player-list li {
  font-size: 22px;
  font-weight: 700;
  padding: 10px 16px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  border-left: 6px solid var(--leaf);
  text-align: left;
  animation: feedIn 0.25s ease-out;
}

#player-list li.me {
  border-left-color: var(--gold);
  background: rgba(255, 201, 60, 0.14);
}

/* --- Countdown overlay --- */

#countdown-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  pointer-events: none;
  font-size: 180px;
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    0 6px 0 #7a5a00,
    0 0 60px rgba(255, 201, 60, 0.8),
    0 12px 40px rgba(0, 0, 0, 0.6);
}

#countdown-overlay.pop {
  animation: countPop 0.9s cubic-bezier(0.2, 1.5, 0.4, 1);
}

@keyframes countPop {
  0% { transform: scale(2.2); opacity: 0; }
  30% { transform: scale(1); opacity: 1; }
  85% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.4; }
}

/* --- Game HUD --- */

#screen-game {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none; /* a canvas kapja a kattintásokat */
}

#timer {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 44px;
  font-weight: 900;
  padding: 6px 28px;
  color: #fff;
  background: var(--hud-bg);
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

#timer.urgent {
  color: var(--gold);
  border-color: var(--gold);
  animation: urgentPulse 0.5s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.08); }
}

#scoreboard {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 220px;
  background: var(--hud-bg);
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 18px;
}

.sb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-radius: 8px;
}

.sb-row.me {
  background: rgba(255, 201, 60, 0.22);
}

.sb-name {
  flex: 1;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

.sb-combo {
  font-weight: 900;
  color: var(--sauce);
  font-size: 15px;
}

.sb-score {
  font-weight: 900;
  color: var(--gold);
  min-width: 48px;
  text-align: right;
}

/* --- Killfeed --- */

#killfeed {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 360px;
}

.kf-entry {
  background: var(--hud-bg);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 17px;
  font-weight: 700;
  border-left: 5px solid var(--tomato);
  animation: feedIn 0.2s ease-out, feedOut 0.6s ease-in 3.4s forwards;
}

.kf-entry.kf-golden {
  border-left-color: var(--gold);
  background: rgba(90, 70, 10, 0.7);
}

.kf-entry.kf-sauce-row {
  border-left-color: var(--sauce);
}

.kf-points {
  color: var(--gold);
  font-weight: 900;
}

.kf-sauce {
  color: var(--sauce);
  font-weight: 900;
}

@keyframes feedIn {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes feedOut {
  to { opacity: 0; transform: translateX(-20px); }
}

/* --- Combo banner --- */

#combo-banner {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--sauce);
  text-shadow:
    0 4px 0 var(--tomato-dark),
    0 0 40px rgba(255, 107, 74, 0.8),
    0 10px 30px rgba(0, 0, 0, 0.6);
  -webkit-text-stroke: 2px #fff2;
  pointer-events: none;
}

#combo-banner.pop {
  animation: comboPop 1.4s cubic-bezier(0.2, 1.8, 0.4, 1) forwards;
}

@keyframes comboPop {
  0% { transform: translateX(-50%) scale(0.2) rotate(-8deg); opacity: 0; }
  20% { transform: translateX(-50%) scale(1.25) rotate(3deg); opacity: 1; }
  35% { transform: translateX(-50%) scale(1) rotate(-1deg); }
  80% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1.1); opacity: 0; }
}

/* --- Event banner (golden spawn / golden rush) --- */

#event-banner {
  position: absolute;
  top: 34%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 54px;
  font-weight: 900;
  letter-spacing: 4px;
  pointer-events: none;
  white-space: nowrap;
}

#event-banner.eb-gold,
#event-banner.eb-rush,
#event-banner.eb-info {
  color: var(--gold);
  text-shadow:
    0 4px 0 #7a5a00,
    0 0 50px rgba(255, 201, 60, 0.85),
    0 10px 30px rgba(0, 0, 0, 0.6);
}

#event-banner.eb-rush {
  color: #fff;
  text-shadow:
    0 4px 0 var(--tomato-dark),
    0 0 50px rgba(230, 57, 40, 0.9),
    0 10px 30px rgba(0, 0, 0, 0.6);
}

#event-banner.pop {
  animation: bannerDrop 2.5s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}

@keyframes bannerDrop {
  0% { transform: translateX(-50%) translateY(-80px) scale(0.6); opacity: 0; }
  15% { transform: translateX(-50%) translateY(0) scale(1.1); opacity: 1; }
  25% { transform: translateX(-50%) translateY(0) scale(1); }
  85% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-30px) scale(0.9); opacity: 0; }
}

/* --- Powerup indikátor --- */

#powerup-ind {
  position: absolute;
  bottom: 140px; /* a fegyver-sáv + fegyvernév fölött (SPEC 9.3) */
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 10px 28px;
  border-radius: 14px;
  background: var(--hud-bg);
  border: 3px solid var(--gold);
  color: var(--gold);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
  animation: puGlow 0.9s ease-in-out infinite;
  pointer-events: none;
}

#powerup-ind.pu-giant { border-color: var(--tomato); color: var(--sauce); }
#powerup-ind.pu-rapid { border-color: var(--gold); color: var(--gold); }
#powerup-ind.pu-triple { border-color: var(--leaf); color: #7ee88b; }

@keyframes puGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 201, 60, 0.4); }
  50% { box-shadow: 0 0 28px rgba(255, 201, 60, 0.85); }
}

/* --- Final scores --- */

#final-scores {
  margin-bottom: 10px;
}

.fs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  padding: 10px 16px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  animation: feedIn 0.3s ease-out backwards;
}

.fs-row:nth-child(1) { animation-delay: 0.05s; }
.fs-row:nth-child(2) { animation-delay: 0.15s; }
.fs-row:nth-child(3) { animation-delay: 0.25s; }
.fs-row:nth-child(4) { animation-delay: 0.35s; }
.fs-row:nth-child(5) { animation-delay: 0.45s; }
.fs-row:nth-child(6) { animation-delay: 0.55s; }
.fs-row:nth-child(7) { animation-delay: 0.65s; }
.fs-row:nth-child(8) { animation-delay: 0.75s; }

.fs-row.first {
  background: linear-gradient(90deg, rgba(255, 201, 60, 0.3), rgba(255, 201, 60, 0.1));
  font-size: 28px;
  border: 2px solid var(--gold);
}

.fs-row.second {
  background: rgba(200, 200, 210, 0.16);
  border: 2px solid rgba(200, 200, 210, 0.4);
}

.fs-row.third {
  background: rgba(205, 127, 50, 0.16);
  border: 2px solid rgba(205, 127, 50, 0.45);
}

.fs-row.me .fs-name {
  color: var(--gold);
}

.fs-place {
  font-weight: 900;
  min-width: 36px;
  color: var(--sauce);
}

.fs-row.first .fs-place { color: var(--gold); }

.fs-name {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-kills {
  font-size: 16px;
  color: #cdb8a6;
}

.fs-score {
  font-weight: 900;
  color: var(--gold);
  min-width: 70px;
  text-align: right;
}

/* --- FPS célkereszt + töltés-gyűrű (SPEC 8.3) --- */

#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#crosshair::before,
#crosshair::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
}

/* vízszintes vonal, középen réssel */
#crosshair::before {
  width: 26px;
  height: 2px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.92) 0 8px,
    transparent 8px 18px,
    rgba(255, 255, 255, 0.92) 18px 26px);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.9));
}

/* függőleges vonal, középen réssel */
#crosshair::after {
  width: 2px;
  height: 26px;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.92) 0 8px,
    transparent 8px 18px,
    rgba(255, 255, 255, 0.92) 18px 26px);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.9));
}

#crosshair-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.85);
}

/* Töltés-gyűrű: conic-gradient, a --p (0..1) custom property vezérli */
#charge-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--gold) calc(var(--p, 0) * 1turn),
    rgba(255, 255, 255, 0.14) 0
  );
  -webkit-mask: radial-gradient(closest-side, transparent 66%, #000 70%);
  mask: radial-gradient(closest-side, transparent 66%, #000 70%);
  opacity: 0;
  transition: opacity 0.12s;
}

#charge-ring.active {
  opacity: 1;
}

#charge-ring.full {
  filter: drop-shadow(0 0 6px var(--gold));
}

/* --- Hitmarker: rövid X-villanás kill-nél, direct-nél arany --- */

#hitmarker {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#hitmarker::before,
#hitmarker::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

#hitmarker::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#hitmarker::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#hitmarker.direct::before,
#hitmarker.direct::after {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(255, 201, 60, 0.9);
}

#hitmarker.pop {
  animation: hitPop 0.35s ease-out forwards;
}

@keyframes hitPop {
  0% { transform: scale(1.55); opacity: 1; }
  55% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0; }
}

/* --- Fegyver-sáv (SPEC 9.3) --- */

#weapon-bar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  pointer-events: none;
}

.wp-slot {
  position: relative;
  width: 64px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hud-bg);
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  filter: saturate(0.55) brightness(0.82);
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s, filter 0.12s;
}

.wp-slot.active {
  border-color: var(--gold);
  filter: none;
  transform: translateY(-4px) scale(1.06);
  box-shadow:
    0 0 18px rgba(255, 201, 60, 0.45),
    0 6px 16px rgba(0, 0, 0, 0.4);
}

.wp-key {
  position: absolute;
  top: 3px;
  left: 7px;
  font-size: 13px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.wp-slot.active .wp-key {
  color: var(--gold);
}

.wp-icon {
  font-size: 28px;
  line-height: 1;
}

/* Fegyvernév-felvillanás váltáskor */
#weapon-name {
  position: absolute;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.5),
    0 0 24px rgba(255, 201, 60, 0.55);
  pointer-events: none;
  white-space: nowrap;
}

#weapon-name.pop {
  animation: wpNamePop 0.95s ease-out forwards;
}

@keyframes wpNamePop {
  0% { transform: translateX(-50%) translateY(12px) scale(0.7); opacity: 0; }
  20% { transform: translateX(-50%) translateY(0) scale(1.08); opacity: 1; }
  75% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 0; }
}

/* --- V6 PvP HUD (SPEC 10.2) --- */

/* Saját HP-csík: bal alul, zöld→sárga→piros (a fill színét a JS állítja hsl-lel) */
#hp-bar {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 240px;
  height: 24px;
  background: var(--hud-bg);
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  overflow: hidden;
}

#hp-fill {
  height: 100%;
  width: 100%;
  border-radius: 8px;
  background: hsl(120, 80%, 45%);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.25), inset 0 3px 6px rgba(255, 255, 255, 0.25);
  transition: width 0.18s ease-out, background-color 0.18s;
}

#hp-bar.low {
  animation: hpLowPulse 0.7s ease-in-out infinite;
  border-color: var(--tomato);
}

@keyframes hpLowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 40, 0); }
  50% { box-shadow: 0 0 16px 3px rgba(230, 57, 40, 0.75); }
}

/* Sebzés irány-indikátor: a képernyő közepére horgonyzott, elforgatott
   konténer — a piros ív a támadó irányában, a képernyő széle felé ül */
#dmg-indicator {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 12;
}

.dmg-arrow {
  position: absolute;
  left: -70px;
  top: -36vmin;
  width: 140px;
  height: 42px;
  border-radius: 50% 50% 50% 50% / 100% 100% 0 0;
  background: radial-gradient(ellipse at 50% 100%,
    rgba(230, 57, 40, 0.95), rgba(230, 57, 40, 0.35) 60%, transparent 75%);
  filter: drop-shadow(0 0 14px rgba(230, 57, 40, 0.8));
}

#dmg-indicator.pop {
  animation: dmgIndPop 0.75s ease-out forwards;
}

@keyframes dmgIndPop {
  0% { opacity: 0; }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* Rövid piros vignetta player_hit-re (rám) */
#dmg-vignette {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  box-shadow: inset 0 0 120px 36px rgba(200, 20, 12, 0.7);
  opacity: 0;
}

#dmg-vignette.pop {
  animation: dmgVig 0.45s ease-out forwards;
}

@keyframes dmgVig {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}

/* Spawn-védelem: halvány kék pajzs-jelzés a saját képernyő szélén */
#shield-ind {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  box-shadow: inset 0 0 90px 18px rgba(90, 180, 255, 0.32);
  animation: shieldPulse 1.1s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* Saját halál: szürkülés + respawn-visszaszámláló overlay */
#death-overlay {
  position: fixed;
  inset: 0;
  z-index: 16;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: rgba(24, 4, 2, 0.3);
  backdrop-filter: grayscale(0.9) brightness(0.75);
  -webkit-backdrop-filter: grayscale(0.9) brightness(0.75);
}

#death-label {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--sauce);
  text-shadow: 0 3px 0 var(--tomato-dark), 0 8px 30px rgba(0, 0, 0, 0.7);
}

#respawn-count {
  font-size: 150px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 255, 255, 0.4);
}

#respawn-count.pop {
  animation: countPop 0.9s cubic-bezier(0.2, 1.5, 0.4, 1);
}

/* PvP killfeed-sor: az állat-soroktól eltérő (lilás) szín */
.kf-entry.kf-pvp-row {
  border-left-color: #c86bff;
  background: rgba(58, 20, 74, 0.72);
}

.kf-pvp {
  color: #e9b8ff;
}

/* Hitmarker játékos-találatra: más árnyalat (paradicsom-piros) */
#hitmarker.player::before,
#hitmarker.player::after {
  background: var(--sauce);
  box-shadow: 0 0 8px rgba(255, 107, 74, 0.9);
}

/* --- Cooldown-öntés a fegyver-slotokon (SPEC 10.3): felülről ürülő sötét
   overlay — aljára horgonyzott, a magasságát a JS csökkenti --- */
.wp-cd {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 0 0 11px 11px;
  pointer-events: none;
}

/* fire_blocked → slot piros villanás */
.wp-slot.blocked {
  animation: wpBlocked 0.32s ease-out;
}

/* csak szín/glow villan — transformot nem bántjuk, mert az .active slot
   transformjával ütközne */
@keyframes wpBlocked {
  0%, 60% { border-color: var(--tomato); box-shadow: 0 0 20px rgba(230, 57, 40, 0.9); }
  100% { border-color: rgba(255, 255, 255, 0.22); box-shadow: none; }
}

/* --- Vaddisznó-találat: piros képernyőszél-villanás --- */

#boar-flash {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  box-shadow: inset 0 0 150px 45px rgba(230, 57, 40, 0.78);
  opacity: 0;
}

#boar-flash.pop {
  animation: boarFlash 0.55s ease-out forwards;
}

@keyframes boarFlash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Pointer lock instrukció overlay --- */

#pl-overlay {
  position: fixed;
  inset: 0;
  z-index: 18; /* HUD (10) fölött, teljes képernyők (20) alatt */
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  background: rgba(8, 5, 3, 0.55);
  cursor: pointer;
}

.pl-text {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5), 0 8px 30px rgba(0, 0, 0, 0.6);
  animation: waitPulse 1.6s ease-in-out infinite;
}

.pl-sub {
  font-size: 17px;
  font-weight: 700;
  color: #e8d9c8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* --- Kapcsolat-státusz --- */

#conn-status {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(160, 30, 20, 0.92);
  border-radius: 12px;
  padding: 10px 24px;
  font-size: 17px;
  font-weight: 700;
  animation: waitPulse 1s ease-in-out infinite;
  pointer-events: none;
}

/* Visszalink a játékválasztóra — meccs közben rejtve */
#home-link {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 30;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #fff;
  opacity: 0.55;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
}
#home-link:hover { opacity: 1; }
body:has(#screen-game:not(.hidden)) #home-link { display: none; }
