/* Background color for testing. Can be removed. */
body {
    background-color: transparent !important;
    font-family: sans-serif;
    font-size: 25px;
    font-weight: bold;
}

#data {
    padding: 64px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 1200px;
}

.player-contain {
    color: #000000;
    margin-bottom: 76px;
    margin-right: 100px;
    height: 175px;
    width: 512px;
    display: flex;
    position: relative;
}

.player-health-wrapper {
    position: relative;
    margin: auto 0 24px 0;
    height: 20px;
    width: 325px;
}

.exhaustion-death .player-picture {
    filter: grayscale(1);
}

.dead .player-picture {
    filter: grayscale(1);
}

.dead .player-health,
.dead .progress,
.dead .progress-bar,
.dead .temp-hp-bar,
.dead .temp-hp-progress,
.dead .player-health-temp {
    display: none;
}

.player-picture {
    position: relative;
    left: 20px;
    width: 175px;
}

.player-picture > img {
    width: 175px;
    height: 180px;
}

.glow {
    animation: glow 0.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px -10px #eb0b0b;
    }

    to {
        box-shadow: 0 0 10px 10px #ad0f0f;
    }
}

.heal {
    animation: glow2 1s ease-in-out infinite alternate;
}

@keyframes glow2 {
    from {
        box-shadow: 0 0 10px -10px #debb4f;
    }

    to {
        box-shadow: 0 0 10px 10px #debb4f;
    }
}

.shake {
    animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes shake {
    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.status-effects {
    display: flex;
    /* flex-wrap: wrap; */
    gap: 3px;
    margin-bottom: 5px;
}

.status-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.progress {
    /* height: 120px; */
    background-color: #2a2a2a;
    margin-bottom: 0px;
}
.hp-progress {
    /* height: 120px; */
    background-color: #2a2a2a;
    margin-bottom: 0px;
    /* border-bottom-left-radius: 0% !important;
                border-bottom-right-radius: 0% !important; */
}

.progress-bar {
    transition: width 1s ease;
    font-size: 15px;
    /* line-height: 50px; */
    font-weight: bold;
}

.temp-hp-progress {
    border-top-left-radius: 0% !important;
    border-top-right-radius: 0% !important;
    height: 20px;
    background-color: #2a2a2a;
}

.temp-hp-bar {
    transition: width 1s ease;
    background-color: rgba(0, 191, 255, 0.6);
    font-size: 15px;
    line-height: 16px;
    font-weight: bold;
}

/* Base styles for the health bar container */
/* .player-health-wrapper {
                position: relative;
                overflow: hidden;
            } */

/* Slash Animation Effect 1 - Diagonal Line */
.slash-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 0, 0, 0.8) 48%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 0, 0, 0.8) 52%,
        transparent 55%
    );
    animation: slashAcross 0.5s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes slashAcross {
    0% {
        transform: translateX(-100%) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) rotate(0deg);
        opacity: 0;
    }
}

/* Slash Animation Effect 2 - Multiple Slashes */
.multi-slash-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.slash-line {
    position: absolute;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 0, 0, 0.8) 48%,
        white 50%,
        rgba(255, 0, 0, 0.8) 52%,
        transparent 55%
    );
    animation: multiSlash 0.3s ease-out forwards;
}

@keyframes multiSlash {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Slash Animation Effect 3 - X-Cut */
.x-cut-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.x-cut-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 49%,
        white 49.5%,
        red 50%,
        white 50.5%,
        transparent 51%
    );
    animation: xCut 0.4s ease-out forwards;
}

.x-cut-line:nth-child(2) {
    background: linear-gradient(
        -45deg,
        transparent 49%,
        white 49.5%,
        red 50%,
        white 50.5%,
        transparent 51%
    );
    animation-delay: 0.1s;
}

@keyframes xCut {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1.5) rotate(0deg);
        opacity: 0;
    }
}
.heal-effect-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 35px;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

/* Holy light rays effect */
.heal-rays {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 255, 150, 0.1) 10deg,
        transparent 20deg
    );
    animation: rotateRays 3s linear infinite;
}

/* Sparkle particles */
.heal-sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    filter: blur(1px);
}

/* Pulsing holy glow */
.heal-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 150, 0.3) 0%, transparent 70%);
    animation: pulseGlow 1.5s ease-in-out infinite;
}

/* Rising particles */
.heal-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(to bottom, rgba(255, 255, 150, 0.8), rgba(255, 255, 150, 0));
    border-radius: 50%;
}

/* Cross symbol */
.heal-cross {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.heal-cross::before,
.heal-cross::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 150, 0.8);
}

.heal-cross::before {
    width: 4px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.heal-cross::after {
    width: 100%;
    height: 4px;
    top: 50%;
    transform: translateY(-50%);
}

/* Animations */
@keyframes rotateRays {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-50px) scale(0);
        opacity: 0;
    }
}

@keyframes sparkleFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

@keyframes crossFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}
