/* PRELOADER GLOBAL MEJORADO */
.global-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.97);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.global-preloader.show {
    opacity: 1;
}

.preloader-active {
    overflow: hidden;
    height: 100vh;
}

.candlestick-container {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    height: 150px;
}

.candlestick {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: var(--height, 100px);
    transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: 
        transform 0.6s ease-out,
        opacity 0.6s ease-out;
}

.global-preloader.show .candlestick {
    transform: translateY(0);
    opacity: 1;
}

.candlestick .wick {
    width: 2px;
    height: 20px;
    background-color: #cccccc;
    transition: height 0.5s ease-in-out;
}

.candlestick .candle-body {
    width: 20px;
    height: calc(100% - 40px);
    background-color: var(--color, #00ff00);
    border-radius: 3px;
    margin: 2px 0;
    position: relative;
    transition: 
        background-color 0.5s ease-in-out,
        height 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Efectos para velas alcistas */
.candlestick[style*="#00ff00"] .candle-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px 3px 0 0;
}

/* Efectos para velas bajistas */
.candlestick[style*="#ff0000"] .candle-body {
    box-shadow: 
        inset 0 -2px 3px rgba(0, 0, 0, 0.3),
        0 0 5px rgba(0, 0, 0, 0.2);
}