/* --- ÚJ: ENDING SCREEN DIZÁJN --- */
#victory-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle, rgba(20, 20, 35, 0.5) 0%, rgba(5, 5, 15, 0.8) 100%);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  animation: fadeIn 0.8s ease-out;
}

.victory-box {
  background:
    radial-gradient(circle at top left, rgba(60, 60, 80, 0.3), transparent), rgba(10, 10, 20, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid rgba(197, 160, 89, 0.6);
  border-left: 2px solid rgba(197, 160, 89, 0.4);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 600px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 1),
    inset 0 0 30px rgba(57, 162, 219, 0.05);
  text-align: center;
  animation: slideUpFade 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.victory-text {
  font-size: 2.2rem;
  color: #f1c40f;
  margin-bottom: 25px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow:
    0 0 15px rgba(241, 196, 15, 0.5),
    0 5px 10px rgba(0, 0, 0, 0.8);
  line-height: 1.4;
}

.victory-stats {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}
.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  color: #eaeaea;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 5px;
}
.stat-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.stat-label {
  color: #4cc9f0;
  font-weight: bold;
}
.stat-value {
  font-weight: 900;
  color: #f1c40f;
}

.victory-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

#victory-screen button {
  padding: 14px 30px;
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(46, 204, 113, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex: 1;
  min-width: 150px;
}
#victory-screen button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(46, 204, 113, 0.5);
  filter: brightness(1.1);
}
#victory-screen button:active {
  transform: translateY(0);
}
