body {
    margin: 0;
    padding: 0;
    font-family: "Cinzel", serif;
    color: #fff;
    background: radial-gradient(circle at center, #0a0a0a 30%, #000 100%);
    background-image: url(./img/mir-h-bg-2);
    background-size: cover;
    background-position: center;
    text-align: center;
}

/*h1 {
    margin-top: 30px;
    font-size: 2rem;
    letter-spacing: 1px;
    
}*/

.fighters {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 30px;
    
}

.fighter {
    width: 160px;
    height: 230px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.7);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    cursor: url(./img/Mir4Cursor_32X32.cur), auto;
    background-color: rgba(0, 0, 0, 0.692);
}

.fighter-container {
    position: relative;
    display: inline-block;
    margin: 10px;
}

.fighter-label {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translate(-50%, 10px);
    color: white;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.fighter-container:hover .fighter-label {
    opacity: 1;
    transform: translate(-50%, 0);
}



.fighter:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px #D70000;
}

#results {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: black;
    text-shadow: 0 0 8px #d70000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    filter:grayscale(80%)
}


.reset-button {
    margin-top: 25px;
    padding: 12px 36px;
    border: 2px solid white;
    border-radius: 10px;
    background-color: #d70000;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.reset-button:hover {
    background-color: #ff0000;
}

#arena {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 60px 80px;
    height: 400px;
    margin-top: 40px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    background: radial-gradient(circle, rgba(255,0,0,0.1), transparent 70%);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.2);
}

#arena img {
    width: 350px;
    height: 550px;
    object-fit: contain;
    border-radius: 16px;
    transition: transform 0.3s ease;
    z-index: 1;
}

#arena img.active {
    transform: scale(1.1);
}

.battlefield {
    margin-top: 40px;
    padding-bottom: 60px;
}

h1, .battlefield h1 {
    font-size: 2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #d70000;
}

#battleLogicBtn {
    width: 160px;
    height: 230px;
    border: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-family: "Cinzel", serif;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
    cursor: url(./img/Mir4Cursor_32X32.cur), pointer;
    line-height: 1.4;
}

#battleLogicBtn:hover {
    background-color: darkred;
    transform: scale(1.1);
    box-shadow: 0 0 20px #D70000;

}

#battleLogic {
    display: none;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 10px;
    padding: 8px;
    height: 230px;
    overflow-y: auto;
}

#battleLogicContainer {
    display: flex;
    justify-content: center;
    align-items: center;
}

table {
    border-collapse: collapse;
    width: 100%;
    color: white;
    background-color: #111;
    border: 1px solid white;
    font-size: 0.75rem;
}

th, td {
    border: 1px solid white;
    padding: 8px;
    text-align: center;
}

th {
    background-color: darkred;
}

/* Human slides in from left */
@keyframes enterLeft {
  0% { transform: translateX(-150%) scale(0.8); opacity: 0; }
  60% { transform: translateX(20px) scale(1.1); opacity: 1; }
  100% { transform: translateX(0) scale(1); }
}

@keyframes enterRight {
  0% { transform: translateX(150%) scale(0.8); opacity: 0; }
  60% { transform: translateX(-20px) scale(1.1); opacity: 1; }
  100% { transform: translateX(0) scale(1); }
}

/* Apply animations when class is added */
.enter-left {
  animation: enterLeft 0.8s ease-out;
}

.enter-right {
  animation: enterRight 0.8s ease-out;
}


@keyframes finalWin {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3) rotate(10deg); opacity: 0.9; }
  100% { transform: scale(1.1); opacity: 1; }
}

.final-winner {
  animation: finalWin 2s ease-out forwards;
  /*box-shadow: 0 0 50px gold;*/
}

.confetti-piece {
    position: absolute;
    z-index: 5;
    width: 10px;
    height: 10px;
    background-color: gold;
    border-radius: 2px;
    opacity: 0.9;
    animation: confettiFall 1.5s ease-out forwards;
    pointer-events: none;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-60px) scale(1.3) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: translateY(120px) scale(0.8) rotate(360deg);
    opacity: 0;
  }
}


#human-fighter, #computer-fighter {
    position: relative; /* Allows absolute positioning of confetti inside */
}

/* Smoke puff style */
.smoke {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: rgba(150, 150, 150, 0.7);
  border-radius: 50%;
  pointer-events: none;
  animation: puff 0.8s ease-out forwards;
  z-index: 10;
}

/* Smoke puff animation */
@keyframes puff {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Loser fade effect */
.loser {
  animation: loserFade 0.8s ease-in-out;
}

@keyframes loserFade {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(0.8); }
}


footer {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 15px 10px;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  box-sizing: border-box; /* ensures no extra width */
}

footer a {
  color: #ff4d4d;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}