/* Estilos para el sistema de realizar sorteos */

/* === CONTAINER PRINCIPAL === */
#sorteos-realizar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === FASES === */
.sorteo-fase {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.sorteo-fase.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === HEADERS DE FASE === */
.fase-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.fase-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 700;
}

.fase-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* === BOTONES === */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* === LOADING SPINNER === */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === GRID DE SORTEOS === */
.sorteos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sorteo-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.sorteo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.sorteo-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.sorteo-card h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 1.4em;
}

.sorteo-card p {
    margin: 8px 0;
    color: #666;
    line-height: 1.5;
}

.sorteo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-item .number {
    display: block;
    font-size: 1.2em;
    font-weight: 700;
    color: #667eea;
}

.stat-item .label {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin: 12px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* === PARTICIPANTES === */
.participantes-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.stat-card h3 {
    margin: 0 0 8px 0;
    font-size: 2.2em;
    font-weight: 700;
    color: #667eea;
}

.stat-card p {
    margin: 0;
    color: #666;
    font-weight: 500;
}

/* === TABLA DE PARTICIPANTES === */
.table-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.table-controls input,
.table-controls select {
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.table-controls input:focus,
.table-controls select:focus {
    outline: none;
    border-color: #667eea;
}

.table-controls input {
    flex: 1;
    min-width: 250px;
}

.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sorteos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sorteos-table th {
    background: #667eea;
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    border: none;
}

.sorteos-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.sorteos-table tbody tr:hover {
    background: #f8f9fa;
}

.sorteos-table tbody tr:last-child td {
    border-bottom: none;
}

/* === FASE ACTIONS === */
.fase-actions {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
}

/* === NO RESULTS === */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results p {
    font-size: 1.1em;
    margin: 0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #sorteos-realizar-container {
        padding: 15px;
    }
    
    .sorteos-grid {
        grid-template-columns: 1fr;
    }
    
    .participantes-stats {
        grid-template-columns: 1fr;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-controls input {
        min-width: auto;
    }
    
    .fase-header h2 {
        font-size: 1.8em;
    }
    
    .sorteo-stats {
        grid-template-columns: 1fr;
    }
}

/* === ANIMACIONES ESPECÍFICAS === */
.sorteo-card {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === TAGS Y BADGES === */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-activo {
    background: #d4edda;
    color: #155724;
}

.status-finalizado {
    background: #d1ecf1;
    color: #0c5460;
}

/* === TICKETS NUMBERS === */
.ticket-numbers {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #667eea;
    font-weight: 600;
}

/* === UTILITIES === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }

/* === CONFIGURACIÓN DEL SORTEO === */
.config-section {
    max-width: 800px;
    margin: 0 auto;
}

.config-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #667eea;
}

.config-card h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 1.5em;
    text-align: center;
}

.config-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.config-row label {
    font-weight: 600;
    color: #333;
    min-width: 180px;
}

.config-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.config-input:focus {
    outline: none;
    border-color: #667eea;
}

.config-row small {
    color: #666;
    font-size: 12px;
    margin-left: 10px;
}

/* === PREMIOS === */
.premios-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.premios-section h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.premio-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.premio-posicion {
    font-weight: 600;
    color: #667eea;
    min-width: 100px;
}

.premio-descripcion {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.config-actions {
    margin-top: 30px;
    text-align: center;
}

/* === EFECTOS DE CONFETI === */
#confeti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confeti-particula {
    position: absolute;
    opacity: 0.9;
}

@keyframes confeti-fall {
    0% {
        transform: translateY(-20px) translateX(var(--start-x)) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(var(--end-y)) translateX(var(--end-x)) rotate(720deg);
        opacity: 0;
    }
}

/* Efectos adicionales para ganadores */
.ganador-celebration {
    animation: celebration-pulse 0.8s ease-in-out;
}

.ganador-badge {
    position: absolute;
    right: -10px;
    top: -10px;
    font-size: 20px;
    animation: badge-bounce 1s ease-in-out infinite;
}

.winner-champion {
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700) !important;
    animation: champion-glow 2s ease-in-out infinite;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

@keyframes celebration-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes badge-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes champion-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 0 50px rgba(255, 215, 0, 0.9); }
}

/* === RULETA PROGRESIVA === */
.sorteo-progress {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
}

.giro-actual, .premio-actual {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 5px;
}

