/* WooCommerce Wheel of Fortune - Premium Casino Design */

/* Overlay with dark luxurious background */
.wwf-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a0a2e 0%, #0d0015 50%, #000000 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wwf-fadeIn 0.3s ease;
    overflow: hidden;
}

/* Animated particles background */
.wwf-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,215,0,0.8), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,215,0,0.7), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255,215,0,0.6), transparent);
    background-size: 200px 200px;
    animation: wwf-sparkle 4s linear infinite;
    opacity: 0.6;
}

.wwf-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 50px 50px, rgba(255,215,0,0.9), transparent),
        radial-gradient(2px 2px at 100px 150px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 180px 100px, rgba(255,215,0,0.6), transparent),
        radial-gradient(2px 2px at 70px 180px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 120px 20px, rgba(255,215,0,0.8), transparent);
    background-size: 250px 250px;
    animation: wwf-sparkle 6s linear infinite reverse;
    opacity: 0.5;
}

@keyframes wwf-sparkle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}

@keyframes wwf-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Main popup container */
.wwf-popup {
    background: transparent;
    border-radius: 20px;
    padding: 20px 30px 40px;
    max-width: 420px;
    width: 95%;
    text-align: center;
    position: relative;
    animation: wwf-slideUp 0.5s ease;
    z-index: 1;
}

@keyframes wwf-slideUp {
    from { 
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Close button */
.wwf-close {
    position: absolute;
    top: 0;
    right: 10px;
    background: none;
    border: none;
    font-size: 32px;
    color: rgba(255, 215, 0, 0.7);
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    z-index: 10;
}

.wwf-close:hover {
    color: #FFD700;
    transform: scale(1.2);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* Title with golden glow */
.wwf-title {
    color: #FFD700;
    font-size: 36px;
    font-weight: bold;
    margin: 0 0 20px 0;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    font-family: 'Georgia', serif;
}

/* Wheel container with golden frame */
.wwf-wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto 15px;
}

/* Canvas wheel - centered dynamically via JS */
#wwf-wheel {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 15px rgba(255, 255, 255, 0.1);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Golden outer ring glow */
.wwf-wheel-frame {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #FFD700, #FFA500, #FFD700, #FFEC8B, #FFD700,
        #FFA500, #FFD700, #FFEC8B, #FFD700, #FFA500,
        #FFD700, #FFEC8B, #FFD700
    );
    animation: wwf-ring-rotate 10s linear infinite;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 165, 0, 0.4),
        inset 0 0 30px rgba(255, 215, 0, 0.3);
}

@keyframes wwf-ring-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Inner dark ring */
.wwf-wheel-frame::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 50%;
    background: #1a0a2e;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Light dots around the wheel */
.wwf-wheel-lights {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    z-index: 2;
}

/* Canvas wheel */
#wwf-wheel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 15px rgba(255, 255, 255, 0.1);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Premium golden pointer */
.wwf-pointer {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.8));
}

.wwf-pointer::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 40px solid #FFD700;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.wwf-pointer::after {
    content: '';
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 15px rgba(255, 215, 0, 0.8),
        inset 0 -3px 6px rgba(0, 0, 0, 0.3);
}

/* Golden center button - perfectly centered */
.wwf-center-cap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 50%, #B8860B 100%);
    border-radius: 50%;
    z-index: 5;
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 215, 0, 0.5),
        inset 0 3px 10px rgba(255, 255, 255, 0.5),
        inset 0 -5px 15px rgba(0, 0, 0, 0.3);
    border: 3px solid #FFEC8B;
    margin-top: 0;
    margin-left: 0;
}

.wwf-center-cap::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, transparent 50%);
    border-radius: 50%;
}

/* Wheel reflection */
.wwf-wheel-reflection {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%) scaleY(-1);
    width: 280px;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255,215,0,0.15) 0%, transparent 100%);
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.5;
    z-index: 1;
}

