/* Boss Warning Overlay */
#boss-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    z-index: 2500;
    background: transparent;
    /* Default Transparent */
    pointer-events: none;
    /* animation keyframes handle the background */
    animation: warningFlash 0.5s infinite alternate;
}

/* Elite Wave Warning (Green) */
#boss-warning.warning-elite {
    background: repeating-linear-gradient(45deg,
            rgba(0, 255, 65, 0.1),
            rgba(0, 255, 65, 0.1) 10px,
            transparent 10px,
            transparent 20px) !important;
}

#boss-warning.warning-elite .warning-text {
    color: #00ff41 !important;
    text-shadow: 0 0 20px #00ff41, 0 0 50px #00ff41 !important;
}

#boss-warning.warning-elite .warning-sub {
    color: #fff !important;
    text-shadow: 0 0 10px #00ff41 !important;
}

#boss-warning.hidden,
#boss-hud.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.warning-text {
    font-size: 15vw;
    /* Responsive size */
    font-weight: 900;
    color: #ff0000;
    text-shadow: 0 0 20px #ff0000, 0 0 50px #ff0000;
    animation: textShake 0.1s infinite;
}

.warning-sub {
    font-size: 5vw;
    /* Responsive size */
    font-weight: 800;
    color: #fff;
    letter-spacing: 5px;
    margin-top: 10px;
    text-shadow: 0 0 10px #ff0000;
}

@keyframes warningFlash {
    from {
        background-color: rgba(255, 0, 0, 0.1);
    }

    to {
        background-color: rgba(255, 0, 0, 0.3);
    }
}

@keyframes textShake {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-2px, 2px);
    }

    50% {
        transform: translate(2px, -2px);
    }

    75% {
        transform: translate(-2px, -2px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* Boss HUD */
#boss-hud {
    position: fixed;
    bottom: calc(50px + env(safe-area-inset-bottom));
    /* MOVED TO BOTTOM to avoid overlap with player stats */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    animation: hudSlideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes hudSlideDown {
    from {
        transform: translate(-50%, 100%);
        /* Slide UP from bottom */
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

#boss-name {
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px #000;
    margin-bottom: 5px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.boss-hp-track {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#boss-hp-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff0055, #ff3333);
    transition: width 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 15px #ff0055;
}