body {
  margin: 0;
  overflow: hidden;
  background: black;
}


#v_src, #out {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform: scaleX(-1);
}

#v_src {
  z-index: 0;
}

#out {
  z-index: 2;
  pointer-events: none;
}


.fx {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: none;
  mix-blend-mode: screen;
  z-index: 20;
}

#n {
  width: 1600px;
}

#s {
  width: 2400px;
}


#hud {
  position: absolute;
  top: 40px; 
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  z-index: 100;
  color: white;
  font-family: Arial, sans-serif;
  pointer-events: none;

  
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  padding: 10px 0;
}

.player {
  width: 35%;
}

.name {
  font-size: 24px;
  margin-bottom: 8px;
  text-align: center;
}


.health-bar {
  width: 100%;
  height: 25px;
  background: rgba(255,255,255,0.15);
  border: 2px solid white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.fill {
  height: 100%;
  width: 100%;
  transition: width 0.2s linear;
  border-radius: 20px;
}


.naruto {
  background: linear-gradient(to right, orange, red);
  box-shadow: 0 0 15px orange;
}

.sasuke {
  background: linear-gradient(to right, deepskyblue, blue);
  box-shadow: 0 0 15px cyan;
}


.damage {
  animation: flash 0.2s;
}

@keyframes flash {
  0% { filter: brightness(2); }
  100% { filter: brightness(1); }
}

#winnerText {
  position: absolute;
  top: 45%;
  width: 100%;
  text-align: center;
  font-size: 48px;
  color: white;
  z-index: 200;
  font-family: Arial, sans-serif;
  display: none;
  text-shadow: 0 0 20px white;
}

#restartBtn {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 24px;
  font-size: 20px;
  display: none;
  cursor: pointer;

  border: none;
  border-radius: 8px;
  background: white;
  color: black;
  font-weight: bold;

  transition: all 0.2s ease;
}

#restartBtn:hover {
  background: #ddd;
  transform: translateX(-50%) scale(1.05);
}