/* Premium spin button */
.wwf-spin-btn {
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    color: #1a0a2e;
    border: 3px solid #FFEC8B;
    padding: 16px 60px;
    font-size: 22px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 
        0 5px 30px rgba(255, 165, 0, 0.6),
        0 10px 40px rgba(255, 215, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -3px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.wwf-spin-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: wwf-btn-shine 3s infinite;
}

@keyframes wwf-btn-shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.wwf-spin-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 8px 40px rgba(255, 165, 0, 0.8),
        0 15px 50px rgba(255, 215, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.wwf-spin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.wwf-spin-btn:disabled::before {
    animation: none;
}

/* Close/No thanks button */
.wwf-close-btn {
    display: block;
    margin: 20px auto 0;
    background: transparent;
    border: none;
    color: rgba(255, 215, 0, 0.6);
    font-size: 15px;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.3s;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.wwf-close-btn:hover {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* Result section */
.wwf-result {
    animation: wwf-fadeIn 0.5s ease;
}

.wwf-win-message {
    color: #FFD700;
    font-size: 20px;
    margin-bottom: 25px;
    line-height: 1.5;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

/* Claim prize button */
.wwf-claim-btn {
    background: linear-gradient(180deg, #38ef7d 0%, #11998e 100%);
    color: white;
    border: 3px solid #7FFFD4;
    padding: 16px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 
        0 5px 30px rgba(56, 239, 125, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wwf-claim-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 8px 40px rgba(56, 239, 125, 0.7),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Sparkle animations */
.wwf-sparkle-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    animation: wwf-sparkle-float 2s ease-out forwards;
    box-shadow: 0 0 6px #FFD700, 0 0 12px #FFA500;
}

@keyframes wwf-sparkle-float {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(-100px);
    }
}

/* Confetti effect */
.wwf-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: wwf-confetti-fall 3s linear forwards;
    z-index: 1000000;
    border-radius: 2px;
}

@keyframes wwf-confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Win glow animation */
@keyframes wwf-win-glow {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 165, 0, 0.4);
    }
    50% { 
        box-shadow: 0 0 50px rgba(255, 215, 0, 0.9), 0 0 100px rgba(255, 165, 0, 0.6);
    }
}

.wwf-wheel-container.wwf-winner {
    animation: wwf-win-glow 1s ease-in-out infinite;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .wwf-popup {
        padding: 15px 15px 30px;
        width: 98%;
    }
    
    .wwf-wheel-container {
        width: 270px;
        height: 270px;
    }
    
    .wwf-wheel-frame {
        top: -12px;
        left: -12px;
        right: -12px;
        bottom: -12px;
    }
    
    .wwf-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .wwf-spin-btn {
        padding: 14px 45px;
        font-size: 18px;
    }
    
    .wwf-claim-btn {
        padding: 14px 35px;
        font-size: 16px;
    }
    
    .wwf-win-message {
        font-size: 17px;
    }
    
    .wwf-pointer::before {
        border-left: 14px solid transparent;
        border-right: 14px solid transparent;
        border-top: 32px solid #FFD700;
    }
    
    .wwf-pointer::after {
        width: 16px;
        height: 16px;
        top: -40px;
    }
    
    .wwf-center-cap {
        width: 40px;
        height: 40px;
    }
    
    .wwf-wheel-reflection {
        display: none;
    }
}

@media (max-width: 360px) {
    .wwf-popup {
        padding: 10px 10px 25px;
    }
    
    .wwf-wheel-container {
        width: 240px;
        height: 240px;
    }
    
    .wwf-title {
        font-size: 24px;
    }
    
    .wwf-spin-btn {
        padding: 12px 35px;
        font-size: 16px;
    }
    
    .wwf-claim-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .wwf-center-cap {
        width: 35px;
        height: 35px;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .wwf-popup {
        padding: 10px;
        max-height: 98vh;
        overflow-y: auto;
    }
    
    .wwf-wheel-container {
        width: 200px;
        height: 200px;
    }
    
    .wwf-title {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .wwf-spin-btn {
        padding: 10px 30px;
        font-size: 14px;
        margin-top: 10px;
    }
    
    .wwf-wheel-reflection {
        display: none;
    }
}
