/* Roulette Loading Overlay */
.roulette-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.roulette-loading-overlay.active {
    display: flex;
    opacity: 1;
}

.roulette-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Roulette Wheel */
.roulette-wheel {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5),
                0 0 60px rgba(255, 215, 0, 0.3),
                0 0 90px rgba(255, 215, 0, 0.2);
    animation: roulette-spin 2s cubic-bezier(0.17, 0.67, 0.83, 0.67) infinite;
}

/* Outer Ring - Gold */
.roulette-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #FFD700 0deg,
        #FFA500 45deg,
        #FFD700 90deg,
        #FFA500 135deg,
        #FFD700 180deg,
        #FFA500 225deg,
        #FFD700 270deg,
        #FFA500 315deg,
        #FFD700 360deg
    );
    border: 8px solid #DAA520;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Inner Wheel - Red and Black segments */
.roulette-inner {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-radius: 50%;
    background: conic-gradient(
        #C41E3A 0deg 30deg,
        #000000 30deg 60deg,
        #C41E3A 60deg 90deg,
        #000000 90deg 120deg,
        #C41E3A 120deg 150deg,
        #000000 150deg 180deg,
        #C41E3A 180deg 210deg,
        #000000 210deg 240deg,
        #C41E3A 240deg 270deg,
        #000000 270deg 300deg,
        #C41E3A 300deg 330deg,
        #000000 330deg 360deg
    );
    border: 4px solid #DAA520;
}

/* Center Hub */
.roulette-center {
    position: absolute;
    width: 30%;
    height: 30%;
    top: 35%;
    left: 35%;
    border-radius: 50%;
    background: radial-gradient(circle, #FFD700, #DAA520);
    border: 3px solid #FFA500;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* Numbers around the wheel */
.roulette-number {
    position: absolute;
    width: 20px;
    height: 20px;
    color: white;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

/* Ball animation */
.roulette-ball {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ffffff, #c0c0c0);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
                0 0 20px rgba(255, 255, 255, 0.5);
    animation: ball-spin 1s linear infinite;
    top: 15%;
    left: 50%;
    transform-origin: 0 85px;
}

/* Loading Text */
.roulette-loading-text {
    margin-top: 40px;
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    text-align: center;
    animation: pulse-text 1.5s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
                 0 0 20px rgba(255, 215, 0, 0.3);
}

.roulette-loading-subtext {
    margin-top: 10px;
    font-size: 14px;
    color: #FFA500;
    text-align: center;
    opacity: 0.8;
}

/* Spin Animation */
@keyframes roulette-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Ball Spin Animation */
@keyframes ball-spin {
    0% {
        transform: rotate(0deg) translateX(90px) rotate(0deg);
    }
    100% {
        transform: rotate(-360deg) translateX(90px) rotate(360deg);
    }
}

/* Text Pulse Animation */
@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Sparkle effect */
.roulette-sparkle {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: sparkle-fade 2s ease-in-out infinite;
}

.sparkle:nth-child(1) { top: 10%; left: 50%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 30%; left: 85%; animation-delay: 0.3s; }
.sparkle:nth-child(3) { top: 70%; left: 85%; animation-delay: 0.6s; }
.sparkle:nth-child(4) { top: 90%; left: 50%; animation-delay: 0.9s; }
.sparkle:nth-child(5) { top: 70%; left: 15%; animation-delay: 1.2s; }
.sparkle:nth-child(6) { top: 30%; left: 15%; animation-delay: 1.5s; }

@keyframes sparkle-fade {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .roulette-wheel {
        width: 150px;
        height: 150px;
    }

    .roulette-container {
        width: 250px;
        height: 250px;
    }

    .roulette-loading-text {
        font-size: 20px;
    }

    .roulette-loading-subtext {
        font-size: 12px;
    }
}
