/**
 * Bankroll MLM - Spin Wheel Styles
 * 
 * CSS for the auto-spinning wheel in the premium homepage
 */

/* Spin Wheel Container */
.spin-wheel-container {
    position: relative;
    width: 380px;
    height: 380px;
    margin: 0 auto;
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Wheel Light Effects */
.wheel-light-effects {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.glow-ring {
    position: absolute;
    width: 140%;
    height: 140%;
    top: -20%;
    left: -20%;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.4) 0%, rgba(255, 215, 0, 0.1) 60%, rgba(255, 215, 0, 0) 70%);
    animation: glow-pulse 3s ease-in-out infinite;
}

.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMCAxMCI+PHBhdGggZmlsbD0iI2ZmZDcwMCIgZD0iTTUgMCA2IDQgMTAgNSA2IDYgNSAxMCA0IDYgMCA1IDQgNHoiLz48L3N2Zz4=) 0 0 / 10px 10px;
    opacity: 0.7;
    mix-blend-mode: screen;
    animation: sparkle 20s linear infinite;
}

/* Main Spinning Wheel */
.spin-wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 
                0 0 15px rgba(255, 215, 0, 0.3);
    overflow: hidden;
    transform-style: preserve-3d;
    animation: spin-wheel 20s linear infinite;
    will-change: transform;
}

/* Wheel Sections */
.wheel-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
    padding-bottom: 50%;
    box-sizing: border-box;
    clip-path: polygon(100% 0, 0 0, 0 100%);
    transform: rotate(calc(var(--section-index) * 45deg));
    background: var(--section-color);
}

.wheel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at bottom right, 
                rgba(255, 255, 255, 0.3) 0%, 
                rgba(255, 255, 255, 0) 60%);
}

/* Center of the Wheel */
.wheel-center {
    position: absolute;
    width: 120px;
    height: 120px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.center-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffd700, #d4af37);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

.center-logo {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Wheel Pointer */
.wheel-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: 30px;
    height: 40px;
}

.pointer-tip {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 40px solid #ffd700;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.7));
}

/* Winner Display */
.winner-display {
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    text-align: center;
    opacity: 1;
    animation: flash 8s infinite 2s;
}

.win-text {
    color: #ffd700;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.prize-amount {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes spin-wheel {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes sparkle {
    0% {
        background-position: 0 0;
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        background-position: 100px 100px;
        opacity: 0.5;
    }
}

@keyframes flash {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

/* Responsive Adjustments */
@media only screen and (max-width: 768px) {
    .spin-wheel-container {
        width: 300px;
        height: 300px;
    }
    
    .wheel-center {
        width: 60px;
        height: 60px;
    }
    
    .center-logo {
        font-size: 16px;
    }
    
    .wheel-section {
        font-size: 16px;
    }
}

@media only screen and (max-width: 480px) {
    .spin-wheel-container {
        width: 250px;
        height: 250px;
    }
    
    .wheel-center {
        width: 50px;
        height: 50px;
    }
    
    .center-logo {
        font-size: 14px;
    }
    
    .wheel-section {
        font-size: 14px;
    }
}
