@keyframes animarGif {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

body {
    background: #111;
    color: #eaeaea;
    font-family: monospace;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .btn {
    background-color: #9e00ff;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
}

button {
    padding: 10px;
    margin: 5px;
    cursor: pointer;
    background-color: #9e00ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
}

.hidden {
    display: none;
}

/* LOGS */
.log-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

#logHeroi,
#logVilao {
    flex: 1;
    min-height: 150px;
    background: #1b1126;
    border-radius: 10px;
    padding: 15px;
    white-space: pre-line;
    max-width: 48%;
    color: #ff77ff;
}

/* BARRAS DE VIDA */
#barrasDeVida {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.barra-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.barra-col.direita {
    align-items: flex-end;
}

.hp-bar {
    width: 100%;
    max-width: 300px;
    height: 25px;
    background-color: #2d1b40;
    border: 2px solid #9e00ff;
    margin: 5px 0;
    border-radius: 5px;
    overflow: hidden;
}

.hp {
    height: 100%;
    background-color: #9e00ff;
    width: 100%;
    transition: width 0.4s ease-in-out;
}

/* GIF DE LUTA */
.gif-col {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #1b1126;
    border: 2px solid #9e00ff;
    flex-shrink: 0;
}

.gif-batalha {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    animation: animarGif 0.8s infinite ease-in-out;
    object-fit: cover;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    #barrasDeVida {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 30px;
    }

    .barra-col,
    .barra-col.direita {
        align-items: center;
    }

    .log-container {
        flex-direction: column;
        align-items: center;
    }

    #logHeroi,
    #logVilao {
        max-width: 100%;
    }
}