/* Charge Level System Styles */
.charge-level-container {
    width: 100%;
    margin-top: 5px;
    /* Reduced to align with header */
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(255, 202, 40, 0.15);
}

.level-header-wrapper {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 0;
}

#charge-level-percent {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1.2rem;
    color: #fff;
}

.level-progress-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    position: relative;
    margin-bottom: 20px;
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(-90deg, #ff8f00, #ffca28);
    /* Reversed gradient */
    border-radius: 10px;
    width: 0%;
    position: absolute;
    right: 0;
    left: auto;
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 202, 40, 0.3);
}

.level-chest {
    position: absolute;
    top: 50%;
    --chest-tx: 50%;
    /* Variable to handle RTL centering */
    transform: translate(var(--chest-tx), -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    width: 45px;
}

/* Fix for chests using 'right' - use variable instead of !important translate */
.level-chest[style*="right: 100%"] {
    --chest-tx: 100%;
}

.level-chest[style*="right: 0%"] {
    --chest-tx: 0%;
}

.level-chest:hover {
    transform: translate(var(--chest-tx), -50%) scale(1.15);
}

/* Chest Image Styles */
.chest-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.chest-label {
    position: absolute;
    bottom: -30px;
    /* Moved from top to bottom */
    font-size: 0.75rem;
    color: #aaa;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Chest States */

/* Locked: Dark and Grayscale */
.chest-img.locked {
    filter: grayscale(100%) brightness(0.5) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    opacity: 0.8;
}

/* Ready: Full Color + Glow + Pulse */
.chest-img.ready {
    filter: drop-shadow(0 0 10px #ffca28);
    animation: chestImgPulse 1.5s infinite ease-in-out;
    cursor: pointer;
}

/* Claimed: Faded slightly or Just Open (logic handles src) */
.chest-img.claimed {
    filter: brightness(0.9);
    opacity: 1;
}

@keyframes chestImgPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px #ffca28);
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px #ffca28);
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px #ffca28);
    }
}

/* --- Arrow & Help Refinements --- */

/* Main Charge Help Arrow (Top) - Pointer fix */
.vip-help-wrapper #charge-arrow-pointer {
    top: 40px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    /* Use Left:50% and -50% for standard centering */
}

/* Rewards Help Arrow (Level Header) */
.vip-help-wrapper #rewards-arrow-pointer {
    top: 28px;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
}

@keyframes arrowBounceUp {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateX(-50%) translateY(5px);
        opacity: 1;
    }
}