/* Efecto de giro destacado */
.girando-highlight {
    box-shadow: 0 0 30px #ff4757, 0 0 60px #ff4757 !important;
    animation: pulseGlow 0.3s ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 30px #ff4757; }
    50% { box-shadow: 0 0 50px #ff4757, 0 0 80px #ff4757; }
}

/* === TABLA DE GANADORES EN VIVO === */
.ganadores-live-container {
    margin-top: 30px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ganadores-live-container h4 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.ganadores-live-table {
    width: 100%;
}

.ganadores-header {
    display: grid;
    grid-template-columns: 80px 1fr 100px 1fr;
    gap: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
}

.ganador-live-item {
    display: grid;
    grid-template-columns: 80px 1fr 100px 1fr;
    gap: 15px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.ganador-live-item.ganador-reveal {
    animation: slideInFromRight 0.6s ease-out;
}

.ganador-live-item[data-posicion="1"] {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    color: #333;
}

.ganador-live-item[data-posicion="2"] {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    border-color: #c0c0c0;
    color: #333;
}

.ganador-live-item[data-posicion="3"] {
    background: linear-gradient(135deg, #cd7f32, #daa55a);
    border-color: #cd7f32;
    color: white;
}

.live-posicion {
    font-weight: bold;
    font-size: 16px;
    text-align: center;
}

.live-premio {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-numero {
    font-weight: bold;
    text-align: center;
    background: rgba(0,0,0,0.1);
    padding: 5px;
    border-radius: 4px;
}

.live-participante {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === SORTEO FINALIZADO === */
.sorteo-finalizado {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #56ab2f, #a8e6cf);
    border-radius: 10px;
    color: white;
}

.sorteo-finalizado h3 {
    margin-bottom: 10px;
    font-size: 24px;
}

.sorteo-finalizado p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.sorteo-finalizado .btn {
    margin: 0 10px;
}

/* === RULETA WHEEL ===*/
.ruleta-container {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    margin: 30px auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    max-width: 800px;
}

.ruleta-wheel {
    width: 600px;
    height: 600px;
    margin: 0 auto 30px;
    border-radius: 50%;
    border: 12px solid #333;
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.23, 1, 0.32, 1);
    background: #f0f0f0;
    transform-origin: center center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Ruleta simplificada más grande */
.ruleta-wheel.simplificada {
    width: 800px;
    height: 800px;
    border: 15px solid #333;
}

.ruleta-wheel svg {
    width: 100%;
    height: 100%;
    transform-origin: center center;
}

/* CSS para secciones SVG de la ruleta */
.ruleta-wheel svg path {
    cursor: pointer;
}

.ruleta-wheel svg path:hover {
    opacity: 0.8;
}

/* CSS legacy para secciones div (no usado con SVG)
.ruleta-section {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 100px;
    transform-origin: 0 0;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.ruleta-section .numero-ticket {
    position: absolute;
    top: 10px;
    left: 50px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    transform: rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
    font-size: inherit;
}
*/

.ruleta-section .numero-ticket {
    position: absolute;
    top: 10px;
    left: 50px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    transform: rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
    font-size: inherit;
}

.ruleta-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ff4757;
    z-index: 10;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
}

.ruleta-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 3px solid white;
}

/* === CUENTA REGRESIVA === */
.cuenta-regresiva-container {
    text-align: center;
    padding: 40px;
}

.countdown-display {
    font-size: 4em;
    font-weight: 700;
    color: #667eea;
    margin: 30px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.countdown-message {
    font-size: 1.2em;
    margin: 20px 0;
    color: #333;
}

.tickets-display {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.ticket-item {
    display: inline-block;
    margin: 3px;
    padding: 8px 12px;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

/* === RESULTADOS === */
.resultados-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #28a745;
    text-align: center;
}

.resultados-card h3 {
    color: #28a745;
    margin: 0 0 25px 0;
    font-size: 2em;
}

.ganador-item {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid #f39c12;
}

.ganador-item.primer-lugar {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #f39c12;
}

.ganador-item.segundo-lugar {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    border-color: #95a5a6;
}

.ganador-item.tercer-lugar {
    background: linear-gradient(135deg, #cd7f32, #d4a574);
    border-color: #b8860b;
}

.ganador-posicion {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.ganador-numero {
    font-size: 2em;
    font-weight: 700;
    color: #667eea;
    margin: 10px 0;
}

.ganador-participante {
    font-size: 1.1em;
    color: #333;
    margin: 5px 0;
}

.ganador-premio {
    font-size: 1em;
    color: #666;
    font-style: italic;
}

.resultados-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* === ANIMACIONES === */
@keyframes spin-wheel {
    from { transform: rotate(0deg); }
    to { transform: rotate(1800deg); }
}

.ruleta-spinning {
    animation: spin-wheel 4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.countdown-pulse {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes winner-reveal {
    0% { transform: scale(0) rotate(180deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(-10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.ganador-reveal {
    animation: winner-reveal 0.8s ease-out;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .config-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .config-row label {
        min-width: auto;
    }
    
    .ruleta-wheel {
        width: 300px;
        height: 300px;
    }
    
    .countdown-display {
        font-size: 3em;
    }
    
    .resultados-actions {
        flex-direction: column;
    }
    
    .premio-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .premio-posicion {
        min-width: auto;
    }
}

/* === INFORMACIÓN DEL SORTEO SELECCIONADO === */
#sorteo-seleccionado-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    margin: 0 20px;
}

#sorteo-seleccionado-info span {
    font-weight: 700;
}

/* === HOVER EFFECTS === */
.sorteo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    pointer-events: none;
}

.sorteo-card:hover::before {
    opacity: 1;
}

.sorteo-card {
    position: relative;
    overflow: hidden;
}

/* === CONFETI ESPECIAL PARA PREMIO MAYOR === */
.confeti-especial {
    width: 12px !important;
    height: 12px !important;
    animation: confeti-especial-fall 4s linear infinite;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

@keyframes confeti-especial-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg) scale(1);
        opacity: 1;
    }
    10% {
        transform: translateY(-90vh) rotate(36deg) scale(1.2);
    }
    20% {
        transform: translateY(-80vh) rotate(72deg) scale(1);
    }
    30% {
        transform: translateY(-70vh) rotate(108deg) scale(1.3);
    }
    100% {
        transform: translateY(100vh) rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

/* === EFECTOS ESPECIALES PARA GANADORES === */
.winner-champion {
    background: linear-gradient(45deg, #FFD700, #FFA500) !important;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    animation: champion-glow 2s ease-in-out infinite alternate;
}

@keyframes champion-glow {
    0% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
    100% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 1);
    }
}

/* === BADGES PARA DIFERENTES POSICIONES === */
.ganador-badge {
    font-size: 1.5em;
    margin-left: 10px;
}

.ganador-live-item[data-posicion="1"] {
    border-left: 5px solid #FFD700;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    color: #1a1a1a;
    font-weight: bold;
}

.ganador-live-item[data-posicion="2"] {
    border-left: 5px solid #8C8C8C;
    background: linear-gradient(90deg, rgba(140, 140, 140, 0.25), rgba(140, 140, 140, 0.08));
    color: #1a1a1a;
    font-weight: 600;
}

.ganador-live-item[data-posicion="3"] {
    border-left: 5px solid #CD7F32;
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.3), rgba(205, 127, 50, 0.1));
    color: #1a1a1a;
    font-weight: 600;
}

/* === HEADER DE GANADORES Y BOTÓN IMPRIMIR === */
.ganadores-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ganadores-header-section h4 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

#btn-imprimir-resultados {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

#btn-imprimir-resultados:hover {
    background: linear-gradient(135deg, #357abd, #2968a3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

/* === ESTILOS PARA IMPRESIÓN === */
@media print {
    body * {
        visibility: hidden;
    }
    
    .ganadores-live-container,
    .ganadores-live-container * {
        visibility: visible;
    }
    
    .ganadores-live-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        color: black;
        padding: 20px;
    }
    
    #btn-imprimir-resultados {
        display: none !important;
    }
    
    .ganadores-live-item {
        background: white !important;
        border: 1px solid #ddd;
        color: black !important;
        page-break-inside: avoid;
    }
    
    .ganadores-live-item[data-posicion="1"] {
        background: #fff9e6 !important;
        border-color: #FFD700 !important;
    }
    
    .ganadores-live-item[data-posicion="2"] {
        background: #f5f5f5 !important;
        border-color: #8C8C8C !important;
        color: #1a1a1a !important;
    }
    
    .ganadores-live-item[data-posicion="3"] {
        background: #fff2e6 !important;
        border-color: #CD7F32 !important;
        color: #1a1a1a !important;
    }
}

/* === ESTILOS PARA SORTEO FINALIZADO === */
.sorteo-finalizado {
    background: linear-gradient(135deg, #ff9a8b, #f4a09c);
    border: 2px solid #ff6b6b;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    animation: sorteo-complete-glow 2s ease-in-out infinite alternate;
}

.sorteo-finalizado h3 {
    color: #ffffff;
    font-size: 2em;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.sorteo-finalizado p {
    color: #ffffff;
    font-size: 1.2em;
    margin: 0 0 25px 0;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* === BOTÓN SALMÓN === */
.btn-salmon {
    background: linear-gradient(135deg, #fa8072, #e55039);
    color: white;
    border: 2px solid #fa8072;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(250, 128, 114, 0.4);
}

.btn-salmon:hover {
    background: linear-gradient(135deg, #e55039, #c44536);
    border-color: #e55039;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 128, 114, 0.6);
    color: white;
}

.btn-salmon:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(250, 128, 114, 0.4);
}

/* === RESPONSIVIDAD PARA RULETA === */
@media (max-width: 1024px) {
    .ruleta-container {
        padding: 15px;
        margin: 15px auto;
        max-width: 95%;
    }
    
    .ruleta-wheel {
        width: 500px;
        height: 500px;
        border: 10px solid #333;
    }
    
    .ruleta-wheel.simplificada {
        width: 600px;
        height: 600px;
        border: 12px solid #333;
    }
}

@media (max-width: 768px) {
    .ruleta-container {
        padding: 15px;
        margin: 15px auto;
        max-width: 95%;
    }
    
    .ruleta-wheel {
        width: 350px;
        height: 350px;
        border: 8px solid #333;
    }
    
    .ruleta-wheel.simplificada {
        width: 450px;
        height: 450px;
        border: 10px solid #333;
    }
    
    .ruleta-center {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }
    
    .ruleta-pointer {
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-top: 30px solid #ff4757;
    }
}

@media (max-width: 480px) {
    .ruleta-wheel {
        width: 280px;
        height: 280px;
        border: 6px solid #333;
    }
    
    .ruleta-wheel.simplificada {
        width: 320px;
        height: 320px;
        border: 8px solid #333;
    }
    
    .ruleta-center {
        width: 50px;
        height: 50px;
        font-size: 10px;
    }
}

/* === MODAL DEL GANADOR === */
.modal-ganador-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-ganador-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-ganador-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7) translateY(-50px);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 3px solid #fff;
}

.modal-ganador-overlay.show .modal-ganador-content {
    transform: scale(1) translateY(0);
}

.modal-ganador-header {
    text-align: center;
    padding: 30px 20px 20px;
    color: white;
    position: relative;
}

.modal-ganador-header h2 {
    font-size: 2.2em;
    margin: 10px 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce 1s ease-in-out;
}

.modal-ganador-confetti {
    font-size: 3em;
    display: inline-block;
    animation: rotate 2s linear infinite;
    margin: 0 20px;
}

.modal-ganador-body {
    background: white;
    padding: 30px;
    text-align: center;
}

.ganador-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
}

.ganador-inicial {
    font-size: 3em;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.ganador-info {
    margin-bottom: 20px;
}

.ganador-nombre {
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.ganador-ticket {
    font-size: 1.2em;
    color: #666;
    margin: 0 0 20px 0;
    font-weight: 500;
}

.ganador-premio {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #e17055;
}

.premio-posicion {
    display: block;
    font-size: 1.1em;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 5px;
}

.premio-nombre {
    display: block;
    font-size: 1.3em;
    font-weight: 600;
    color: #2d3436;
}

.modal-ganador-footer {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    text-align: center;
}

.btn-continuar {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.btn-continuar:hover {
    background: linear-gradient(135deg, #00a085, #008f75);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.6);
}

/* === CONFETTI ANIMADO === */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    top: -10px;
    z-index: 10000;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-20px,0);
    }
    70% {
        transform: translate3d(0,-10px,0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* === INFORMACIÓN FLOTANTE DEL GANADOR === */
.info-ganador-flotante {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    z-index: 100;
    animation: slideInRight 0.5s ease-out;
    min-width: 200px;
}

.info-ganador-flotante .info-content h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    text-align: center;
}

.info-ganador-flotante .numero-ganador {
    font-size: 2em;
    font-weight: 700;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.info-ganador-flotante p {
    margin: 5px 0;
    font-size: 0.9em;
    text-align: center;
    opacity: 0.9;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === INFORMACIÓN DEL MODO DE RULETA === */
.modo-ruleta-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin: 20px auto;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.modo-badge {
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modo-ruleta-info p {
    margin: 8px 0;
    font-size: 0.95em;
    opacity: 0.95;
}

.modo-ruleta-info strong {
    color: #ffeaa7;
}

/* === TOOLTIPS DE RULETA === */
.ruleta-tooltip {
    position: absolute;
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    font-size: 14px;
    max-width: 250px;
    pointer-events: none;
    border: 2px solid #ddd;
}

.tooltip-header {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.tooltip-header strong {
    color: #74b9ff;
    font-size: 16px;
}

.tooltip-nombre {
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffeaa7;
}

.tooltip-email {
    font-size: 12px;
    opacity: 0.9;
    color: #ddd;
}

/* Efecto hover en secciones de ruleta */
.ruleta-section-hover {
    cursor: pointer;
    transition: all 0.2s ease;
}

.ruleta-section-hover:hover {
    opacity: 1 !important;
    stroke-width: 3 !important;
    stroke: white !important;
}

/* === ANIMACIÓN DE BRILLO PARA SORTEO COMPLETADO === */
@keyframes sorteo-complete-glow {
    0% {
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    }
    100% {
        box-shadow: 0 12px 35px rgba(255, 107, 107, 0.5);
    }
}