/* Buff Container - Bottom Left */
.buff-container {
    position: fixed;
    bottom: 15px; 
    left: 15px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 50;
    max-width: 300px;
    pointer-events: none;
}

/* Individual Buff Icon */
.buff-icon {
    position: relative;
    width: 28px; 
    height: 28px;
    background: transparent;
    border-radius: 4px;
    border: none;
    box-shadow: none;
    overflow: visible; /* so tooltip can show */
    animation: buffFadeIn 0.3s ease-out;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.buff-icon:hover {
    opacity: 0.8;
}

.buff-icon:hover .buff-tooltip {
    opacity: 1;
    visibility: visible;
}

.buff-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Buff Tooltip */
.buff-tooltip {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 3px 5px; 
    border-radius: 4px;
    font-size: 10px; 
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 100;
    text-align: center;
}



/* Force all Devil Fruit and Innate buff icons to match standard size and style perfectly */
.buff-icon[id*="buff"],
.buff-icon[id*="weapon"],
.buff-icon[id*="transform"] {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.buff-icon[id*="buff"] img,
.buff-icon[id*="weapon"] img,
.buff-icon[id*="transform"] img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 4px !important;
}

.buff-icon[id*="buff"] div:not(.buff-tooltip):not([class*="timer"]),
.buff-icon[id*="weapon"] div:not(.buff-tooltip):not([class*="timer"]),
.buff-icon[id*="transform"] div:not(.buff-tooltip):not([class*="timer"]) {
    font-size: 16px !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Style for universal buff timer to make it small, compact, and positioned beautifully */
.universal-buff-timer,
.buff-timer {
    font-size: 8px !important;
    padding: 1px 2px !important;
    background: rgba(0, 0, 0, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 3px !important;
    color: #00ffcc !important;
    position: absolute !important;
    bottom: -2px !important;
    right: -2px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    line-height: 1 !important;
    z-index: 10 !important;
    font-weight: bold !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

.buff-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

/* Buff Fade In Animation */
@keyframes buffFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Heal Text Animation */
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

.heal-text {
    animation: floatUp 1s ease-out forwards;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .buff-container {
        bottom: 10px; 
        left: 10px;
        max-width: 200px;
    }
    
    .buff-icon {
        width: 24px; 
        height: 24px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .buff-container {
        bottom: 10px; 
        left: 10px;
        gap: 4px;
        max-width: 180px;
    }
    
    .buff-icon {
        width: 22px; 
        height: 22px;
    }
}

/* Specific screen size 821x430 */
@media (width: 821px) and (height: 430px) {
    .buff-container {
        bottom: 10px; 
        left: 10px;
        max-width: 200px;
    }
    
    .buff-icon {
        width: 24px;
        height: 24px;
    }
}
