/* 🎡 Wrapper */
#lswof-wrapper {
    width: 100%;
    max-width: auto;
    margin: 40px auto;
    padding-bottom: 100px;
    max-height: 500px;
    position: relative;
}

/* 🌀 Wheel Canvas */
#lswof-canvas {
    width: 100%;    
    height: auto;
    display: block;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#lswof-canvas:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Small screens (phones) */
@media (min-width: 370px) and (max-width: 520px) {
    #lswof-center-logo {
        max-width: 60px;
        max-height: 60px;
    }

    #lswof-wrapper {
        padding-bottom: 60px;
        max-height: 430px;
    }
}

@media (min-width:420px) and (max-width: 450px){
    #lswof-center-logo {
        max-width: 60px;
        max-height: 60px;
    }

    #lswof-wrapper {
        padding-bottom: 60px;
        max-height: 360px;
        max-width: 100vw;
    }
}

@media (min-width:470px) and (max-width: 500px){
    #lswof-center-logo {
        max-width: 60px;
        max-height: 60px;
    }

    #lswof-wrapper {
        padding-bottom: 60px;
        max-height: 400px;
    }
}

@media (min-width: 350px) and (max-width: 377px) {
    #lswof-wrapper {
        padding-bottom: 80px;
        max-height: 280px;
    }
    #lswof-center-logo {
        max-width: 50px;
        max-height: 50px;
    }
}
 
@media screen and (max-width: 340px) {
    #lswof-wrapper {
        padding-bottom: 80px;
        max-height: 240px;
        width: 100%;
    }
    #lswof-center-logo {
        max-width: 25px;
        max-height: 25px;
    }
}

/* 🖼️ Center Logo */
#lswof-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
    pointer-events: none;
    z-index: 9;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* 🔘 Spin Button */
#lswof-spin-btn {
    display: block;
    margin: 20px auto 10px auto;
    padding: 15px 50px;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b6b, #940e01);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(148, 14, 1, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#lswof-spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(148, 14, 1, 0.6);
    background: linear-gradient(135deg, #ff5252, #b71c1c);
}

#lswof-spin-btn:active {
    transform: translateY(0);
}

#lswof-spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 🧾 Result Text */
#lswof-result-message {
    margin-top: 15px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    color: #333;
}

/* 🎊 Enhanced Confetti */
.confetti {
    position: fixed;
    width: 12px;
    height: 12px;
    background: hsl(var(--hue), 100%, 50%);
    top: -10px;
    animation: confetti-fall linear forwards;
    z-index: 9999;
    border-radius: 50%;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 😢 Sad Animation */
.sad-effect {
    position: fixed;
    font-size: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    animation: pop-sad 1.5s ease-out forwards;
    opacity: 0;
    z-index: 999;
}

@keyframes pop-sad {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* 🎉 WIN OVERLAY */
.lswof-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lswof-overlay.show {
    opacity: 1;
    visibility: visible;
}

.lswof-popup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.5) rotate(-10deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.lswof-overlay.show .lswof-popup {
    transform: scale(1) rotate(0deg);
}

/* WIN Popup */
.lswof-popup.win {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #ffd700;
}

.lswof-popup.win::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* LOSE Popup */
.lswof-popup.lose {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: 3px solid #ff4757;
}

.lswof-popup-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.lswof-popup-title {
    font-size: 28px;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.lswof-popup-message {
    font-size: 18px;
    color: white;
    margin-bottom: 20px;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.lswof-popup-prize {
    background: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.lswof-popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.lswof-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lswof-btn-primary {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.lswof-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.lswof-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.lswof-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Floating particles for win effect */
.lswof-floating-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

.lswof-floating-particle:nth-child(odd) {
    background: #ff6b81;
    animation-delay: 0.5s;
}

.lswof-floating-particle:nth-child(3n) {
    background: #74c0fc;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.7; }
}

/* Responsive popup */
@media (max-width: 480px) {
    .lswof-popup {
        padding: 30px 20px;
        width: 95%;
    }
    
    .lswof-popup-title {
        font-size: 24px;
    }
    
    .lswof-popup-message {
        font-size: 16px;
    }
    
    .lswof-popup-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .lswof-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Pulse effect for spin button when ready */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.lswof-pulse {
    animation: pulse 2s ease-in-out infinite;
}