/* Spin Wheel Popup Styles */

/* Floating Button */
.spin-wheel-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #ff6b6b, #ee5a24);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.spin-wheel-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.6);
}

.spin-wheel-floating-btn i {
    font-size: 28px;
    color: white;
    animation: bounce 1s infinite alternate;
}

@keyframes pulse {
    0% { box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(238, 90, 36, 0.6); }
    100% { box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4); }
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* Modal Styles */
#spinWheelModal .modal-dialog {
    max-width: 800px;
}

#spinWheelModal .modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

#spinWheelModal .modal-header {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 20px 30px;
}

#spinWheelModal .modal-title {
    color: white;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#spinWheelModal .btn-close {
    background-color: white;
    opacity: 0.8;
    border-radius: 50%;
    padding: 8px;
}

/* Wheel Container */
.spin-wheel-container {
    display: flex;
    gap: 30px;
    padding: 20px;
    align-items: center;
}

.wheel-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.3));
}

/* Wheel Pointer */
.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ff6b6b;
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.wheel-pointer::after {
    content: '';
    position: absolute;
    top: -45px;
    left: -10px;
    width: 20px;
    height: 20px;
    background: #ff6b6b;
    border-radius: 50%;
}

/* Spin Button */
.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f39c12, #e67e22);
    border: 5px solid white;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 5;
}

.spin-button:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.spin-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Wheel Info */
.wheel-info {
    flex: 1;
    color: white;
    padding: 20px;
}

.wheel-description {
    font-size: 18px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.attempts-info .alert {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

/* Result Modal */
#spinResultModal .modal-content {
    background: white;
    border-radius: 20px;
    overflow: hidden;
}

.prize-result {
    padding: 30px;
}

.prize-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: zoomIn 0.5s ease;
}

.prize-title {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.prize-name {
    font-size: 24px;
    color: #666;
    margin-bottom: 20px;
}

.discount-code {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
    margin: 20px 0;
}

.discount-code:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.discount-code:hover::after {
    content: "Click to copy";
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
}

.code-expiry {
    color: #e74c3c;
    font-size: 16px;
    margin-top: 10px;
}

/* Animations */
@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Celebration Effect */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

/* Responsive */
@media (max-width: 768px) {
    .spin-wheel-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .spin-wheel-floating-btn i {
        font-size: 24px;
    }
    
    .spin-wheel-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .wheel-wrapper {
        width: 300px;
        height: 300px;
    }
    
    .spin-button {
        width: 80px;
        height: 80px;
        font-size: 14px;
    }
    
    #spinWheelModal .modal-title {
        font-size: 22px;
    }
    
    .wheel-description {
        font-size: 16px;
        text-align: center;
    }
}

/* RTL Support */
[dir="rtl"] .spin-wheel-floating-btn {
    right: auto;
    left: 30px;
}

[dir="rtl"] .wheel-pointer {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}