
/*DEATH*/

#diedText {
    color: #fff;
    width: 100%;
    padding: 0;
    position: fixed;          /* fixed zamiast absolute */
    text-align: center;
    top: 50px;                /* 50px od góry */
    pointer-events: none;
    font-size: 120px;         /* rozmiar na 1440p */
    display: none;
    animation: growText 1.5s ease forwards;
    z-index: 10001;           /* wyżej niż deathOverlay */
    font-family: 'Ubuntu', sans-serif;
}

@keyframes growText {
    100% {
        font-size: 120px;
    }
}

.death-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0); /* start przezroczysty */
  z-index: 9999;
  font-family: 'Ubuntu', sans-serif;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: 20vw;
  opacity: 1;
  pointer-events: none;
  transition: none;
}
.death-overlay::before {
  content: "";
  position: fixed;         /* fixed, aby było zawsze na środku widoku */
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: blur(20px);
  z-index: 9998;
  opacity: 0;              /* na start niewidoczne */
  transition: opacity 0.8s ease;
}

.death-overlay.active::before {
  opacity: 1;              /* po dodaniu klasy robi się widoczne */
}

.death-overlay.show {
  pointer-events: all;
  animation: fadeInBackground 0.7s forwards;
}

@keyframes fadeInBackground {
  from {
    background: rgba(0,0,0,0);
  }
  to {
    background: rgba(0,0,0,0.85);
  }
}

.death-stats-vertical {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 300px;
  margin-bottom: 0;
  align-items: flex-start;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.death-stats-vertical.visible {
  opacity: 1;
}
.death-resource {
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.8), rgba(60, 60, 60, 0.85));
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  font-size: 24px; /* nieco mniejszy, ale bardziej elegancki */
  font-weight: 700;
  color: #f0f0f0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  width: 100%;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s ease;
  overflow: hidden;
}

.death-resource.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.icon {
  width: 96px;
  height: 96px;
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 20px;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.8));
  transform-origin: center;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

@keyframes iconPulse {
  0%   { transform: scale(0.9); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.death-resource.visible .icon {
  animation: iconPulse 0.5s ease forwards;
}


.stone-icon { background-image: url('../img/resources/stone_ico.png'); }
.food-icon { background-image: url('../img/resources/food_ico.png'); }
.gold-icon { background-image: url('../img/resources/gold_ico.png'); }
.kills-icon { background-image: url('../img/icons/skull.png'); }

.value {
  flex-grow: 1;
  text-align: right;
}
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap');

#respawnHint {
  position: fixed;
  left: 50%;
  bottom: 300px;
  transform: translateX(-50%);
  color: #00ffff;
  font-size: 26px; /* bardziej widoczny na 1440p */
  font-weight: 700;
  font-family: 'Ubuntu', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow:
    0 0 6px #00ffff,
    0 0 12px #00ffff,
    0 0 24px #00cfcf;
  user-select: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 999;
}

#respawnHint.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1.05);
}

#deathButtons {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  justify-content: center;
  gap: 20px;
  width: fit-content;
  padding: 12px 24px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1000;
}

#deathButtons.visible {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#deathButtons button {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  border: none;
  color: white;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 180, 216, 0.5);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(4px);
}

#deathButtons button:hover {
  background: linear-gradient(135deg, #0096c7, #023e8a);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 150, 199, 0.7);
}

#deathButtons button:active {
  transform: scale(0.98);
  box-shadow: 0 6px 14px rgba(0, 150, 199, 0.5);
}

/* Media query dla rozdzielczości 1920x1080 i wyższych — wszystko 40% mniejsze */
@media (min-width: 1920px) {
  #diedText {
    font-size: 72px !important; /* 120 * 0.6 */
  }

  .death-resource {
    font-size: 15.6px !important; /* 26 * 0.6 */
  }

  .icon {
    width: 62.4px !important;  /* 104 * 0.6 */
    height: 62.4px !important;
  }

  #respawnHint {
    font-size: 13.2px !important; /* 22 * 0.6 */
  }

  #deathButtons {
    width: 180px !important; /* 300 * 0.6 */
  }

  #deathButtons button {
    padding: 8.4px 30px !important; /* 14 * 0.6 i 50 * 0.6 */
    font-size: 12px !important; /* 20 * 0.6 */
    border-radius: 18px !important; /* 30 * 0.6 */
  }
}



/* Poniżej 1921x1081 - 20% mniejszy */
@media screen and (max-width: 1920px), screen and (max-height: 1080px) {
    #diedText {
    transform: scale(0.6);
}
.death-stats-vertical {
    transform: scale(0.6);
}
@keyframes growText {
    100% {
        font-size: 100px;
    }
}

  #deathButtons{
        transform: scale(0.6);
          position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  justify-content: center;
  gap: 20px;
  width: 300px;             /* rozmiar na 1440p */
  opacity: 0;
  transition: opacity 0.5s ease;
  }
  #respawnHint {
  position: fixed;
  left: 50%;
  bottom: 190px;
  transform: translateX(-50%);
  color: #00ffff;
  font-size: 22px;           /* rozmiar na 1440p */
  font-weight: 700;
  font-family: 'Ubuntu', sans-serif;
  text-shadow: 0 0 8px #00ffff;
  user-select: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}