/* Styles for the spinning wheel */
.spinner {
    width: 300px;
    height: 300px;
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    animation: spin 2s linear infinite;
    position: relative;
    margin: 20px auto;
}

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

/* Styles for the winner display */
.winner-display {
    font-size: 24px;
    text-align: center;
    margin-top: 20px;
    color: #2ecc71; /* Green */
}

/* Styles for the spin button */
.spin-button {
    display: block;
    width: 150px;
    padding: 10px;
    margin: 20px auto;
    background-color: #3498db; /* Blue */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

.spin-button:hover {
    background-color: #2980b9; /* Darker blue */
}

/* Celebration animation styles */
.celebration {
    display: none;
    font-size: 30px;
    text-align: center;
    color: #e74c3c; /* Red */
    animation: celebrate 1s ease-in-out forwards;
}

@keyframes celebrate {
    0% { transform: scale(1); opacity: 0; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.name-spinner-wrapper {
    text-align: center;
    margin: 20px auto;
}

#spinner-wheel {
    position: relative;
    margin: 0 auto;
    border: 10px solid #f3f3f3;
    border-radius: 50%;
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    background: #ffffff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#spinner-wheel.spinning {
    pointer-events: none;
}

.segment-label {
    position: absolute;
    font-size: 14px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    font-weight: bold;
    pointer-events: none;
    text-align: center;
    transform-origin: center;
}

#spin-button {
    margin: 20px auto;
    padding: 12px 30px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#spin-button:hover {
    background-color: #45a049;
}

#spin-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#winner-display {
    margin-top: 20px;
    padding: 15px;
    font-size: 24px;
    color: #333;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#winner-display h2 {
    margin: 0;
    color: #2c3e50;
}

#winner-name {
    color: #4CAF50;
    font-weight: bold;
}

/* Animation for spinning */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Celebration Effects */
.winner-message {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    z-index: 999999 !important;
    text-align: center;
    pointer-events: none;
}

.winner-text {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.congrats {
    display: block;
    color: #FFD700 !important;
    font-size: 32px !important;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.4 !important;
}

.winner-name {
    display: block;
    color: #fff !important;
    font-size: 48px !important;
    font-weight: bold !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    line-height: 1.4 !important;
}

.fireworks-container,
.explosion,
.confetti-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 999998 !important;
}

.firework {
    position: absolute !important;
    width: 6px !important;
    height: 6px !important;
    background: #FFD700 !important;
    border-radius: 50% !important;
}

.particle {
    position: absolute !important;
    width: 4px !important;
    height: 4px !important;
    border-radius: 50% !important;
    transform-origin: center !important;
}

.confetti {
    position: absolute !important;
    width: 10px !important;
    height: 20px !important;
    opacity: 0.7;
}

.confetti:nth-child(3n) {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
}

.confetti:nth-child(3n + 1) {
    width: 12px !important;
    height: 12px !important;
    border-radius: 2px !important;
}

.confetti:nth-child(3n + 2) {
    width: 6px !important;
    height: 18px !important;
    border-radius: 1px !important;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
    }
}

.confetti {
    animation: confettiFall 6s linear forwards;
}

.fade-out {
    animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Make sure animations are visible over WordPress content */
.winner-message,
.fireworks-container,
.explosion,
.confetti-container {
    position: fixed !important;
    z-index: 999999 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #spinner-wheel {
        width: 300px !important;
        height: 300px !important;
    }
    
    .segment-label {
        font-size: 12px;
    }
}