#raffle-winner-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.raffle-controls h3 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.raffle-controls h4 {
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 500;
}

/* Message System */
.raffle-message {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.raffle-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.raffle-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Number Range Section */
.number-range-section, .woo-raffle-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.woo-raffle-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.woo-raffle-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #495057;
}

.woo-raffle-controls select {
    min-width: 250px;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.woo-raffle-controls select:focus {
    outline: none;
    border-color: #00447b;
    box-shadow: 0 0 0 3px rgba(0, 68, 123, 0.1);
}

.woo-raffle-controls button {
    background: linear-gradient(135deg, #00447b 0%, #003560 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.woo-raffle-controls button:hover {
    background: linear-gradient(135deg, #003560 0%, #002a4a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.raffle-info-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #00447b;
}

.raffle-info-display .info-item {
    margin-bottom: 8px;
    font-size: 14px;
}

.raffle-info-display .info-item:last-child {
    margin-bottom: 0;
}

.raffle-info-display strong {
    color: #2c3e50;
    margin-right: 10px;
}

/* Winners Section */
.winners-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.winners-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.winner-card {
    background: linear-gradient(135deg, #fff5cd 0%, #ffecb3 100%);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.winner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.winner-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.winner-ticket {
    font-size: 18px;
    font-weight: bold;
    color: #e65100;
}

.winner-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.winner-email {
    font-size: 14px;
    color: #6c757d;
}

.winner-actions {
    display: flex;
    gap: 10px;
}

.winner-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.copy-email {
    background: #28a745;
    color: white;
}

.copy-email:hover {
    background: #218838;
}

.view-order {
    background: #6c757d;
    color: white;
}

.view-order:hover {
    background: #5a6268;
}

/* Number Range Section */
.number-range-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.number-range-section label {
    display: inline-block;
    margin-right: 25px;
    margin-bottom: 15px;
    font-weight: 500;
    color: #495057;
}

.number-range-section input {
    width: 100px;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    margin-left: 10px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.number-range-section input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Prize Section */
.prize-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.prize-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.prize-row input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.prize-row input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.remove-prize {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.remove-prize:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.remove-prize:active {
    transform: scale(0.95);
}

/* Draw Controls */
.draw-controls {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.draw-controls label {
    display: inline-block;
    margin-right: 25px;
    margin-bottom: 20px;
    font-weight: 500;
    color: #495057;
}

.draw-controls input {
    width: 100px;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    margin-left: 10px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.draw-controls input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.draw-controls button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.draw-controls button:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.draw-controls button:active {
    transform: translateY(0);
}

.draw-controls button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Undo Button Styling */
.undo-button {
    background: #fd7e14 !important;
    color: white !important;
}

.undo-button:hover {
    background: #e8590c !important;
}

/* Prize Winner Cards */
.winner-card.prize-winner {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.winner-prize {
    font-weight: 600;
    color: #856404;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 8px;
    border: 1px solid #ffeaa7;
}

/* Enhanced Prize Assignment Layout */
.prize-assignment {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #dee2e6;
    border-left: 4px solid #00447b;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.prize-assignment:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.assignment-info {
    flex: 1;
}

.prize-name {
    font-size: 16px;
    font-weight: 600;
    color: #00447b;
    margin-bottom: 8px;
}

.winner-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ticket-number {
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.customer-name {
    font-weight: 500;
    color: #212529;
}

.customer-email {
    color: #6c757d;
    font-size: 14px;
}

.assignment-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.assignment-actions button {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 90px;
    margin: 0;
}

/* Responsive Design for Prize Assignments */
@media (max-width: 768px) {
    .prize-assignment {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .assignment-actions {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    
    .assignment-actions button {
        min-width: 80px;
        font-size: 11px;
    }
    
    .winner-details {
        text-align: center;
    }
}

#assign-prizes {
    background: #9b59b6;
}

#assign-prizes:hover {
    background: #8e44ad;
    box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3);
}

#reset-all {
    background: #e74c3c;
}

#reset-all:hover {
    background: #c0392b;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

#add-prize, #set-range {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

#add-prize:hover, #set-range:hover {
    background: #229954;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

#add-prize:active, #set-range:active {
    transform: translateY(0);
}

/* Available Numbers Section */
.available-numbers-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 10px;
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid #e9ecef;
    padding: 20px;
    border-radius: 8px;
    background: #f8f9fa;
}

.numbers-grid::-webkit-scrollbar {
    width: 8px;
}

.numbers-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.numbers-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.numbers-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.available-number {
    background: linear-gradient(135deg, #ecf0f1 0%, #d5dbdb 100%);
    border: 2px solid #bdc3c7;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    cursor: grab;
    font-weight: 700;
    color: #2c3e50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    font-size: 14px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.available-number:hover {
    background: linear-gradient(135deg, #d5dbdb 0%, #bdc3c7 100%);
    border-color: #95a5a6;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
}

.available-number:active {
    cursor: grabbing;
    transform: translateY(0) scale(1.02);
}

.available-number.dragging {
    opacity: 0.6;
    transform: rotate(5deg) scale(1.1);
    z-index: 1000;
}

/* Drawn Numbers Section */
.drawn-numbers-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.drawn-list {
    min-height: 80px;
    border: 3px dashed #3498db;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
    transition: all 0.3s;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.drawn-list.drag-over {
    border-color: #2ecc71;
    background: #e8f8f5;
    transform: scale(1.02);
}

.drawn-number {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 10px 15px;
    margin: 3px;
    border-radius: 8px;
    font-weight: 700;
    position: relative;
    animation: fadeInScale 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    transition: all 0.2s;
}

.drawn-number:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.drawn-number .number {
    margin-right: 10px;
    font-size: 16px;
}

.drawn-number .return-number {
    background: rgba(255,255,255,0.25);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
}

.drawn-number .return-number:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

.highlight-draw {
    animation: highlightDraw 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes highlightDraw {
    0% { 
        background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
        transform: scale(1.2); 
        box-shadow: 0 0 20px rgba(241, 196, 15, 0.8);
    }
    50% { 
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
        transform: scale(1.1);
    }
    100% { 
        background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    }
}

/* Prize Assignments Section */
.prize-assignments-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.prize-assignment {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 18px 20px;
    margin: 12px 0;
    border-radius: 10px;
    font-weight: 600;
    position: relative;
    animation: fadeInScale 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 3px 10px rgba(155, 89, 182, 0.3);
    transition: all 0.2s;
}

.prize-assignment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

.prize-assignment .prize {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
}

.prize-assignment .assigned-number {
    background: rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 6px;
    margin-right: 12px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.1);
}

.prize-assignment .return-number {
    background: rgba(255,255,255,0.25);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
    flex-shrink: 0;
}

.prize-assignment .return-number:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

.highlight-assignment {
    animation: highlightAssignment 2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes highlightAssignment {
    0% { 
        background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(241, 196, 15, 0.8);
    }
    50% { 
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
        transform: scale(1.02);
    }
    100% { 
        background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(155, 89, 182, 0.3);
    }
}

@keyframes fadeInScale {
    from { 
        opacity: 0; 
        transform: translateY(-15px) scale(0.8); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Loading States */
.loading {
    position: relative;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    border-radius: 10px;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1001;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.drawn-list:empty::after {
    content: 'Drawn numbers will appear here. You can also drag numbers from the available pool.';
    color: #7f8c8d;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    text-align: center;
    line-height: 1.5;
}

#prize-assignments:empty::after {
    content: 'Prize assignments will appear here after using "Assign to Prizes".';
    color: #7f8c8d;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 25px;
    text-align: center;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    #raffle-winner-container {
        margin: 10px;
        padding: 15px;
    }
    
    .raffle-controls h3 {
        font-size: 24px;
    }
    
    .numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 8px;
        padding: 15px;
    }
    
    .available-number {
        padding: 10px;
        font-size: 12px;
    }
    
    .draw-controls button {
        width: 100%;
        margin-bottom: 12px;
        margin-right: 0;
    }
    
    .number-range-section label {
        display: block;
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .number-range-section input {
        width: 120px;
    }
    
    .prize-assignment {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .prize-assignment .assigned-number {
        margin-right: 0;
        align-self: flex-end;
    }
    
    .drawn-list {
        padding: 15px;
    }
    
    .drawn-number {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 6px;
        max-height: 250px;
    }
    
    .available-number {
        padding: 8px;
        font-size: 11px;
    }
    
    .draw-controls input {
        width: 80px;
    }
    
    .number-range-section input {
        width: 100px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .available-number {
        border-width: 3px;
    }
    
    .drawn-number, .prize-assignment {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}