.hosty-hp-container {
    margin-top: 10px;
}

.hosty-hp-bar {
    background: #ddd;
    width: 100%;
    height: 22px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
    position: relative;
}

.hosty-hp-fill {
    height: 100%;
    width: 100%;
    transition: width .4s ease-in-out, background-color .4s ease-in-out;
}

.hp-high { background-color: #2ecc71; }
.hp-medium { background-color: #f1c40f; }
.hp-low { background-color: #e74c3c; }

.shake {
    animation: shake 0.3s;
}
@keyframes shake {
  0% { transform: translateX(0px); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0px); }
}

/* Critical hit flash & shake */
.critical-flash {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(255,255,255,0.9);
    animation: flashOut 1.5s ease-out;
    z-index: 999999;
}
@keyframes flashOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.critical-shake {
    animation: critShake 0.6s ease;
}
@keyframes critShake {
    0%{transform:translate(0,0)}
    20%{transform:translate(-12px,6px)}
    40%{transform:translate(12px,-6px)}
    60%{transform:translate(-12px,6px)}
    80%{transform:translate(12px,-6px)}
    100%{transform:translate(0,0)}
}

.crit-damage-popup {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    font-weight: bold;
    color: red;
    text-shadow: 3px 3px 10px black;
    animation: dmgFloat 1.4s ease-out forwards;
    z-index: 999999;
}
@keyframes dmgFloat {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -120px); }
}
/* HP Bar */
.hosty-hp-bar {
    width: 100%;
    height: 18px;
    background: #222;
    border-radius: 4px;
    margin-top: 6px;
    overflow: hidden;
}
.hosty-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #008800);
    transition: width 0.4s ease;
}

/* Floating damage text */
.hosty-damage-number {
    position: fixed;
    font-size: 48px;
    color: red;
    font-weight: bold;
    text-shadow: 2px 2px 6px black;
    animation: hostyFloat 1.2s ease-out forwards;
    z-index: 9999999;
}
@keyframes hostyFloat {
    0% { opacity: 1; transform: translateY(0px) scale(1); }
    100% { opacity: 0; transform: translateY(-150px) scale(1.4); }
}

/* Attack buttons */
.hosty-attack-btn {
    padding: 12px 18px;
    background: #444;
    color: #fff;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    margin-top:5px;
}
.hosty-attack-btn:hover {
    background:#666;
}
.hosty-fx-element {
    position: fixed;
    pointer-events: none;
    z-index: 9999999;
    transform-origin: center center;
}

.fx-flash {
    animation: fxFlash 0.4s linear;
}

@keyframes fxFlash {
    0% { opacity: 0; }
    50% { opacity: 1; background: white; }
    100% { opacity: 0; }
}

.fx-fadeout {
    animation: fxFade 0.8s ease-out forwards;
}

@keyframes fxFade {
    0% { opacity: 1; }
    100% { opacity: 0; transform: scale(1.4); }
}
