body {
    margin: 0;
    background: #111;
    color: #fff;
    font-family: Arial, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-button {
    position: absolute;
    top: 10px;
    left: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 12px;
    z-index: 9999;
}

#hud {
    display: flex;
    width: 800px;
    justify-content: space-between;
    margin-top: 20px;
}

.bar-container {
    width: 350px;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #555;
    margin-top: 5px;
}

.bar {
    height: 25px;
    width: 100%;
    transition: width 0.2s;
}

#hp1 {
    background: #e74c3c;
}

#hp2 {
    background: #3498db;
}



#effects-layer2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Estructuras para Globos de Regalo/Like flotantes */
.balloon-container {
    position: absolute;
    top: 60px;
    width: 80%;
    height: 35vh;
    z-index: 15;
}

.like-bubble {
    position: absolute;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
    animation: floatUp 3.5s ease-in forwards;
    z-index: 100;
}

.like-bubble img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 5px;
}

@keyframes floatUp {
    0% {
        transform: translateY(150px) scale(0.5);
        opacity: 0;
    }

    20% {
        transform: translateY(100px) scale(1);
        opacity: 1;
    }

    80% {
        transform: translateY(-50px) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
}

/* LEADERBOARD (Top Donadores) */
.leaderboard-panel {
    position: absolute;
    top: 60px;
    /* Mas abajo para no tapar los HP */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #f1c40f;
    border-radius: 10px;
    padding: 10px 20px;
    z-index: 1000;
    min-width: 250px;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.5);
    font-family: Arial, sans-serif;
}

.leader-item {
    display: flex;
    align-items: center;
    margin-top: 8px;
    font-size: 14px;
    color: white;
    text-shadow: 1px 1px 0 #000;
}

.leader-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid gold;
}

.leader-item span {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.leader-item strong {
    color: #f1c40f;
}

@keyframes screen-shake-anim {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    10% {
        transform: translate(-5px, -5px) rotate(-1deg);
    }

    20% {
        transform: translate(5px, -10px) rotate(1deg);
    }

    30% {
        transform: translate(-10px, 5px) rotate(0deg);
    }

    40% {
        transform: translate(10px, 10px) rotate(1deg);
    }

    50% {
        transform: translate(-5px, 10px) rotate(-1deg);
    }

    60% {
        transform: translate(5px, -5px) rotate(0deg);
    }

    70% {
        transform: translate(-10px, -10px) rotate(-1deg);
    }

    80% {
        transform: translate(10px, -5px) rotate(1deg);
    }

    90% {
        transform: translate(-5px, 5px) rotate(0deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

.screen-shake {
    animation: screen-shake-anim 0.4s ease-in-out;
}