/* Enhanced Spin Wheel Styles */
.mcs-spin-wheel-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.mcs-spin-wheel-container.loaded {
    opacity: 1;
    transform: translateY(0);
}

.mcs-spin-wheel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.mcs-wheel-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 40px auto;
    transition: all 0.3s ease;
}

.mcs-wheel-wrapper.spinning-glow {
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
    transform: scale(1.05);
}

.mcs-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: rotate(0deg);
    box-shadow: 
        0 0 0 8px rgba(255, 255, 255, 0.3),
        0 0 0 12px rgba(255, 255, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.3);
    background: #fff;
}

.mcs-wheel.hover-effect {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Wheel Segments */
.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    clip-path: polygon(0 0, 100% 0, 86.6% 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.segment-content {
    transform: rotate(-30deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-left: 20px;
}

.segment-icon {
    font-size: 24px;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.segment-text {
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
}

/* Center circle */
.mcs-wheel-center {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.8),
        0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcs-wheel-center::after {
    content: '🎯';
    font-size: 24px;
    animation: pulse 2s infinite;
}

/* Pointer */
.mcs-wheel-pointer {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 50px solid #ff4757;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.mcs-wheel-pointer::after {
    content: '';
    position: absolute;
    top: -45px;
    left: -20px;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ff3742;
}

/* Spin Button */
#mcsSpinButton {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

#mcsSpinButton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

#mcsSpinButton:hover::before {
    left: 100%;
}

#mcsSpinButton:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53e3e 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(238, 90, 36, 0.4);
}

#mcsSpinButton:active {
    transform: translateY(-1px);
}

#mcsSpinButton:disabled {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#mcsSpinButton.spinning {
    animation: buttonPulse 2s infinite;
    pointer-events: none;
}

/* Spinner animation for button */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Result Display */
.mcs-spin-result {
    margin-top: 30px;
    font-size: 20px;
    font-weight: bold;
    min-height: 100px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.mcs-spin-result.show {
    opacity: 1;
    transform: translateY(0);
}

.mcs-spin-result.pulse {
    animation: resultPulse 1s ease-in-out;
}

.mcs-spin-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.3);
    position: relative;
    overflow: hidden;
}

.mcs-spin-success::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.prize-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.prize-title {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
}

.prize-won {
    font-size: 20px;
    margin: 10px 0;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.prize-message {
    font-size: 14px;
    opacity: 0.9;
}

.mcs-spin-error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.error-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.error-text {
    font-size: 16px;
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confetti-fall 3s linear infinite;
    z-index: 10;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mcs-spin-wheel-container {
        margin: 20px;
        padding: 20px;
    }
    
    .mcs-wheel-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .segment-content {
        margin-left: 15px;
    }
    
    .segment-icon {
        font-size: 20px;
    }
    
    .segment-text {
        font-size: 10px;
    }
    
    #mcsSpinButton {
        padding: 12px 30px;
        font-size: 16px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .mcs-wheel-wrapper {
        width: 240px;
        height: 240px;
    }
    
    .segment-icon {
        font-size: 16px;
    }
    
    .segment-text {
        font-size: 8px;
    }
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes buttonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes resultPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Loading Animation */
.mcs-spin-wheel-container:not(.loaded) {
    background: #f8f9fa;
}

.mcs-spin-wheel-container:not(.loaded)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}