/* Casino intro */

.candle {
    position: absolute;
    border-radius: 5px;
    transition: transform 0.1s ease-in-out;
}

.green {
    background: linear-gradient(to right, #00ff00, #009900);
    box-shadow: 0px 0px 15px #00ff00, 0px 0px 30px #008000;
    border: 1px solid #00ff00;
    animation: pulseGlowGreen 1.5s infinite alternate;
}

.red {
    background: linear-gradient(to right, #ff0000, #990000);
    box-shadow: 0px 0px 15px #ff0000, 0px 0px 30px #800000;
    border: 1px solid #ff0000;
    animation: pulseGlowRed 1.5s infinite alternate;
}

@keyframes pulseGlowGreen {
    0% {
        box-shadow: 0px 0px 12px rgba(0, 255, 0, 0.7);
    }

    50% {
        box-shadow: 0px 0px 25px rgba(0, 255, 0, 1);
    }

    100% {
        box-shadow: 0px 0px 12px rgba(0, 255, 0, 0.7);
    }
}

@keyframes pulseGlowRed {
    0% {
        box-shadow: 0px 0px 12px rgba(255, 0, 0, 0.7);
    }

    50% {
        box-shadow: 0px 0px 25px rgba(255, 0, 0, 1);
    }

    100% {
        box-shadow: 0px 0px 12px rgba(255, 0, 0, 0.7);
    }
}

.whisker {
    position: absolute;
    width: 6px;
    height: 100%;
    background: white;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.7);
    animation: whiskerGlow 1.5s infinite alternate, whiskerFlicker 0.2s infinite;
}

@keyframes whiskerGlow {
    0% {
        box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.5);
    }

    50% {
        box-shadow: 0px 0px 15px rgba(255, 255, 255, 1);
    }

    100% {
        box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.5);
    }
}

@keyframes whiskerFlicker {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

#chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 60vh;
    width: 95vw;
    max-width: 1400px;
    max-height: 600px;
    background-color: rgba(26, 26, 26, 0.65);
    z-index: 11;
    border: 2px solid white;
    border-radius: 10px;
    padding: 20px;
    overflow: hidden;
}

#candlestick-chart {
    position: relative;
    width: 95%;
    height: 95%;
    display: block;
    clip-path: inset(5% 0 5% 0);
}

/* 🔥 Homepage Intro Overlay */
#homepage-intro-overlay {
    position: fixed;
    inset: 0;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-out;
    overflow: hidden;
}

#cursor-hand {
    width: 48px;
    height: 48px;
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transform: scale(1.2);
    transition: all 0.3s ease;
    z-index: 10000;
}

#cursor-hand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Optional fade animations */
@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#cheering-video-container {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1s ease;
    pointer-events: none;
}

#yes-button:hover {
    background-color: #00cc00;
    color: white;
    transition: all 0.2s ease-in-out;
}

#no-button:hover {
    background-color: #cc0000;
    color: white;
    transition: all 0.2s ease-in-out;
}

/* Prevent scrollbars during intro prep */
body.intro-waiting {
    overflow: hidden;
    height: 100vh;
}

/* 📱 Mobile Layout (≤ 768px) */
@media screen and (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        scroll-behavior: smooth;
        touch-action: manipulation;
    }

    #chart-container {
        width: 95vw;
        height: 50vh;
        padding: 12px;
        border-radius: 8px;
        max-height: 480px;
        margin-top: env(safe-area-inset-top, 0px);
        margin-bottom: env(safe-area-inset-bottom, 0px);

    }

    #candlestick-chart {
        width: 100%;
        height: 100%;
        clip-path: inset(4% 0 4% 0);
    }

    #cursor-hand {
        width: 36px;
        height: 36px;
        transform: scale(1);
    }

    #homepage-intro-overlay {
        flex-direction: column;
        padding: 0 4vw;
    }
}

/* 📱 Extra Small Devices (≤ 480px) */
@media screen and (max-width: 480px) {
    #chart-container {
        height: 42vh;
        border-radius: 6px;
        padding: 8px;
        max-height: 400px;
    }

    #candlestick-chart {
        clip-path: inset(3% 0 3% 0);
    }

    #cursor-hand {
        width: 28px;
        height: 28px;
        transform: scale(0.9);
    }

    .candle {
        border-radius: 3px;
    }

    .whisker {
        width: 4px;
    }

    #cheering-video-container {
        object-position: center center;
    }
}