/* Raffle Modal Overlay */
.raffle-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.raffle-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    padding: 40px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Close Button */
.raffle-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.raffle-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Sound Toggle */
.sound-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Headers */
.draw-title {
    text-align: center;
    color: white;
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.draw-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-bottom: 30px;
}

/* Participants Grid */
.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.participant-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.participant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: #ffd700;
}

.participant-card.winner {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    animation: pulse 1s infinite;
}

.participant-number {
    font-size: 24px;
    font-weight: bold;
    color: #764ba2;
    margin-bottom: 5px;
}

.participant-bunny {
    font-size: 14px;
    color: #333;
}

/* Draw Button */
.draw-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    padding: 18px 40px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.draw-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

.draw-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-icon {
    font-size: 24px;
    animation: bounce 1s infinite;
}

/* Spinning Wheel Container */
.drawing-wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 40px auto;
}

.wheel-outer {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    padding: 20px;
    box-shadow: 
        0 0 50px rgba(102, 126, 234, 0.5),
        inset 0 0 50px rgba(0, 0, 0, 0.3);
}

.wheel-spinner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, #fff, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.1);
}

.wheel-spinner.spinning {
    animation: spin 3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wheel-segments {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.wheel-segments::before,
.wheel-segments::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 50%;
    background: linear-gradient(45deg, transparent 40%, rgba(102, 126, 234, 0.1) 50%);
}

.wheel-segments::before {
    top: 0;
    left: 0;
}

.wheel-segments::after {
    bottom: 0;
    right: 0;
}

.current-number {
    font-size: 72px;
    font-weight: bold;
    color: #333;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    position: relative;
}

.wheel-pointer {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ffd700;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
    z-index: 20;
}

.wheel-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
    animation: glow 2s ease-in-out infinite;
    pointer-events: none;
}

.drawing-status {
    text-align: center;
    color: white;
    font-size: 20px;
    margin-top: 20px;
    animation: pulse 1s infinite;
}

/* Winner Announcement */
.winner-announcement {
    display: none;
    text-align: center;
    padding: 40px;
    position: relative;
}

.winner-announcement.show {
    display: block;
    animation: zoomIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    font-size: 30px;
    animation: fall 3s linear infinite;
}

.confetti:nth-child(1) { left: 10%; animation-delay: 0s; }
.confetti:nth-child(2) { left: 30%; animation-delay: 0.5s; }
.confetti:nth-child(3) { left: 50%; animation-delay: 1s; }
.confetti:nth-child(4) { left: 70%; animation-delay: 1.5s; }
.confetti:nth-child(5) { left: 90%; animation-delay: 2s; }

.winner-emoji {
    font-size: 100px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.winner-text {
    font-size: 48px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.5),
        0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    animation: glow 1s ease-in-out infinite;
}

.winner-bunny-name {
    font-size: 32px;
    color: white;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.prize-display {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.prize-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 15px;
}

.prize-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.prize-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prize-icon {
    font-size: 28px;
}

.continue-button {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.continue-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Scrollbar Styling */
.participants-grid::-webkit-scrollbar {
    width: 8px;
}

.participants-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.participants-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.participants-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .raffle-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .draw-title {
        font-size: 28px;
    }
    
    .drawing-wheel-container {
        width: 300px;
        height: 300px;
    }
    
    .current-number {
        font-size: 48px;
    }
    
    .winner-text {
        font-size: 36px;
    }
    
    .winner-bunny-name {
        font-size: 24px;
    }
    
    .participants-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Better spinning animation */
.wheel-spinner.spinning {
    animation: wheelSpin 3.5s cubic-bezier(0.17, 0.67, 0.4, 0.98) forwards;
}

@keyframes wheelSpin {
    0% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(360deg);
    }
    40% {
        transform: rotate(720deg);
    }
    60% {
        transform: rotate(1000deg);
    }
    80% {
        transform: rotate(1300deg);
    }
    100% {
        transform: rotate(1440deg);
    }
}

/* Make wheel look more 3D */
.wheel-outer {
    perspective: 1000px;
}

.wheel-spinner {
    transform-style: preserve-3d;
    background: radial-gradient(
        circle at 30% 30%,
        #ffffff,
        #f0f0f0 50%,
        #e0e0e0
    );
}

/* Number change effect */
.current-number {
    transition: transform 0.1s ease;
}

.current-number.changing {
    transform: scale(0.9);
}

/* Wheel pointer animation during spin */
.wheel-spinner.spinning ~ .wheel-pointer {
    animation: pointerShake 0.2s ease-in-out infinite;
}

@keyframes pointerShake {
    0%, 100% { transform: translateX(-50%) rotate(-2deg); }
    50% { transform: translateX(-50%) rotate(2deg); }
}
