/*
 * Estilos para tabla de participantes y panel de ganador
 * Estilo ZapMind - Paleta de colores consistente
 */

/* ============================================
   TABLA DE PARTICIPANTES
   ============================================ */

.tabla-concurso-container {
    margin: 40px auto;
    max-width: 900px;
    background: #fcf4e3;
    border: 2px solid #d4b98a;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.2);
}

.tabla-concurso-header {
    text-align: center;
    margin-bottom: 25px;
}

.tabla-concurso-header h2 {
    color: #704214;
    font-size: 1.8em;
    margin: 0 0 10px 0;
}

.tabla-concurso-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stat-badge {
    background: linear-gradient(135deg, #fffefa, #fcf4e3);
    border: 2px solid #f7c600;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9em;
    color: #704214;
    font-weight: bold;
}

.tabla-participantes {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tabla-participantes thead {
    background: linear-gradient(135deg, #f7c600, #e0b500);
    color: #3b2f2f;
}

.tabla-participantes th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 3px solid #d4b98a;
}

.tabla-participantes th:first-child {
    text-align: center;
    width: 80px;
}

.tabla-participantes tbody tr {
    background: #fffefa;
    border-bottom: 1px solid #e8dcc8;
    transition: background 0.3s;
}

.tabla-participantes tbody tr:hover {
    background: #fef9e8;
}

.participante-posicion {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    padding: 15px 10px;
}

.participante-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.participante-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f7c600;
    box-shadow: 0 2px 4px rgba(79, 40, 23, 0.2);
    flex-shrink: 0;
}

.participante-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7c600, #e0b500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #3b2f2f;
    font-weight: 700;
    flex-shrink: 0;
}

.participante-datos {
    flex: 1;
    min-width: 0;
}

.participante-alias {
    font-weight: bold;
    color: #704214;
    font-size: 1.1em;
    display: block;
    margin-bottom: 4px;
}

.participante-detalles {
    font-size: 0.85em;
    color: #6b5c4a;
}

.barra-progreso {
    width: 100%;
    max-width: 150px;
    height: 24px;
    background: #e8dcc8;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid #d4c4a8;
}

.barra-progreso-fill {
    height: 100%;
    background: linear-gradient(90deg, #f7c600 0%, #e0b500 50%, #f7c600 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
}

.barra-progreso-text {
    font-size: 11px;
    font-weight: 700;
    color: #3b2f2f;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.estado-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.estado-badge.cumple {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.estado-badge.no-cumple {
    background: linear-gradient(135deg, #f5eee0, #e8dcc8);
    color: #8b6914;
    border: 1px solid #d4c4a8;
}

.monto-sats {
    font-weight: bold;
    color: #704214;
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 768px) {
    .tabla-participantes {
        font-size: 0.9em;
    }

    .participante-avatar,
    .participante-avatar-placeholder {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .participante-alias {
        font-size: 1em;
    }

    .barra-progreso {
        max-width: 120px;
        height: 20px;
    }

    .stat-badge {
        font-size: 0.8em;
        padding: 6px 12px;
    }
}

/* ============================================
   PANEL DE GANADOR PÚBLICO
   ============================================ */

.panel-ganador-publico {
    margin: 40px auto;
    max-width: 700px;
    background: linear-gradient(135deg, #fffefa, #fcf4e3);
    border: 3px solid #f7c600;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0px 6px 20px rgba(247, 198, 0, 0.3);
    text-align: center;
}

.ganador-header {
    margin-bottom: 25px;
}

.ganador-header h3 {
    color: #704214;
    font-size: 2em;
    margin: 0 0 10px 0;
}

.ganador-metodo {
    display: inline-block;
    background: #f7c600;
    color: #3b2f2f;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.ganador-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ganador-avatar-container {
    position: relative;
}

.ganador-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f7c600;
    box-shadow: 0 4px 12px rgba(79, 40, 23, 0.3);
}

.ganador-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7c600, #e0b500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #3b2f2f;
    font-weight: 700;
    border: 4px solid #f7c600;
}

.ganador-info {
    flex: 1;
}

.ganador-nombre {
    font-size: 1.8em;
    color: #704214;
    font-weight: bold;
    margin: 0 0 8px 0;
}

.ganador-alias {
    font-size: 1.1em;
    color: #6b5c4a;
    margin-bottom: 20px;
}

.ganador-stats-publico {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    background: #fffefa;
    border: 2px solid #d4b98a;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.95em;
}

.stat-item strong {
    display: block;
    color: #704214;
    font-size: 1.1em;
    margin-bottom: 4px;
}

.ganador-premio {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f7c600, #e0b500);
    border-radius: 8px;
    font-size: 1.2em;
}

.premio-label {
    font-weight: bold;
    color: #3b2f2f;
    margin-right: 10px;
}

.premio-valor {
    font-size: 1.4em;
    font-weight: bold;
    color: #704214;
}

.ganador-fecha {
    margin-top: 20px;
    font-size: 0.9em;
    color: #6b5c4a;
    font-style: italic;
}

/* Responsive ganador */
@media (max-width: 768px) {
    .panel-ganador-publico {
        padding: 20px;
    }

    .ganador-header h3 {
        font-size: 1.5em;
    }

    .ganador-avatar,
    .ganador-avatar-placeholder {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    .ganador-nombre {
        font-size: 1.4em;
    }

    .ganador-stats-publico {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   LOADING Y EMPTY STATES
   ============================================ */

.loading-container {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f7c600;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6b5c4a;
    font-style: italic;
}

.empty-state-icon {
    font-size: 3em;
    margin-bottom: 15px;
}
